From 1d9a68dbdd0132035f1fc7b7ea8f7fdc24741507 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sun, 24 Jun 2018 16:09:41 +0200 Subject: [PATCH] Remove all address comments --- audio/cries.asm | 819 +++------ audio/cry_pointers.asm | 3 +- audio/drumkits.asm | 130 +- audio/engine.asm | 262 +-- audio/music/aftertherivalfight.asm | 15 +- audio/music/azaleatown.asm | 40 +- audio/music/battletowerlobby.asm | 23 +- audio/music/battletowertheme.asm | 48 +- audio/music/bicycle.asm | 33 +- audio/music/buenaspassword.asm | 50 +- audio/music/bugcatchingcontest.asm | 39 +- audio/music/burnedtower.asm | 34 +- audio/music/celadoncity.asm | 43 +- audio/music/championbattle.asm | 93 +- audio/music/cherrygrovecity.asm | 23 +- audio/music/clair.asm | 42 +- audio/music/contestresults.asm | 25 +- audio/music/credits.asm | 70 +- audio/music/crystalopening.asm | 15 +- audio/music/dancinghall.asm | 24 +- audio/music/darkcave.asm | 45 +- audio/music/dragonsden.asm | 39 +- audio/music/ecruteakcity.asm | 31 +- audio/music/elmslab.asm | 23 +- audio/music/evolution.asm | 41 +- audio/music/gamecorner.asm | 79 +- audio/music/goldenrodcity.asm | 49 +- audio/music/goldsilveropening.asm | 12 +- audio/music/goldsilveropening2.asm | 19 +- audio/music/gym.asm | 36 +- audio/music/gymleadervictory.asm | 43 +- audio/music/halloffame.asm | 25 +- audio/music/healpokemon.asm | 12 +- audio/music/indigoplateau.asm | 32 +- audio/music/johtogymbattle.asm | 59 +- audio/music/johtotrainerbattle.asm | 87 +- audio/music/johtowildbattle.asm | 50 +- audio/music/johtowildbattlenight.asm | 12 +- audio/music/kantogymbattle.asm | 52 +- audio/music/kantotrainerbattle.asm | 20 +- audio/music/kantowildbattle.asm | 46 +- audio/music/lakeofrage.asm | 23 +- audio/music/lakeofragerocketradio.asm | 14 +- audio/music/lavendertown.asm | 31 +- audio/music/lighthouse.asm | 29 +- audio/music/lookbeauty.asm | 26 +- audio/music/lookhiker.asm | 26 +- audio/music/lookkimonogirl.asm | 30 +- audio/music/looklass.asm | 23 +- audio/music/lookmysticalman.asm | 49 +- audio/music/lookofficer.asm | 21 +- audio/music/lookpokemaniac.asm | 23 +- audio/music/lookrival.asm | 44 +- audio/music/lookrocket.asm | 98 +- audio/music/looksage.asm | 16 +- audio/music/lookyoungster.asm | 18 +- audio/music/magnettrain.asm | 21 +- audio/music/mainmenu.asm | 23 +- audio/music/mobileadapter.asm | 56 +- audio/music/mobileadaptermenu.asm | 36 +- audio/music/mobilecenter.asm | 23 +- audio/music/mom.asm | 18 +- audio/music/mtmoon.asm | 25 +- audio/music/mtmoonsquare.asm | 29 +- audio/music/nationalpark.asm | 43 +- audio/music/newbarktown.asm | 30 +- audio/music/nothing.asm | 12 +- audio/music/pallettown.asm | 22 +- audio/music/pokeflutechannel.asm | 21 +- audio/music/pokemoncenter.asm | 38 +- audio/music/pokemonchannel.asm | 17 +- audio/music/pokemonlullaby.asm | 18 +- audio/music/pokemonmarch.asm | 40 +- audio/music/postcredits.asm | 13 +- audio/music/printer.asm | 8 +- audio/music/profoak.asm | 48 +- audio/music/profoakspokemontalk.asm | 18 +- audio/music/rivalbattle.asm | 75 +- audio/music/rocketbattle.asm | 69 +- audio/music/rockethideout.asm | 36 +- audio/music/rockettheme.asm | 44 +- audio/music/route1.asm | 27 +- audio/music/route12.asm | 46 +- audio/music/route2.asm | 58 +- audio/music/route26.asm | 46 +- audio/music/route29.asm | 26 +- audio/music/route3.asm | 39 +- audio/music/route30.asm | 38 +- audio/music/route36.asm | 34 +- audio/music/route37.asm | 57 +- audio/music/ruinsofalphinterior.asm | 16 +- audio/music/ruinsofalphradio.asm | 24 +- audio/music/showmearound.asm | 47 +- audio/music/sprouttower.asm | 23 +- audio/music/ssaqua.asm | 58 +- audio/music/successfulcapture.asm | 12 +- audio/music/suicunebattle.asm | 18 +- audio/music/surf.asm | 49 +- audio/music/tintower.asm | 25 +- audio/music/titlescreen.asm | 39 +- audio/music/trainervictory.asm | 31 +- audio/music/unioncave.asm | 46 +- audio/music/vermilioncity.asm | 39 +- audio/music/victoryroad.asm | 40 +- audio/music/violetcity.asm | 32 +- audio/music/viridiancity.asm | 56 +- audio/music/wildpokemonvictory.asm | 33 +- audio/music_pointers.asm | 3 +- audio/notes.asm | 3 +- audio/sfx.asm | 1549 ++++++----------- audio/sfx_crystal.asm | 102 +- audio/sfx_pointers.asm | 3 +- audio/wave_samples.asm | 3 +- data/battle/ai/constant_damage_effects.asm | 3 +- data/battle/ai/encore_moves.asm | 3 +- data/battle/ai/rain_dance_moves.asm | 3 +- data/battle/ai/reckless_moves.asm | 3 +- data/battle/ai/residual_moves.asm | 1 - data/battle/ai/risky_effects.asm | 3 +- data/battle/ai/stall_moves.asm | 3 +- data/battle/ai/status_only_effects.asm | 3 +- data/battle/ai/sunny_day_moves.asm | 3 +- data/battle/ai/useful_moves.asm | 3 +- data/battle/effect_command_pointers.asm | 353 ++-- data/battle/held_consumables.asm | 3 +- data/battle/held_heal_status.asm | 3 +- data/battle/held_stat_up.asm | 1 - data/battle/metronome_exception_moves.asm | 3 +- data/battle_anims/ball_colors.asm | 3 +- data/battle_anims/framesets.asm | 3 +- data/battle_anims/oam.asm | 3 +- data/battle_anims/object_gfx.asm | 3 +- data/battle_anims/objects.asm | 3 +- data/battle_tower/classes.asm | 3 +- data/battle_tower/parties.asm | 2 +- data/credits_script.asm | 3 +- data/decorations/attributes.asm | 3 +- data/decorations/decorations.asm | 3 +- data/decorations/mystery_gift_decos.asm | 3 +- data/decorations/names.asm | 3 +- data/default_options.asm | 3 +- data/engine_flags.asm | 3 +- data/events/bug_contest_flags.asm | 3 +- data/events/bug_contest_winners.asm | 4 +- data/events/field_move_blocks.asm | 4 +- data/events/happiness_probabilities.asm | 6 +- data/events/magikarp_lengths.asm | 3 +- data/events/npc_trades.asm | 3 +- data/events/odd_eggs.asm | 3 +- data/events/unown_walls.asm | 4 +- data/growth_rates.asm | 3 +- data/items/apricorn_balls.asm | 3 +- data/items/attributes.asm | 2 +- data/items/bargain_shop.asm | 3 +- data/items/buena_prizes.asm | 3 +- data/items/catch_rate_items.asm | 3 +- data/items/fruit_trees.asm | 3 +- data/items/heal_hp.asm | 3 +- data/items/heal_status.asm | 3 +- data/items/mail_items.asm | 3 +- data/items/marts.asm | 108 +- data/items/mom_phone.asm | 8 +- data/items/mystery_gift_items.asm | 3 +- data/items/rooftop_sale.asm | 5 +- data/items/x_stats.asm | 3 +- data/maps/flypoints.asm | 3 +- data/maps/outdoor_sprites.asm | 81 +- data/maps/roofs.asm | 6 +- data/maps/scenes.asm | 3 +- data/maps/setup_scripts.asm | 27 +- data/maps/sgb_roof_pal_inds.asm | 3 +- data/maps/spawn_points.asm | 1 - data/mon_menu.asm | 6 +- data/moves/animations.asm | 1021 ++++------- data/moves/descriptions.asm | 4 +- data/moves/effects_pointers.asm | 2 +- data/moves/effects_priorities.asm | 3 +- data/moves/grammar.asm | 3 +- data/moves/moves.asm | 2 +- data/moves/tmhm_moves.asm | 3 +- data/party_menu_qualities.asm | 4 +- data/phone/non_trainer_names.asm | 3 +- data/phone/permanent_numbers.asm | 3 +- data/phone/phone_contacts.asm | 3 +- data/phone/special_calls.asm | 3 +- data/player_names.asm | 12 +- data/pokemon/cries.asm | 3 +- data/pokemon/ezchat_order.asm | 1 - data/pokemon/gen1_base_special.asm | 3 +- data/pokemon/gen1_order.asm | 3 +- data/pokemon/menu_icons.asm | 3 +- data/pokemon/palettes.asm | 4 +- data/pokemon/unown_words.asm | 4 +- data/predef_pointers.asm | 3 +- data/special_pointers.asm | 3 +- data/sprite_anims/framesets.asm | 4 +- data/sprite_anims/oam.asm | 3 +- data/sprite_anims/sequences.asm | 3 +- data/sprites/emotes.asm | 3 +- data/sprites/facings.asm | 34 +- data/sprites/map_objects.asm | 4 +- data/sprites/sprite_mons.asm | 3 +- data/sprites/sprites.asm | 2 +- data/text/mail_input_chars.asm | 6 +- data/text/unused_gen1_trainer_names.asm | 2 +- data/text_buffers.asm | 2 +- data/tilesets.asm | 3 +- data/trainers/attributes.asm | 3 +- data/trainers/class_names.asm | 2 +- data/trainers/dvs.asm | 3 +- data/trainers/gendered_trainers.asm | 4 +- data/trainers/genders.asm | 3 +- data/trainers/palettes.asm | 3 +- data/types/names.asm | 3 +- data/types/search_strings.asm | 3 +- data/types/search_types.asm | 3 +- data/types/type_boost_items.asm | 3 +- data/types/type_matchups.asm | 3 +- data/wild/bug_contest_mons.asm | 3 +- data/wild/fish.asm | 78 +- data/wild/flee_mons.asm | 7 +- data/wild/probabilities.asm | 6 +- data/wild/roammon_maps.asm | 3 +- data/wild/treemon_maps.asm | 6 +- data/wild/treemons.asm | 17 +- engine/battle/ai/items.asm | 147 +- engine/battle/ai/move.asm | 6 +- engine/battle/ai/redundant.asm | 58 +- engine/battle/ai/scoring.asm | 291 ++-- engine/battle/ai/switch.asm | 31 +- engine/battle/anim_hp_bar.asm | 36 +- engine/battle/battle_transition.asm | 97 +- .../battle/battlestart_copytilemapatonce.asm | 2 +- engine/battle/check_battle_scene.asm | 2 +- engine/battle/consume_held_item.asm | 2 +- engine/battle/core.asm | 804 +++------ engine/battle/effect_commands.asm | 612 +++---- engine/battle/hidden_power.asm | 3 +- engine/battle/link_result.asm | 10 +- engine/battle/menu.asm | 40 +- engine/battle/misc.asm | 18 +- engine/battle/move_effects/attract.asm | 6 +- engine/battle/move_effects/baton_pass.asm | 24 +- engine/battle/move_effects/beat_up.asm | 11 +- engine/battle/move_effects/belly_drum.asm | 3 +- engine/battle/move_effects/bide.asm | 6 +- engine/battle/move_effects/conversion.asm | 3 +- engine/battle/move_effects/conversion2.asm | 3 +- engine/battle/move_effects/counter.asm | 3 +- engine/battle/move_effects/curse.asm | 3 +- engine/battle/move_effects/destiny_bond.asm | 3 +- engine/battle/move_effects/disable.asm | 3 +- engine/battle/move_effects/encore.asm | 3 +- engine/battle/move_effects/endure.asm | 3 +- engine/battle/move_effects/false_swipe.asm | 3 +- engine/battle/move_effects/focus_energy.asm | 3 +- engine/battle/move_effects/foresight.asm | 3 +- engine/battle/move_effects/frustration.asm | 3 +- engine/battle/move_effects/fury_cutter.asm | 6 +- engine/battle/move_effects/future_sight.asm | 6 +- engine/battle/move_effects/heal_bell.asm | 3 +- engine/battle/move_effects/hidden_power.asm | 3 +- engine/battle/move_effects/leech_seed.asm | 3 +- engine/battle/move_effects/lock_on.asm | 3 +- engine/battle/move_effects/magnitude.asm | 2 +- engine/battle/move_effects/metronome.asm | 3 +- engine/battle/move_effects/mimic.asm | 3 +- engine/battle/move_effects/mirror_coat.asm | 3 +- engine/battle/move_effects/mirror_move.asm | 3 +- engine/battle/move_effects/mist.asm | 3 +- engine/battle/move_effects/nightmare.asm | 3 +- engine/battle/move_effects/pain_split.asm | 6 +- engine/battle/move_effects/pay_day.asm | 3 +- engine/battle/move_effects/perish_song.asm | 3 +- engine/battle/move_effects/present.asm | 2 +- engine/battle/move_effects/protect.asm | 6 +- engine/battle/move_effects/psych_up.asm | 3 +- engine/battle/move_effects/pursuit.asm | 3 +- engine/battle/move_effects/rage.asm | 3 +- engine/battle/move_effects/rain_dance.asm | 3 +- engine/battle/move_effects/rapid_spin.asm | 3 +- engine/battle/move_effects/return.asm | 3 +- engine/battle/move_effects/rollout.asm | 6 +- engine/battle/move_effects/safeguard.asm | 3 +- engine/battle/move_effects/sandstorm.asm | 3 +- engine/battle/move_effects/selfdestruct.asm | 3 +- engine/battle/move_effects/sketch.asm | 3 +- engine/battle/move_effects/sleep_talk.asm | 3 +- engine/battle/move_effects/snore.asm | 3 +- engine/battle/move_effects/spikes.asm | 3 +- engine/battle/move_effects/spite.asm | 3 +- engine/battle/move_effects/splash.asm | 3 +- engine/battle/move_effects/substitute.asm | 3 +- engine/battle/move_effects/sunny_day.asm | 3 +- engine/battle/move_effects/teleport.asm | 3 +- engine/battle/move_effects/thief.asm | 3 +- engine/battle/move_effects/thunder.asm | 3 +- engine/battle/move_effects/transform.asm | 3 +- engine/battle/move_effects/triple_kick.asm | 6 +- engine/battle/read_trainer_attributes.asm | 6 +- engine/battle/read_trainer_dvs.asm | 3 +- engine/battle/read_trainer_party.asm | 30 +- engine/battle/returntobattle_useball.asm | 2 +- engine/battle/sliding_intro.asm | 18 +- engine/battle/start_battle.asm | 8 +- engine/battle/trainer_huds.asm | 45 +- .../unreferenced_getgen1trainerclassname.asm | 2 +- engine/battle/used_move_text.asm | 42 +- engine/battle_anims/anim_commands.asm | 174 +- engine/battle_anims/bg_effects.asm | 232 ++- engine/battle_anims/core.asm | 21 +- engine/battle_anims/functions.asm | 456 +++-- engine/battle_anims/helpers.asm | 14 +- engine/battle_anims/pokeball_wobble.asm | 2 +- engine/events/basement_key.asm | 3 +- engine/events/battle_tower/battle_tower.asm | 196 +-- .../events/battle_tower/get_trainer_class.asm | 2 +- engine/events/battle_tower/load_trainer.asm | 5 +- engine/events/battle_tower/rules.asm | 79 +- engine/events/battle_tower/trainer_text.asm | 17 +- engine/events/buena.asm | 42 +- engine/events/buena_menu.asm | 6 +- engine/events/bug_contest/caught_mon.asm | 4 +- engine/events/bug_contest/contest.asm | 2 +- engine/events/bug_contest/contest_2.asm | 12 +- engine/events/bug_contest/display_stats.asm | 8 +- engine/events/bug_contest/judging.asm | 34 +- engine/events/card_key.asm | 3 +- engine/events/catch_tutorial.asm | 14 +- engine/events/catch_tutorial_input.asm | 14 +- engine/events/celebi.asm | 38 +- engine/events/checkforhiddenitems.asm | 6 +- engine/events/checksave.asm | 2 +- engine/events/checktime.asm | 4 +- engine/events/daycare.asm | 53 +- engine/events/diploma.asm | 17 +- engine/events/dratini.asm | 1 - engine/events/elevator.asm | 36 +- engine/events/engine_flags.asm | 3 +- engine/events/field_moves.asm | 70 +- engine/events/fish.asm | 9 +- engine/events/fishing_gfx.asm | 12 +- engine/events/fruit_trees.asm | 39 +- engine/events/haircut.asm | 14 +- engine/events/halloffame.asm | 37 +- engine/events/happiness_egg.asm | 10 +- engine/events/heal_machine_anim.asm | 62 +- engine/events/itemfinder.asm | 6 +- engine/events/kurt.asm | 39 +- .../kurt_selectquantity_interpretjoypad.asm | 2 +- engine/events/lucky_number.asm | 8 +- engine/events/magikarp.asm | 24 +- engine/events/magnet_train.asm | 58 +- engine/events/map_name_sign.asm | 39 +- engine/events/misc_scripts.asm | 3 +- engine/events/misc_scripts_2.asm | 4 +- engine/events/mom.asm | 75 +- engine/events/mom_phone.asm | 23 +- engine/events/money.asm | 36 +- engine/events/move_deleter.asm | 2 +- engine/events/move_tutor.asm | 6 +- engine/events/name_rater.asm | 15 +- engine/events/npc_trade.asm | 51 +- engine/events/odd_egg.asm | 3 +- engine/events/overworld.asm | 204 +-- engine/events/play_slow_cry.asm | 3 +- engine/events/poisonstep.asm | 24 +- engine/events/poisonstep_pals.asm | 4 +- engine/events/poke_seer.asm | 74 +- engine/events/pokecenter_pc.asm | 46 +- engine/events/pokepic.asm | 4 +- engine/events/pokerus/apply_pokerus_tick.asm | 2 +- engine/events/pokerus/check_pokerus.asm | 2 +- engine/events/pokerus/pokerus.asm | 4 +- engine/events/print_photo.asm | 3 +- engine/events/print_unown.asm | 20 +- engine/events/print_unown_2.asm | 10 +- engine/events/sacred_ash.asm | 6 +- engine/events/shuckle.asm | 4 +- engine/events/specials.asm | 111 +- engine/events/squirtbottle.asm | 3 +- engine/events/std_collision.asm | 2 +- engine/events/std_scripts.asm | 3 +- engine/events/sweet_scent.asm | 6 +- engine/events/treemons.asm | 29 +- engine/events/unown_walls.asm | 24 +- engine/events/whiteout.asm | 12 +- engine/games/card_flip.asm | 281 ++- engine/games/dummy_game.asm | 32 +- engine/games/slot_machine.asm | 337 ++-- engine/games/unown_puzzle.asm | 111 +- engine/gfx/cgb_layouts.asm | 161 +- engine/gfx/color.asm | 4 +- engine/gfx/crystal_layouts.asm | 67 +- engine/gfx/dma_transfer.asm | 64 +- engine/gfx/load_font.asm | 31 +- engine/gfx/load_overworld_font.asm | 3 +- engine/gfx/load_pics.asm | 32 +- engine/gfx/load_push_oam.asm | 4 +- engine/gfx/mon_icons.asm | 74 +- engine/gfx/pic_animation.asm | 188 +- engine/gfx/place_graphic.asm | 2 +- engine/gfx/player_gfx.asm | 36 +- engine/gfx/sgb_layouts.asm | 102 +- engine/gfx/sprite_anims.asm | 111 +- engine/gfx/sprites.asm | 73 +- engine/gfx/trademon_frontpic.asm | 4 +- engine/items/buy_sell_toss.asm | 38 +- engine/items/item_effects.asm | 312 ++-- engine/items/items.asm | 76 +- engine/items/mart.asm | 124 +- engine/items/pack.asm | 248 +-- engine/items/pack_kris.asm | 6 +- engine/items/switch_items.asm | 24 +- engine/items/tmhm.asm | 67 +- engine/items/tmhm2.asm | 6 +- engine/link/init_list.asm | 2 +- engine/link/link.asm | 194 +-- engine/link/link_2.asm | 12 +- engine/link/link_trade.asm | 67 +- engine/link/mystery_gift.asm | 227 ++- engine/link/mystery_gift_2.asm | 11 +- engine/link/place_waiting_text.asm | 4 +- engine/link/time_capsule.asm | 11 +- engine/link/time_capsule_2.asm | 6 +- engine/math/get_square_root.asm | 4 +- engine/math/math.asm | 6 +- engine/math/print_num.asm | 10 +- engine/math/sine.asm | 2 +- engine/menus/debug.asm | 186 +- engine/menus/delete_save.asm | 2 +- engine/menus/empty_sram.asm | 4 +- engine/menus/init_gender.asm | 19 +- engine/menus/intro_menu.asm | 199 +-- engine/menus/main_menu.asm | 57 +- engine/menus/menu.asm | 98 +- engine/menus/menu_2.asm | 42 +- engine/menus/naming_screen.asm | 177 +- engine/menus/options_menu.asm | 54 +- engine/menus/save.asm | 173 +- engine/menus/savemenu_copytilemapatonce.asm | 4 +- engine/menus/scrolling_menu.asm | 72 +- engine/menus/start_menu.asm | 262 +-- engine/menus/trainer_card.asm | 68 +- engine/movie/credits.asm | 52 +- engine/movie/crystal_intro.asm | 296 ++-- engine/movie/evolution_animation.asm | 42 +- engine/movie/gbc_only.asm | 24 +- engine/movie/init_hof_credits.asm | 6 +- engine/movie/title.asm | 33 +- engine/movie/trade_animation.asm | 289 ++- engine/movie/unused_title.asm | 24 +- engine/overworld/decorations.asm | 295 ++-- engine/overworld/events.asm | 240 +-- engine/overworld/events_2.asm | 103 +- engine/overworld/init_map.asm | 8 +- engine/overworld/load_map_part.asm | 2 +- engine/overworld/map_object_action.asm | 64 +- engine/overworld/map_objects.asm | 356 ++-- engine/overworld/map_objects_2.asm | 6 +- engine/overworld/map_setup.asm | 47 +- engine/overworld/movement.asm | 277 ++- engine/overworld/npc_movement.asm | 46 +- engine/overworld/overworld.asm | 79 +- engine/overworld/player_movement.asm | 68 +- engine/overworld/player_object.asm | 64 +- engine/overworld/player_step.asm | 34 +- engine/overworld/select_menu.asm | 33 +- engine/overworld/spawn_points.asm | 6 +- engine/overworld/tile_events.asm | 27 +- engine/overworld/time.asm | 115 +- engine/overworld/variables.asm | 32 +- engine/overworld/warp_connection.asm | 31 +- engine/overworld/wildmons.asm | 87 +- engine/phone/buenas_password.asm | 1 - engine/phone/generic_calls.asm | 1 - engine/phone/phone.asm | 115 +- engine/phone/phone_scripts.asm | 1 - engine/phone/phonering_copytilemapatonce.asm | 4 +- engine/pokedex/new_pokedex_entry.asm | 6 +- engine/pokedex/pokedex.asm | 310 ++-- engine/pokedex/pokedex_2.asm | 18 +- engine/pokedex/pokedex_3.asm | 20 +- engine/pokedex/unown_dex.asm | 6 +- engine/pokegear/pokegear.asm | 328 ++-- .../townmap_convertlinebreakcharacters.asm | 2 +- engine/pokemon/bills_pc.asm | 306 ++-- engine/pokemon/bills_pc_top.asm | 34 +- engine/pokemon/breeding.asm | 82 +- engine/pokemon/breedmon_level_growth.asm | 4 +- engine/pokemon/caught_data.asm | 22 +- engine/pokemon/correct_nick_errors.asm | 4 +- engine/pokemon/correct_party_errors.asm | 7 +- engine/pokemon/european_mail.asm | 14 +- engine/pokemon/evolve.asm | 30 +- engine/pokemon/experience.asm | 6 +- engine/pokemon/health.asm | 8 +- engine/pokemon/knows_move.asm | 2 +- engine/pokemon/learn.asm | 27 +- engine/pokemon/level_up_happiness.asm | 2 +- engine/pokemon/mail.asm | 31 +- engine/pokemon/mail_2.asm | 113 +- engine/pokemon/mon_menu.asm | 42 +- engine/pokemon/mon_stats.asm | 30 +- engine/pokemon/move_mon.asm | 75 +- engine/pokemon/move_mon_wo_mail.asm | 8 +- engine/pokemon/party_menu.asm | 118 +- engine/pokemon/search.asm | 3 +- engine/pokemon/search2.asm | 16 +- engine/pokemon/stats_screen.asm | 174 +- engine/pokemon/switchpartymons.asm | 8 +- engine/pokemon/tempmon.asm | 10 +- engine/pokemon/types.asm | 11 +- engine/predef.asm | 3 +- engine/printer/print_party.asm | 43 +- engine/printer/printer.asm | 93 +- engine/printer/printer_serial.asm | 99 +- engine/rtc/print_hours_mins.asm | 8 +- engine/rtc/reset_password.asm | 20 +- engine/rtc/restart_clock.asm | 27 +- engine/rtc/rtc.asm | 29 +- engine/rtc/timeset.asm | 68 +- engine/smallflag.asm | 2 +- engine/tilesets/map_palettes.asm | 4 +- engine/tilesets/mapgroup_roofs.asm | 3 +- engine/tilesets/tileset_anims.asm | 100 +- engine/tilesets/tileset_palettes.asm | 42 +- engine/tilesets/timeofday_pals.asm | 51 +- gfx/battle_anims.asm | 3 +- gfx/font.asm | 42 +- gfx/mail.asm | 74 +- gfx/pics.asm | 18 - gfx/sprites.asm | 204 +-- gfx/tileset_palette_maps.asm | 1 - home.asm | 43 +- home/audio.asm | 84 +- home/battle.asm | 59 +- home/battle_vars.asm | 6 +- home/clear_sprites.asm | 6 +- home/copy.asm | 50 +- home/copy2.asm | 9 +- home/copy_name.asm | 5 +- home/copy_tilemap.asm | 9 +- home/cry.asm | 21 +- home/decompress.asm | 6 +- home/delay.asm | 6 +- home/double_speed.asm | 9 +- home/fade.asm | 21 +- home/farcall.asm | 12 +- home/flag.asm | 12 +- home/game_time.asm | 9 +- home/handshake.asm | 6 +- home/hm_moves.asm | 8 +- home/hp_pals.asm | 6 +- home/init.asm | 18 +- home/item.asm | 15 +- home/joypad.asm | 48 +- home/lcd.asm | 12 +- home/map.asm | 300 ++-- home/map_objects.asm | 113 +- home/math.asm | 15 +- home/menu.asm | 120 +- home/menu_window.asm | 35 +- home/mobile.asm | 41 +- home/mon_data.asm | 11 +- home/mon_data_2.asm | 9 +- home/mon_stats.asm | 11 +- home/movement.asm | 37 +- home/names.asm | 24 +- home/palettes.asm | 37 +- home/pokedex_flags.asm | 15 +- home/predef.asm | 3 +- home/print_bcd.asm | 4 +- home/print_level.asm | 9 +- home/print_text.asm | 14 +- home/random.asm | 9 +- home/region.asm | 3 +- home/rtc.asm | 8 +- home/scrolling_menu.asm | 10 +- home/serial.asm | 39 +- home/sine.asm | 5 +- home/sprite_anims.asm | 9 +- home/sprite_updates.asm | 3 +- home/sram.asm | 9 +- home/stone_queue.asm | 15 +- home/string.asm | 8 +- home/text.asm | 226 +-- home/tilemap.asm | 34 +- home/time.asm | 43 +- home/trainers.asm | 23 +- home/vblank.asm | 30 +- home/video.asm | 25 +- home/window.asm | 18 +- lib/mobile/main.asm | 657 +++---- macros/wram.asm | 22 +- main.asm | 20 +- maps/GoldenrodGameCorner.asm | 2 +- maps/Route35NationalParkGate.asm | 2 +- mobile/fixed_words.asm | 327 ++-- mobile/mobile_12.asm | 145 +- mobile/mobile_12_2.asm | 101 +- mobile/mobile_22.asm | 671 +++---- mobile/mobile_22_2.asm | 161 +- mobile/mobile_40.asm | 1500 ++++++---------- mobile/mobile_41.asm | 177 +- mobile/mobile_42.asm | 230 +-- mobile/mobile_45.asm | 592 +++---- mobile/mobile_45_sprite_engine.asm | 99 +- mobile/mobile_46.asm | 857 ++++----- mobile/mobile_5b.asm | 135 +- mobile/mobile_5c.asm | 112 +- mobile/mobile_5e.asm | 123 +- mobile/mobile_5f.asm | 485 ++---- mobile/mobile_menu.asm | 119 +- mobile/news/news.asm | 6 +- mobile/print_opp_message.asm | 2 +- 616 files changed, 12136 insertions(+), 20383 deletions(-) diff --git a/audio/cries.asm b/audio/cries.asm index ca6c569b3a9..b8d9d214537 100644 --- a/audio/cries.asm +++ b/audio/cries.asm @@ -1,178 +1,148 @@ -Cry_Marill: ; f2d81 +Cry_Marill: musicheader 3, 5, Cry_Marill_Ch5 musicheader 1, 6, Cry_Marill_Ch6 musicheader 1, 8, Cry_Marill_Ch8 -; f2d8a -Cry_Togepi: ; f2d8a +Cry_Togepi: musicheader 2, 5, Cry_Togepi_Ch5 musicheader 1, 6, Cry_Togepi_Ch6 -; f2d90 -Cry_Togetic: ; f2d90 +Cry_Togetic: musicheader 2, 5, Cry_Togetic_Ch5 musicheader 1, 6, Cry_Togetic_Ch6 -; f2d96 -Cry_Spinarak: ; f2d96 +Cry_Spinarak: musicheader 3, 5, Cry_Spinarak_Ch5 musicheader 1, 6, Cry_Spinarak_Ch6 musicheader 1, 8, Cry_Spinarak_Ch8 -; f2d9f -Cry_Raikou: ; f2d9f +Cry_Raikou: musicheader 3, 5, Cry_Raikou_Ch5 musicheader 1, 6, Cry_Raikou_Ch6 musicheader 1, 8, Cry_Raikou_Ch8 -; f2da8 -Cry_Hoothoot: ; f2da8 +Cry_Hoothoot: musicheader 3, 5, Cry_Hoothoot_Ch5 musicheader 1, 6, Cry_Hoothoot_Ch6 musicheader 1, 8, Cry_Hoothoot_Ch8 -; f2db1 -Cry_Sentret: ; f2db1 +Cry_Sentret: musicheader 2, 5, Cry_Sentret_Ch5 musicheader 1, 6, Cry_Sentret_Ch6 -; f2db7 -Cry_Slowking: ; f2db7 +Cry_Slowking: musicheader 3, 5, Cry_Slowking_Ch5 musicheader 1, 6, Cry_Slowking_Ch6 musicheader 1, 8, Cry_Slowking_Ch8 -; f2dc0 -Cry_Mareep: ; f2dc0 +Cry_Mareep: musicheader 2, 5, Cry_Mareep_Ch5 musicheader 1, 6, Cry_Mareep_Ch6 -; f2dc6 -Cry_Cyndaquil: ; f2dc6 +Cry_Cyndaquil: musicheader 3, 5, Cry_Cyndaquil_Ch5 musicheader 1, 6, Cry_Cyndaquil_Ch6 musicheader 1, 8, Cry_Cyndaquil_Ch8 -; f2dcf -Cry_Chikorita: ; f2dcf +Cry_Chikorita: musicheader 3, 5, Cry_Chikorita_Ch5 musicheader 1, 6, Cry_Chikorita_Ch6 musicheader 1, 8, Cry_Chikorita_Ch8 -; f2dd8 -Cry_Gligar: ; f2dd8 +Cry_Gligar: musicheader 2, 5, Cry_Gligar_Ch5 musicheader 1, 8, Cry_Gligar_Ch8 -; f2dde -Cry_Girafarig: ; f2dde +Cry_Girafarig: musicheader 3, 5, Cry_Girafarig_Ch5 musicheader 1, 6, Cry_Girafarig_Ch6 musicheader 1, 8, Cry_Girafarig_Ch8 -; f2de7 -Cry_Slugma: ; f2de7 +Cry_Slugma: musicheader 2, 5, Cry_Slugma_Ch5 musicheader 1, 8, Cry_Slugma_Ch8 -; f2ded -Cry_Ledyba: ; f2ded +Cry_Ledyba: musicheader 3, 5, Cry_Ledyba_Ch5 musicheader 1, 6, Cry_Ledyba_Ch6 musicheader 1, 8, Cry_Ledyba_Ch8 -; f2df6 -Cry_Wooper: ; f2df6 +Cry_Wooper: musicheader 3, 5, Cry_Wooper_Ch5 musicheader 1, 6, Cry_Wooper_Ch6 musicheader 1, 8, Cry_Wooper_Ch8 -; f2dff -Cry_Donphan: ; f2dff +Cry_Donphan: musicheader 3, 5, Cry_Donphan_Ch5 musicheader 1, 6, Cry_Donphan_Ch6 musicheader 1, 8, Cry_Donphan_Ch8 -; f2e08 -Cry_Typhlosion: ; f2e08 +Cry_Typhlosion: musicheader 3, 5, Cry_Typhlosion_Ch5 musicheader 1, 6, Cry_Typhlosion_Ch6 musicheader 1, 8, Cry_Typhlosion_Ch8 -; f2e11 -Cry_Natu: ; f2e11 +Cry_Natu: musicheader 3, 5, Cry_Natu_Ch5 musicheader 1, 6, Cry_Natu_Ch6 musicheader 1, 8, Cry_Natu_Ch8 -; f2e1a -Cry_Teddiursa: ; f2e1a +Cry_Teddiursa: musicheader 3, 5, Cry_Teddiursa_Ch5 musicheader 1, 6, Cry_Teddiursa_Ch6 musicheader 1, 8, Cry_Teddiursa_Ch8 -; f2e23 -Cry_Sunflora: ; f2e23 +Cry_Sunflora: musicheader 3, 5, Cry_Sunflora_Ch5 musicheader 1, 6, Cry_Sunflora_Ch6 musicheader 1, 8, Cry_Sunflora_Ch8 -; f2e2c -Cry_Ampharos: ; f2e2c +Cry_Ampharos: musicheader 3, 5, Cry_Ampharos_Ch5 musicheader 1, 6, Cry_Ampharos_Ch6 musicheader 1, 8, Cry_Ampharos_Ch8 -; f2e35 -Cry_Totodile: ; f2e35 +Cry_Totodile: musicheader 3, 5, Cry_Totodile_Ch5 musicheader 1, 6, Cry_Totodile_Ch6 musicheader 1, 8, Cry_Totodile_Ch8 -; f2e3e -Cry_Cleffa: ; f2e3e +Cry_Cleffa: musicheader 3, 5, Cry_Cleffa_Ch5 musicheader 1, 6, Cry_Cleffa_Ch6 musicheader 1, 8, Cry_Cleffa_Ch8 -; f2e47 -Cry_Pichu: ; f2e47 +Cry_Pichu: musicheader 3, 5, Cry_Pichu_Ch5 musicheader 1, 6, Cry_Pichu_Ch6 musicheader 1, 8, Cry_Pichu_Ch8 -; f2e50 -Cry_Aipom: ; f2e50 +Cry_Aipom: musicheader 3, 5, Cry_Aipom_Ch5 musicheader 1, 6, Cry_Aipom_Ch6 musicheader 1, 8, Cry_Aipom_Ch8 -; f2e59 -Cry_Dunsparce: ; f2e59 +Cry_Dunsparce: musicheader 3, 5, Cry_Dunsparce_Ch5 musicheader 1, 6, Cry_Dunsparce_Ch6 musicheader 1, 8, Cry_Dunsparce_Ch8 -; f2e62 -Cry_Magcargo: ; f2e62 +Cry_Magcargo: musicheader 3, 5, Cry_Magcargo_Ch5 musicheader 1, 6, Cry_Magcargo_Ch6 musicheader 1, 8, Cry_Magcargo_Ch8 -; f2e6b -Cry_Entei: ; f2e6b +Cry_Entei: musicheader 3, 5, Cry_Entei_Ch5 musicheader 1, 6, Cry_Entei_Ch6 musicheader 1, 8, Cry_Entei_Ch8 -; f2e74 -Cry_Mantine: ; f2e74 +Cry_Mantine: musicheader 3, 5, Cry_Mantine_Ch5 musicheader 1, 6, Cry_Mantine_Ch6 musicheader 1, 8, Cry_Mantine_Ch8 -; f2e7d -Cry_Entei_Ch5: ; f2e7d +Cry_Entei_Ch5: soundinput $ff sound_duty 3, 0, 2, 1 sound __, 2, $f8, $05f8 @@ -181,26 +151,23 @@ Cry_Entei_Ch5: ; f2e7d sound C_, 5, $f2, $0574 soundinput $88 endchannel -; f2e94 -Cry_Entei_Ch6: ; f2e94 +Cry_Entei_Ch6: sound_duty 3, 0, 3, 0 sound __, 2, $c8, $0640 sound __, 7, $ff, $0668 sound __, 8, $a8, $0534 sound C_, 5, $a2, $04a4 endchannel -; f2ea7 -Cry_Entei_Ch8: ; f2ea7 +Cry_Entei_Ch8: noise __, 11, $d6, $6a noise __, 7, $bc, $6c noise __, 7, $e2, $5c noise C#, 1, $b4, $6c endchannel -; f2eb4 -Cry_Magcargo_Ch5: ; f2eb4 +Cry_Magcargo_Ch5: sound_duty 0, 1, 0, 3 sound __, 5, $af, $0720 sound __, 3, $f8, $071c @@ -210,9 +177,8 @@ Cry_Magcargo_Ch5: ; f2eb4 sound __, 13, $c8, $0712 sound __, 5, $91, $070e endchannel -; f2ed3 -Cry_Magcargo_Ch6: ; f2ed3 +Cry_Magcargo_Ch6: sound_duty 2, 2, 0, 0 sound __, 2, $b8, $0710 sound __, 4, $d8, $072c @@ -222,9 +188,8 @@ Cry_Magcargo_Ch6: ; f2ed3 sound __, 13, $f8, $0760 sound __, 5, $c1, $0750 endchannel -; f2ef2 -Cry_Magcargo_Ch8: ; f2ef2 +Cry_Magcargo_Ch8: noise __, 3, $e8, $3b .loop noise __, 2, $f1, $4e @@ -232,9 +197,8 @@ Cry_Magcargo_Ch8: ; f2ef2 noise __, 3, $d8, $3f noise C_, 5, $c2, $5f endchannel -; f2f03 -Cry_Dunsparce_Ch5: ; f2f03 +Cry_Dunsparce_Ch5: sound_duty 2, 0, 2, 0 sound __, 2, $f8, $05b0 sound __, 2, $f8, $04b4 @@ -246,23 +210,20 @@ Cry_Dunsparce_Ch5: ; f2f03 sound C_, 1, $c3, $0490 soundinput $88 endchannel -; f2f26 -Cry_Dunsparce_Ch6: ; f2f26 +Cry_Dunsparce_Ch6: sound_duty 2, 0, 2, 0 sound __, 9, $b8, $04c8 sound C#, 1, $b5, $0410 endchannel -; f2f31 -Cry_Dunsparce_Ch8: ; f2f31 +Cry_Dunsparce_Ch8: noise __, 4, $ff, $4b noise __, 4, $ef, $4c noise C#, 1, $b5, $5f endchannel -; f2f3b -Cry_Slowking_Ch5: ; f2f3b +Cry_Slowking_Ch5: sound_duty 3, 0, 3, 0 sound __, 3, $f1, $0550 sound __, 3, $f1, $0530 @@ -272,9 +233,8 @@ Cry_Slowking_Ch5: ; f2f3b sound __, 3, $f2, $0630 sound C_, 1, $f2, $0550 endchannel -; f2f5a -Cry_Slowking_Ch6: ; f2f5a +Cry_Slowking_Ch6: sound_duty 2, 0, 3, 3 sound __, 5, $e1, $0620 sound __, 6, $e2, $0500 @@ -282,9 +242,8 @@ Cry_Slowking_Ch6: ; f2f5a sound __, 3, $e1, $0520 sound C_, 1, $e2, $0500 endchannel -; f2f71 -Cry_Slowking_Ch8: ; f2f71 +Cry_Slowking_Ch8: noise __, 3, $8a, $5d noise __, 3, $9a, $4c noise __, 6, $9a, $5d @@ -294,9 +253,8 @@ Cry_Slowking_Ch8: ; f2f71 noise __, 3, $9a, $5f noise C_, 1, $b2, $6f endchannel -; f2f8a -Cry_Pichu_Ch5: ; f2f8a +Cry_Pichu_Ch5: dutycycle $0 soundinput $f7 sound __, 3, $f8, $078d @@ -309,9 +267,8 @@ Cry_Pichu_Ch5: ; f2f8a sound __, 3, $f8, $07b8 soundinput $88 endchannel -; f2fab -Cry_Pichu_Ch6: ; f2fab +Cry_Pichu_Ch6: sound_duty 0, 0, 1, 0 sound __, 3, $c8, $076d sound __, 3, $c8, $0771 @@ -319,18 +276,16 @@ Cry_Pichu_Ch6: ; f2fab sound __, 3, $c8, $0794 sound __, 3, $c8, $0798 endchannel -; f2fc2 -Cry_Pichu_Ch8: ; f2fc2 +Cry_Pichu_Ch8: noise __, 3, $b8, $1 noise __, 3, $b8, $19 noise __, 3, $c8, $18 noise __, 3, $b8, $10 noise __, 9, $c2, $18 endchannel -; f2fd2 -Cry_Marill_Ch5: ; f2fd2 +Cry_Marill_Ch5: sound_duty 2, 0, 2, 0 sound __, 3, $88, $06d8 sound __, 9, $e2, $06e0 @@ -340,9 +295,8 @@ Cry_Marill_Ch5: ; f2fd2 sound __, 3, $d8, $06b0 sound __, 9, $c1, $06aa endchannel -; f2ff1 -Cry_Marill_Ch6: ; f2ff1 +Cry_Marill_Ch6: sound_duty 3, 0, 2, 1 sound __, 3, $68, $06b1 sound __, 6, $c1, $06b9 @@ -351,9 +305,8 @@ Cry_Marill_Ch6: ; f2ff1 sound __, 3, $a8, $0684 sound __, 11, $92, $067b endchannel -; f300c -Cry_Marill_Ch8: ; f300c +Cry_Marill_Ch8: noise __, 2, $99, $6c noise __, 2, $92, $5c noise __, 11, $62, $4c @@ -361,57 +314,51 @@ Cry_Marill_Ch8: ; f300c noise __, 3, $68, $6b noise __, 11, $62, $6c endchannel -; f301f -Cry_Togepi_Ch5: ; f301f +Cry_Togepi_Ch5: tone $0002 -Cry_Togepi_Ch6: ; f3022 -Cry_Togetic_branch_f3022: ; f3022 +Cry_Togepi_Ch6: +Cry_Togetic_branch_f3022: sound_duty 2, 0, 1, 1 sound __, 5, $f1, $0796 sound __, 5, $f1, $072d sound __, 8, $0, 0 sound C_, 1, $f1, $07a7 endchannel -; f3035 -Cry_Togetic_Ch5: ; f3035 +Cry_Togetic_Ch5: tone $0002 -Cry_Togetic_Ch6: ; f3038 +Cry_Togetic_Ch6: callchannel Cry_Togetic_branch_f3022 loopchannel 2, Cry_Togetic_Ch6 sound __, 15, $0, 0 sound __, 9, $f2, $07c2 endchannel -; f3048 -Cry_Spinarak_Ch5: ; f3048 +Cry_Spinarak_Ch5: dutycycle $1 sound __, 4, $2c, $07c4 sound __, 2, $0, $0001 sound __, 6, $59, $07b9 sound __, 7, $b4, $07bb endchannel -; f305b -Cry_Spinarak_Ch6: ; f305b +Cry_Spinarak_Ch6: sound_duty 2, 2, 2, 0 sound __, 4, $2c, $07c7 sound __, 2, $0, 0 sound __, 6, $59, $07be sound __, 7, $b4, $07bd endchannel -; f306e -Cry_Spinarak_Ch8: ; f306e +Cry_Spinarak_Ch8: noise __, 4, $92, $10 noise __, 2, $39, $0 noise __, 6, $69, $10 noise __, 7, $93, $0 endchannel -; f307b -Cry_Raikou_Ch5: ; f307b +Cry_Raikou_Ch5: sound_duty 0, 2, 3, 3 sound __, 3, $f1, $04b0 sound __, 3, $f7, $0590 @@ -421,9 +368,8 @@ Cry_Raikou_Ch5: ; f307b sound __, 4, $f2, $06b0 sound C_, 1, $f2, $0690 endchannel -; f309a -Cry_Raikou_Ch6: ; f309a +Cry_Raikou_Ch6: sound_duty 2, 0, 3, 3 sound __, 3, $f1, $0720 sound __, 3, $e1, $0650 @@ -434,9 +380,8 @@ Cry_Raikou_Ch6: ; f309a sound __, 4, $f2, $0690 sound C_, 1, $e2, $06a0 endchannel -; f30bd -Cry_Raikou_Ch8: ; f30bd +Cry_Raikou_Ch8: noise __, 3, $89, $2e noise __, 3, $99, $1f noise __, 5, $89, $4e @@ -446,9 +391,8 @@ Cry_Raikou_Ch8: ; f30bd noise __, 4, $ec, $4d noise C_, 1, $d2, $4f endchannel -; f30d6 -Cry_Hoothoot_Ch5: ; f30d6 +Cry_Hoothoot_Ch5: sound_duty 2, 1, 2, 1 sound __, 5, $78, $0650 sound __, 5, $f8, $0660 @@ -459,9 +403,8 @@ Cry_Hoothoot_Ch5: ; f30d6 sound __, 5, $f8, $0678 sound __, 5, $f1, $0674 endchannel -; f30f9 -Cry_Hoothoot_Ch6: ; f30f9 +Cry_Hoothoot_Ch6: sound_duty 2, 0, 2, 0 .loop1 sound __, 3, $a1, $0600 @@ -472,56 +415,49 @@ Cry_Hoothoot_Ch6: ; f30f9 sound __, 5, $a2, $0634 sound __, 5, $91, $0638 endchannel -; f3114 -Cry_Hoothoot_Ch8: ; f3114 +Cry_Hoothoot_Ch8: noise __, 2, $68, $36 noise C_, 1, $88, $6a noise __, 2, $98, $5e noise C_, 1, $a7, $6e endchannel -; f3121 -Cry_Sentret_Ch5: ; f3121 +Cry_Sentret_Ch5: tone $0020 dutycycle $0 jumpchannel Cry_Sentret_branch_f312b -; f3129 -Cry_Sentret_Ch6: ; f3129 +Cry_Sentret_Ch6: sound_duty 3, 2, 1, 0 -Cry_Sentret_branch_f312b: ; f312b +Cry_Sentret_branch_f312b: sound __, 9, $39, $072d sound __, 9, $f1, $0720 endchannel -; f3134 -Cry_Sentret_Ch8: ; f3134 +Cry_Sentret_Ch8: noise __, 9, $3b, $0 noise __, 9, $92, $0 endchannel -; f313b -Cry_Mareep_Ch5: ; f313b +Cry_Mareep_Ch5: tone $0020 dutycycle $0 jumpchannel Cry_Mareep_branch_f3145 -; f3143 -Cry_Mareep_Ch6: ; f3143 +Cry_Mareep_Ch6: sound_duty 1, 0, 0, 0 -Cry_Mareep_branch_f3145: ; f3145 -Cry_Gligar_branch_f3145: ; f3145 +Cry_Mareep_branch_f3145: +Cry_Gligar_branch_f3145: sound __, 5, $3a, $073d sound __, 7, $f8, $0762 sound __, 7, $f8, $0760 sound __, 7, $f1, $075e endchannel -; f3156 -Cry_Cyndaquil_Ch5: ; f3156 +Cry_Cyndaquil_Ch5: tone $0020 -Cry_Cyndaquil_Ch6: ; f3159 +Cry_Cyndaquil_Ch6: dutycycle $2 sound __, 9, $2f, $0107 .loop1 @@ -533,18 +469,16 @@ Cry_Cyndaquil_Ch6: ; f3159 sound __, 2, $51, $0312 loopchannel 4, .loop2 endchannel -; f3178 -Cry_Cyndaquil_Ch8: ; f3178 -Cry_Gligar_Ch8: ; f3178 +Cry_Cyndaquil_Ch8: +Cry_Gligar_Ch8: noise __, 9, $3f, $52 noise C#, 1, $93, $4f endchannel -; f317f -Cry_Chikorita_Ch5: ; f317f +Cry_Chikorita_Ch5: tone $0020 -Cry_Chikorita_Ch6: ; f3182 +Cry_Chikorita_Ch6: sound_duty 1, 0, 2, 0 sound __, 3, $c8, $0641 sound __, 3, $48, $0641 @@ -552,46 +486,40 @@ Cry_Chikorita_Ch6: ; f3182 sound __, 5, $f8, $078e sound __, 5, $f1, $078b endchannel -; f3199 -Cry_Chikorita_Ch8: ; f3199 +Cry_Chikorita_Ch8: noise __, 5, $91, $10 noise __, 9, $94, $3 endchannel -; f31a0 -Cry_Gligar_Ch5: ; f31a0 +Cry_Gligar_Ch5: sound_duty 2, 0, 2, 2 jumpchannel Cry_Gligar_branch_f3145 -; f31a5 -Cry_Girafarig_Ch5: ; f31a5 +Cry_Girafarig_Ch5: dutycycle $1 tone $0004 jumpchannel Cry_Girafarig_branch_f31af -; f31ad -Cry_Girafarig_Ch6: ; f31ad +Cry_Girafarig_Ch6: sound_duty 1, 0, 0, 1 -Cry_Girafarig_branch_f31af: ; f31af +Cry_Girafarig_branch_f31af: sound __, 5, $68, $0758 sound __, 3, $e8, $0760 sound __, 3, $e8, $0767 sound __, 3, $e8, $076c sound __, 8, $f1, $0767 endchannel -; f31c4 -Cry_Girafarig_Ch8: ; f31c4 +Cry_Girafarig_Ch8: noise __, 5, $29, $0 noise __, 3, $39, $1 noise __, 3, $49, $2 noise __, 3, $59, $1 noise __, 8, $41, $0 endchannel -; f31d4 -Cry_Slugma_Ch5: ; f31d4 +Cry_Slugma_Ch5: sound_duty 1, 0, 1, 2 sound __, 13, $f2, $07a6 sound __, 5, $f8, $07b0 @@ -599,25 +527,22 @@ Cry_Slugma_Ch5: ; f31d4 sound __, 7, $f8, $03a0 sound __, 9, $e1, $0290 endchannel -; f31eb -Cry_Slugma_Ch8: ; f31eb +Cry_Slugma_Ch8: noise __, 13, $b2, $50 noise __, 9, $a8, $60 noise __, 7, $a8, $5b noise __, 9, $a1, $5c endchannel -; f31f8 -Cry_Ledyba_Ch5: ; f31f8 +Cry_Ledyba_Ch5: tone $0002 dutycycle $2 jumpchannel Cry_Ledyba_branch_f3202 -; f3200 -Cry_Ledyba_Ch6: ; f3200 +Cry_Ledyba_Ch6: sound_duty 1, 0, 0, 0 -Cry_Ledyba_branch_f3202: ; f3202 +Cry_Ledyba_branch_f3202: sound __, 4, $f8, $0791 sound __, 4, $d8, $078d sound __, 3, $0, 0 @@ -625,9 +550,8 @@ Cry_Ledyba_branch_f3202: ; f3202 sound __, 2, $f8, $0741 sound __, 5, $e1, $0751 endchannel -; f321b -Cry_Ledyba_Ch8: ; f321b +Cry_Ledyba_Ch8: noise __, 4, $59, $21 noise __, 4, $81, $0 noise __, 3, $20, $0 @@ -635,10 +559,9 @@ Cry_Ledyba_Ch8: ; f321b noise __, 2, $80, $10 noise __, 5, $87, $0 endchannel -; f322e -Cry_Wooper_Ch5: ; f322e -Cry_Donphan_Ch5: ; f322e +Cry_Wooper_Ch5: +Cry_Donphan_Ch5: dutycycle $2 sound __, 3, $99, $0718 sound __, 5, $ab, $0722 @@ -647,10 +570,9 @@ Cry_Donphan_Ch5: ; f322e sound __, 9, $d1, $0712 sound __, 9, $0, 0 endchannel -; f3249 -Cry_Wooper_Ch6: ; f3249 -Cry_Donphan_Ch6: ; f3249 +Cry_Wooper_Ch6: +Cry_Donphan_Ch6: sound_duty 3, 1, 0, 0 sound __, 3, $b9, $0738 sound __, 5, $cb, $0742 @@ -659,28 +581,25 @@ Cry_Donphan_Ch6: ; f3249 sound __, 9, $f1, $0732 sound __, 9, $0, 0 endchannel -; f3264 -Cry_Wooper_Ch8: ; f3264 +Cry_Wooper_Ch8: noise __, 3, $5b, $4 noise __, 5, $68, $13 noise __, 9, $68, $20 noise __, 5, $68, $13 noise C_, 1, $51, $4 endchannel -; f3274 -Cry_Donphan_Ch8: ; f3274 +Cry_Donphan_Ch8: noise __, 3, $8b, $59 noise __, 5, $a8, $6a noise __, 9, $a8, $70 noise __, 5, $a8, $69 noise C_, 1, $92, $6c endchannel -; f3284 -Cry_Typhlosion_Ch5: ; f3284 -Cry_Teddiursa_Ch5: ; f3284 +Cry_Typhlosion_Ch5: +Cry_Teddiursa_Ch5: sound_duty 2, 0, 1, 0 .loop1 sound __, 4, $c1, $0791 @@ -701,10 +620,9 @@ Cry_Teddiursa_Ch5: ; f3284 sound __, 2, $21, $0401 loopchannel 4, .loop5 endchannel -; f32bb -Cry_Typhlosion_Ch6: ; f32bb -Cry_Teddiursa_Ch6: ; f32bb +Cry_Typhlosion_Ch6: +Cry_Teddiursa_Ch6: sound_duty 0, 2, 3, 1 sound __, 9, $99, $0740 sound __, 9, $79, $0746 @@ -714,88 +632,78 @@ Cry_Teddiursa_Ch6: ; f32bb sound __, 9, $f8, $0787 sound C_, 9, $e2, $0783 endchannel -; f32da -Cry_Typhlosion_Ch8: ; f32da +Cry_Typhlosion_Ch8: noise C_, 1, $a6, $16 noise C_, 9, $98, $3d noise C#, 1, $98, $5c noise C#, 1, $75, $5f endchannel -; f32e7 -Cry_Natu_Ch5: ; f32e7 +Cry_Natu_Ch5: sound_duty 2, 3, 1, 3 -Cry_Mantine_branch_f32e9: ; f32e9 -Cry_Sunflora_branch_f32e9: ; f32e9 +Cry_Mantine_branch_f32e9: +Cry_Sunflora_branch_f32e9: sound __, 5, $f8, $07b1 sound __, 5, $f8, $07b0 sound __, 5, $48, $07af -Cry_Mantine_branch_f32f5: ; f32f5 +Cry_Mantine_branch_f32f5: sound __, 5, $f8, $07b2 sound __, 5, $f8, $07b3 sound __, 5, $48, $07b4 endchannel -; f3302 -Cry_Mantine_branch_f3302: ; f3302 -Cry_Natu_Ch6: ; f3302 -Cry_Sunflora_Ch6: ; f3302 +Cry_Mantine_branch_f3302: +Cry_Natu_Ch6: +Cry_Sunflora_Ch6: sound_duty 2, 0, 3, 3 sound __, 5, $f8, $07b2 sound __, 5, $f8, $07b1 sound __, 5, $28, $07b0 -Cry_Mantine_branch_f3310: ; f3310 +Cry_Mantine_branch_f3310: sound __, 5, $f8, $07b4 sound __, 5, $f8, $07b6 sound __, 5, $48, $07b8 endchannel -; f331d -Cry_Mantine_branch_f331d: ; f331d -Cry_Natu_Ch8: ; f331d -Cry_Sunflora_Ch8: ; f331d +Cry_Mantine_branch_f331d: +Cry_Natu_Ch8: +Cry_Sunflora_Ch8: noise __, 5, $88, $5 noise __, 5, $88, $4 noise __, 5, $38, $3 -Cry_Mantine_branch_f3326: ; f3326 +Cry_Mantine_branch_f3326: noise __, 5, $88, $5 noise __, 5, $88, $4 noise __, 5, $87, $4 endchannel -; f3330 -Cry_Teddiursa_Ch8: ; f3330 +Cry_Teddiursa_Ch8: noise __, 9, $a6, $3a noise __, 9, $a1, $5a endchannel -; f3337 -Cry_Sunflora_Ch5: ; f3337 +Cry_Sunflora_Ch5: dutycycle $0 jumpchannel Cry_Sunflora_branch_f32e9 -; f333c -Cry_Mantine_Ch5: ; f333c +Cry_Mantine_Ch5: dutycycle $0 callchannel Cry_Mantine_branch_f32e9 callchannel Cry_Mantine_branch_f32f5 endchannel -; f3345 -Cry_Mantine_Ch6: ; f3345 +Cry_Mantine_Ch6: callchannel Cry_Mantine_branch_f3302 callchannel Cry_Mantine_branch_f3310 endchannel -; f334c -Cry_Mantine_Ch8: ; f334c +Cry_Mantine_Ch8: callchannel Cry_Mantine_branch_f331d callchannel Cry_Mantine_branch_f3326 endchannel -; f3353 -Cry_Ampharos_Ch5: ; f3353 +Cry_Ampharos_Ch5: sound_duty 2, 3, 1, 3 .loop sound __, 2, $c1, $0520 @@ -806,9 +714,8 @@ Cry_Ampharos_Ch5: ; f3353 sound __, 5, $78, $0730 sound C_, 9, $c2, $0420 endchannel -; f3370 -Cry_Ampharos_Ch6: ; f3370 +Cry_Ampharos_Ch6: sound_duty 2, 0, 3, 0 sound __, 9, $f8, $0700 sound __, 8, $f8, $0720 @@ -816,9 +723,8 @@ Cry_Ampharos_Ch6: ; f3370 sound __, 5, $f8, $0760 sound C_, 9, $f2, $0730 endchannel -; f3387 -Cry_Ampharos_Ch8: ; f3387 +Cry_Ampharos_Ch8: noise __, 5, $88, $6d noise __, 5, $d8, $68 noise __, 8, $c8, $69 @@ -826,9 +732,8 @@ Cry_Ampharos_Ch8: ; f3387 noise __, 5, $98, $3c noise C_, 9, $d2, $5b endchannel -; f339a -Cry_Totodile_Ch5: ; f339a +Cry_Totodile_Ch5: sound_duty 2, 0, 3, 0 sound __, 9, $f8, $0330 sound __, 9, $f8, $0340 @@ -836,9 +741,8 @@ Cry_Totodile_Ch5: ; f339a sound __, 9, $b8, $07b3 sound C#, 1, $b2, $07b4 endchannel -; f33b1 -Cry_Totodile_Ch6: ; f33b1 +Cry_Totodile_Ch6: sound_duty 2, 0, 1, 0 sound __, 9, $e8, $0320 sound __, 9, $e8, $0328 @@ -846,17 +750,15 @@ Cry_Totodile_Ch6: ; f33b1 sound __, 9, $88, $0782 sound C#, 1, $72, $0784 endchannel -; f33c8 -Cry_Totodile_Ch8: ; f33c8 +Cry_Totodile_Ch8: noise __, 3, $be, $49 noise __, 6, $be, $3a noise __, 3, $be, $29 noise C#, 9, $d3, $6e endchannel -; f33d5 -Cry_Cleffa_Ch5: ; f33d5 +Cry_Cleffa_Ch5: sound_duty 1, 2, 3, 0 soundinput $ff sound __, 3, $f8, $0720 @@ -870,18 +772,16 @@ Cry_Cleffa_Ch5: ; f33d5 sound __, 9, $f1, $0737 soundinput $88 endchannel -; f33fc -Cry_Cleffa_Ch6: ; f33fc +Cry_Cleffa_Ch6: sound_duty 2, 0, 2, 0 sound __, 7, $b2, $071e sound __, 6, $92, $0779 sound __, 5, $82, $073e sound __, 9, $a1, $0735 endchannel -; f340f -Cry_Cleffa_Ch8: ; f340f +Cry_Cleffa_Ch8: noise __, 3, $64, $7f noise __, 3, $84, $7d noise __, 3, $a4, $6f @@ -889,9 +789,8 @@ Cry_Cleffa_Ch8: ; f340f noise __, 3, $94, $6f noise __, 3, $61, $6b endchannel -; f3422 -Cry_Aipom_Ch5: ; f3422 +Cry_Aipom_Ch5: sound_duty 2, 0, 1, 3 sound __, 4, $f8, $06b0 sound __, 2, $f8, $06a5 @@ -901,9 +800,8 @@ Cry_Aipom_Ch5: ; f3422 sound __, 4, $f8, $0720 sound C_, 5, $f2, $070e endchannel -; f3441 -Cry_Aipom_Ch6: ; f3441 +Cry_Aipom_Ch6: sound_duty 3, 1, 2, 0 .loop1 sound __, 2, $f1, $07b4 @@ -916,9 +814,8 @@ Cry_Aipom_Ch6: ; f3441 loopchannel 2, .loop3 sound C_, 1, $92, $0795 endchannel -; f3460 -Cry_Aipom_Ch8: ; f3460 +Cry_Aipom_Ch8: noise __, 1, $f1, $28 loopchannel 4, Cry_Aipom_Ch8 noise __, 1, $91, $49 @@ -929,237 +826,198 @@ Cry_Aipom_Ch8: ; f3460 noise __, 4, $b2, $4d noise C_, 5, $a3, $4c endchannel -; f347d -Cry_Nidoran_M: ; f347d +Cry_Nidoran_M: musicheader 3, 5, Cry_Nidoran_M_Ch5 musicheader 1, 6, Cry_Nidoran_M_Ch6 musicheader 1, 8, Cry_Nidoran_M_Ch8 -; f3486 -Cry_Nidoran_F: ; f3486 +Cry_Nidoran_F: musicheader 3, 5, Cry_Nidoran_F_Ch5 musicheader 1, 6, Cry_Nidoran_F_Ch6 musicheader 1, 8, Cry_Nidoran_F_Ch8 -; f348f -Cry_Slowpoke: ; f348f +Cry_Slowpoke: musicheader 3, 5, Cry_Slowpoke_Ch5 musicheader 1, 6, Cry_Slowpoke_Ch6 musicheader 1, 8, Cry_Slowpoke_Ch8 -; f3498 -Cry_Kangaskhan: ; f3498 +Cry_Kangaskhan: musicheader 3, 5, Cry_Kangaskhan_Ch5 musicheader 1, 6, Cry_Kangaskhan_Ch6 musicheader 1, 8, Cry_Kangaskhan_Ch8 -; f34a1 -Cry_Charmander: ; f34a1 +Cry_Charmander: musicheader 3, 5, Cry_Charmander_Ch5 musicheader 1, 6, Cry_Charmander_Ch6 musicheader 1, 8, Cry_Charmander_Ch8 -; f34aa -Cry_Grimer: ; f34aa +Cry_Grimer: musicheader 3, 5, Cry_Grimer_Ch5 musicheader 1, 6, Cry_Grimer_Ch6 musicheader 1, 8, Cry_Grimer_Ch8 -; f34b3 -Cry_Voltorb: ; f34b3 +Cry_Voltorb: musicheader 3, 5, Cry_Voltorb_Ch5 musicheader 1, 6, Cry_Voltorb_Ch6 musicheader 1, 8, Cry_Voltorb_Ch8 -; f34bc -Cry_Muk: ; f34bc +Cry_Muk: musicheader 3, 5, Cry_Muk_Ch5 musicheader 1, 6, Cry_Muk_Ch6 musicheader 1, 8, Cry_Muk_Ch8 -; f34c5 -Cry_Oddish: ; f34c5 +Cry_Oddish: musicheader 3, 5, Cry_Oddish_Ch5 musicheader 1, 6, Cry_Oddish_Ch6 musicheader 1, 8, Cry_Oddish_Ch8 -; f34ce -Cry_Raichu: ; f34ce +Cry_Raichu: musicheader 3, 5, Cry_Raichu_Ch5 musicheader 1, 6, Cry_Raichu_Ch6 musicheader 1, 8, Cry_Raichu_Ch8 -; f34d7 -Cry_Nidoqueen: ; f34d7 +Cry_Nidoqueen: musicheader 3, 5, Cry_Nidoqueen_Ch5 musicheader 1, 6, Cry_Nidoqueen_Ch6 musicheader 1, 8, Cry_Nidoqueen_Ch8 -; f34e0 -Cry_Diglett: ; f34e0 +Cry_Diglett: musicheader 3, 5, Cry_Diglett_Ch5 musicheader 1, 6, Cry_Diglett_Ch6 musicheader 1, 8, Cry_Diglett_Ch8 -; f34e9 -Cry_Seel: ; f34e9 +Cry_Seel: musicheader 3, 5, Cry_Seel_Ch5 musicheader 1, 6, Cry_Seel_Ch6 musicheader 1, 8, Cry_Seel_Ch8 -; f34f2 -Cry_Drowzee: ; f34f2 +Cry_Drowzee: musicheader 3, 5, Cry_Drowzee_Ch5 musicheader 1, 6, Cry_Drowzee_Ch6 musicheader 1, 8, Cry_Drowzee_Ch8 -; f34fb -Cry_Pidgey: ; f34fb +Cry_Pidgey: musicheader 3, 5, Cry_Pidgey_Ch5 musicheader 1, 6, Cry_Pidgey_Ch6 musicheader 1, 8, Cry_Pidgey_Ch8 -; f3504 -Cry_Bulbasaur: ; f3504 +Cry_Bulbasaur: musicheader 3, 5, Cry_Bulbasaur_Ch5 musicheader 1, 6, Cry_Bulbasaur_Ch6 musicheader 1, 8, Cry_Bulbasaur_Ch8 -; f350d -Cry_Spearow: ; f350d +Cry_Spearow: musicheader 3, 5, Cry_Spearow_Ch5 musicheader 1, 6, Cry_Spearow_Ch6 musicheader 1, 8, Cry_Spearow_Ch8 -; f3516 -Cry_Rhydon: ; f3516 +Cry_Rhydon: musicheader 3, 5, Cry_Rhydon_Ch5 musicheader 1, 6, Cry_Rhydon_Ch6 musicheader 1, 8, Cry_Rhydon_Ch8 -; f351f -Cry_Golem: ; f351f +Cry_Golem: musicheader 3, 5, Cry_Golem_Ch5 musicheader 1, 6, Cry_Golem_Ch6 musicheader 1, 8, Cry_Golem_Ch8 -; f3528 -Cry_Blastoise: ; f3528 +Cry_Blastoise: musicheader 3, 5, Cry_Blastoise_Ch5 musicheader 1, 6, Cry_Blastoise_Ch6 musicheader 1, 8, Cry_Blastoise_Ch8 -; f3531 -Cry_Pidgeotto: ; f3531 +Cry_Pidgeotto: musicheader 3, 5, Cry_Pidgeotto_Ch5 musicheader 1, 6, Cry_Pidgeotto_Ch6 musicheader 1, 8, Cry_Pidgeotto_Ch8 -; f353a -Cry_Weedle: ; f353a +Cry_Weedle: musicheader 3, 5, Cry_Weedle_Ch5 musicheader 1, 6, Cry_Weedle_Ch6 musicheader 1, 8, Cry_Weedle_Ch8 -; f3543 -Cry_Caterpie: ; f3543 +Cry_Caterpie: musicheader 3, 5, Cry_Caterpie_Ch5 musicheader 1, 6, Cry_Caterpie_Ch6 musicheader 1, 8, Cry_Caterpie_Ch8 -; f354c -Cry_Ekans: ; f354c +Cry_Ekans: musicheader 3, 5, Cry_Ekans_Ch5 musicheader 1, 6, Cry_Ekans_Ch6 musicheader 1, 8, Cry_Ekans_Ch8 -; f3555 -Cry_Fearow: ; f3555 +Cry_Fearow: musicheader 3, 5, Cry_Fearow_Ch5 musicheader 1, 6, Cry_Fearow_Ch6 musicheader 1, 8, Cry_Fearow_Ch8 -; f355e -Cry_Clefairy: ; f355e +Cry_Clefairy: musicheader 3, 5, Cry_Clefairy_Ch5 musicheader 1, 6, Cry_Clefairy_Ch6 musicheader 1, 8, Cry_Clefairy_Ch8 -; f3567 -Cry_Venonat: ; f3567 +Cry_Venonat: musicheader 3, 5, Cry_Venonat_Ch5 musicheader 1, 6, Cry_Venonat_Ch6 musicheader 1, 8, Cry_Venonat_Ch8 -; f3570 -Cry_Lapras: ; f3570 +Cry_Lapras: musicheader 3, 5, Cry_Lapras_Ch5 musicheader 1, 6, Cry_Lapras_Ch6 musicheader 1, 8, Cry_Lapras_Ch8 -; f3579 -Cry_Metapod: ; f3579 +Cry_Metapod: musicheader 3, 5, Cry_Metapod_Ch5 musicheader 1, 6, Cry_Metapod_Ch6 musicheader 1, 8, Cry_Metapod_Ch8 -; f3582 -Cry_Squirtle: ; f3582 +Cry_Squirtle: musicheader 3, 5, Cry_Squirtle_Ch5 musicheader 1, 6, Cry_Squirtle_Ch6 musicheader 1, 8, Cry_Squirtle_Ch8 -; f358b -Cry_Paras: ; f358b +Cry_Paras: musicheader 3, 5, Cry_Paras_Ch5 musicheader 1, 6, Cry_Paras_Ch6 musicheader 1, 8, Cry_Paras_Ch8 -; f3594 -Cry_Growlithe: ; f3594 +Cry_Growlithe: musicheader 3, 5, Cry_Growlithe_Ch5 musicheader 1, 6, Cry_Growlithe_Ch6 musicheader 1, 8, Cry_Growlithe_Ch8 -; f359d -Cry_Krabby: ; f359d +Cry_Krabby: musicheader 3, 5, Cry_Krabby_Ch5 musicheader 1, 6, Cry_Krabby_Ch6 musicheader 1, 8, Cry_Krabby_Ch8 -; f35a6 -Cry_Psyduck: ; f35a6 +Cry_Psyduck: musicheader 3, 5, Cry_Psyduck_Ch5 musicheader 1, 6, Cry_Psyduck_Ch6 musicheader 1, 8, Cry_Psyduck_Ch8 -; f35af -Cry_Rattata: ; f35af +Cry_Rattata: musicheader 3, 5, Cry_Rattata_Ch5 musicheader 1, 6, Cry_Rattata_Ch6 musicheader 1, 8, Cry_Rattata_Ch8 -; f35b8 -Cry_Vileplume: ; f35b8 +Cry_Vileplume: musicheader 3, 5, Cry_Vileplume_Ch5 musicheader 1, 6, Cry_Vileplume_Ch6 musicheader 1, 8, Cry_Vileplume_Ch8 -; f35c1 -Cry_Vulpix: ; f35c1 +Cry_Vulpix: musicheader 3, 5, Cry_Vulpix_Ch5 musicheader 1, 6, Cry_Vulpix_Ch6 musicheader 1, 8, Cry_Vulpix_Ch8 -; f35ca -Cry_Weepinbell: ; f35ca +Cry_Weepinbell: musicheader 3, 5, Cry_Weepinbell_Ch5 musicheader 1, 6, Cry_Weepinbell_Ch6 musicheader 1, 8, Cry_Weepinbell_Ch8 -; f35d3 -Unused_Cry_Ch5: ; f35d3 +Unused_Cry_Ch5: sound_duty 0, 0, 3, 3 sound __, 16, $e0, $0780 sound __, 16, $f0, $0784 @@ -1168,9 +1026,8 @@ Unused_Cry_Ch5: ; f35d3 sound __, 11, $6c, $0780 sound __, 9, $71, $0784 endchannel -; f35ee -Unused_Cry_Ch6: ; f35ee +Unused_Cry_Ch6: sound_duty 1, 1, 0, 0 sound __, 16, $a0, $0741 sound __, 16, $b0, $0743 @@ -1179,9 +1036,8 @@ Unused_Cry_Ch6: ; f35ee sound __, 11, $4c, $0741 sound __, 9, $31, $0746 endchannel -; f3609 -Unused_Cry_Ch8: ; f3609 +Unused_Cry_Ch8: noise __, 3, $f2, $4c noise __, 7, $e0, $3a noise __, 16, $d0, $3a @@ -1190,9 +1046,8 @@ Unused_Cry_Ch8: ; f3609 noise __, 13, $7d, $4c noise __, 16, $d3, $4c endchannel -; f361f -Cry_Raichu_Ch5: ; f361f +Cry_Raichu_Ch5: sound_duty 0, 0, 3, 3 sound __, 16, $f7, $07a0 sound __, 7, $e6, $07a3 @@ -1202,9 +1057,8 @@ Cry_Raichu_Ch5: ; f361f sound __, 5, $e3, $07d7 sound __, 16, $f2, $07d8 endchannel -; f363c -Cry_Raichu_Ch6: ; f363c +Cry_Raichu_Ch6: sound_duty 1, 1, 0, 0 sound __, 3, $8, 0 sound __, 16, $a7, $06a1 @@ -1215,9 +1069,8 @@ Cry_Raichu_Ch6: ; f363c sound __, 5, $83, $06d9 sound __, 16, $a2, $06d7 endchannel -; f365d -Cry_Raichu_Ch8: ; f365d +Cry_Raichu_Ch8: noise __, 3, $f2, $3c noise __, 9, $e4, $3e noise __, 16, $d7, $3c @@ -1227,9 +1080,8 @@ Cry_Raichu_Ch8: ; f365d noise __, 7, $d4, $3d noise __, 9, $c1, $3b endchannel -; f3676 -Cry_Vileplume_Ch5: ; f3676 +Cry_Vileplume_Ch5: sound_duty 0, 0, 3, 3 sound __, 16, $f7, $07c0 sound __, 7, $e4, $07c1 @@ -1237,26 +1089,23 @@ Cry_Vileplume_Ch5: ; f3676 sound __, 5, $d3, $07c2 sound __, 9, $c1, $07c0 endchannel -; f368d -Cry_Vileplume_Ch6: ; f368d +Cry_Vileplume_Ch6: sound_duty 3, 3, 1, 1 sound __, 16, $97, $0781 sound __, 7, $84, $0780 sound __, 11, $96, $0781 sound __, 16, $83, $0781 endchannel -; f36a0 -Cry_Vileplume_Ch8: ; f36a0 +Cry_Vileplume_Ch8: noise __, 4, $f2, $3c noise __, 14, $e6, $2c noise __, 16, $d7, $3c noise __, 9, $c1, $2c endchannel -; f36ad -Cry_Vulpix_Ch5: ; f36ad +Cry_Vulpix_Ch5: sound_duty 0, 0, 3, 3 sound __, 16, $f7, $0680 sound __, 11, $e6, $0684 @@ -1267,9 +1116,8 @@ Cry_Vulpix_Ch5: ; f36ad sound __, 5, $d3, $0660 sound __, 9, $c1, $0640 endchannel -; f36d0 -Cry_Vulpix_Ch6: ; f36d0 +Cry_Vulpix_Ch6: sound_duty 1, 1, 0, 0 sound __, 16, $b7, $0641 sound __, 11, $96, $0642 @@ -1280,18 +1128,16 @@ Cry_Vulpix_Ch6: ; f36d0 sound __, 5, $93, $0622 sound __, 9, $71, $0601 endchannel -; f36f3 -Cry_Vulpix_Ch8: ; f36f3 +Cry_Vulpix_Ch8: noise __, 16, $e4, $3c noise __, 11, $c7, $4c noise __, 11, $c7, $3c noise __, 13, $b7, $4c noise __, 16, $a2, $5c endchannel -; f3703 -Cry_Rhydon_Ch5: ; f3703 +Cry_Rhydon_Ch5: sound_duty 0, 0, 3, 3 sound __, 7, $f7, $07a0 sound __, 9, $e6, $07a4 @@ -1301,9 +1147,8 @@ Cry_Rhydon_Ch5: ; f3703 sound __, 3, $c2, $0728 sound __, 9, $b1, $0730 endchannel -; f3722 -Cry_Rhydon_Ch6: ; f3722 +Cry_Rhydon_Ch6: sound_duty 2, 2, 0, 0 sound __, 5, $8, 0 sound __, 7, $a7, $0741 @@ -1314,9 +1159,8 @@ Cry_Rhydon_Ch6: ; f3722 sound __, 4, $82, $06cc sound __, 9, $71, $06d8 endchannel -; f3745 -Cry_Rhydon_Ch8: ; f3745 +Cry_Rhydon_Ch8: noise __, 3, $f2, $4c noise __, 7, $e6, $3a noise __, 5, $d7, $3a @@ -1325,9 +1169,8 @@ Cry_Rhydon_Ch8: ; f3745 noise __, 13, $d2, $3d noise __, 9, $d1, $2c endchannel -; f375b -Cry_Weepinbell_Ch5: ; f375b +Cry_Weepinbell_Ch5: sound_duty 1, 1, 2, 2 sound __, 7, $f4, $0740 sound __, 16, $e3, $0730 @@ -1335,9 +1178,8 @@ Cry_Weepinbell_Ch5: ; f375b sound __, 6, $b3, $0748 sound __, 9, $d1, $0750 endchannel -; f3772 -Cry_Weepinbell_Ch6: ; f3772 +Cry_Weepinbell_Ch6: sound_duty 3, 1, 3, 1 sound __, 7, $c3, $0712 sound __, 16, $b3, $0704 @@ -1345,17 +1187,15 @@ Cry_Weepinbell_Ch6: ; f3772 sound __, 5, $c3, $0721 sound __, 9, $b1, $0732 endchannel -; f3789 -Cry_Weepinbell_Ch8: ; f3789 +Cry_Weepinbell_Ch8: noise __, 9, $d6, $2c noise __, 13, $c6, $3c noise __, 11, $b6, $2c noise __, 9, $91, $1c endchannel -; f3796 -Cry_Kangaskhan_Ch5: ; f3796 +Cry_Kangaskhan_Ch5: sound_duty 0, 0, 3, 3 sound __, 5, $f7, $0608 sound __, 7, $e6, $0600 @@ -1365,9 +1205,8 @@ Cry_Kangaskhan_Ch5: ; f3796 sound __, 5, $d3, $05a0 sound __, 9, $e1, $0580 endchannel -; f37b5 -Cry_Kangaskhan_Ch6: ; f37b5 +Cry_Kangaskhan_Ch6: sound_duty 2, 2, 0, 0 sound __, 5, $c7, $0504 sound __, 7, $a6, $0502 @@ -1377,17 +1216,15 @@ Cry_Kangaskhan_Ch6: ; f37b5 sound __, 5, $b3, $04a3 sound __, 9, $c1, $0482 endchannel -; f37d4 -Cry_Kangaskhan_Ch8: ; f37d4 +Cry_Kangaskhan_Ch8: noise __, 13, $e4, $4c noise __, 11, $c7, $5c noise __, 13, $b6, $4c noise __, 16, $a2, $5c endchannel -; f37e1 -Cry_Bulbasaur_Ch5: ; f37e1 +Cry_Bulbasaur_Ch5: sound_duty 1, 0, 3, 3 sound __, 5, $f7, $07c0 sound __, 13, $e6, $07c2 @@ -1396,9 +1233,8 @@ Cry_Bulbasaur_Ch5: ; f37e1 sound __, 5, $b5, $0660 sound __, 9, $c1, $0640 endchannel -; f37fc -Cry_Bulbasaur_Ch6: ; f37fc +Cry_Bulbasaur_Ch6: sound_duty 0, 3, 0, 3 sound __, 4, $c7, $0781 sound __, 13, $b6, $0780 @@ -1407,18 +1243,16 @@ Cry_Bulbasaur_Ch6: ; f37fc sound __, 7, $b5, $0621 sound __, 9, $a1, $0602 endchannel -; f3817 -Cry_Bulbasaur_Ch8: ; f3817 +Cry_Bulbasaur_Ch8: noise __, 4, $e4, $3c noise __, 13, $d6, $2c noise __, 5, $e4, $3c noise __, 9, $b7, $5c noise __, 16, $c2, $5d endchannel -; f3827 -Cry_Spearow_Ch5: ; f3827 +Cry_Spearow_Ch5: sound_duty 1, 2, 0, 3 sound __, 9, $f7, $0680 sound __, 3, $f7, $0660 @@ -1429,9 +1263,8 @@ Cry_Spearow_Ch5: ; f3827 sound __, 5, $a7, $0730 sound __, 16, $91, $0720 endchannel -; f384a -Cry_Spearow_Ch6: ; f384a +Cry_Spearow_Ch6: sound_duty 1, 2, 3, 1 sound __, 11, $e7, $0682 sound __, 3, $e7, $0662 @@ -1442,64 +1275,56 @@ Cry_Spearow_Ch6: ; f384a sound __, 3, $97, $0732 sound __, 16, $81, $0722 endchannel -; f386d -Cry_Spearow_Ch8: ; f386d +Cry_Spearow_Ch8: noise __, 5, $74, $21 noise __, 5, $74, $10 noise __, 5, $71, $20 endchannel -; f3877 -Cry_Nidoran_M_Ch5: ; f3877 +Cry_Nidoran_M_Ch5: sound_duty 1, 1, 3, 3 sound __, 5, $f3, $0718 sound __, 16, $e5, $0798 sound __, 9, $91, $0758 endchannel -; f3886 -Cry_Nidoran_M_Ch6: ; f3886 +Cry_Nidoran_M_Ch6: sound_duty 0, 0, 2, 2 sound __, 6, $b3, $0708 sound __, 16, $c5, $0788 sound __, 9, $71, $0748 endchannel -; f3895 -Cry_Nidoran_M_Ch8: ; f3895 +Cry_Nidoran_M_Ch8: noise __, 4, $a1, $1c noise __, 15, $94, $2c noise __, 9, $81, $1c endchannel -; f389f -Cry_Pidgey_Ch5: ; f389f +Cry_Pidgey_Ch5: sound_duty 1, 1, 2, 2 sound __, 5, $e1, $0700 sound __, 5, $f2, $0780 sound __, 3, $92, $0740 sound __, 9, $e1, $0600 endchannel -; f38b2 -Cry_Pidgey_Ch6: ; f38b2 +Cry_Pidgey_Ch6: sound_duty 2, 2, 0, 0 sound __, 5, $b1, $06e1 sound __, 4, $c2, $06e1 sound __, 4, $62, $0681 sound __, 9, $b1, $05e1 endchannel -; f38c5 -Cry_Pidgey_Ch8: ; f38c5 +Cry_Pidgey_Ch8: noise __, 3, $61, $32 noise __, 3, $61, $21 noise __, 9, $61, $11 endchannel -; f38cf -Cry_Voltorb_Ch5: ; f38cf +Cry_Voltorb_Ch5: sound_duty 2, 2, 3, 3 sound __, 7, $83, $0247 sound __, 16, $62, $0226 @@ -1507,11 +1332,10 @@ Cry_Voltorb_Ch5: ; f38cf sound __, 10, $63, $0206 sound __, 16, $82, $0225 sound __, 16, $42, $0207 -Cry_Voltorb_Ch6: ; f38e9 +Cry_Voltorb_Ch6: endchannel -; f38ea -Cry_Voltorb_Ch8: ; f38ea +Cry_Voltorb_Ch8: noise __, 9, $d4, $8c noise __, 5, $e2, $9c noise __, 16, $c6, $8c @@ -1519,51 +1343,45 @@ Cry_Voltorb_Ch8: ; f38ea noise __, 16, $d7, $9c noise __, 16, $f2, $ac endchannel -; f38fd -Cry_Muk_Ch5: ; f38fd +Cry_Muk_Ch5: sound_duty 0, 0, 3, 3 sound __, 5, $f3, $06e0 sound __, 16, $e4, $0640 sound __, 9, $c1, $0620 endchannel -; f390c -Cry_Muk_Ch6: ; f390c +Cry_Muk_Ch6: sound_duty 2, 2, 0, 0 sound __, 4, $c3, $0683 sound __, 15, $b4, $0602 sound __, 9, $a1, $0601 endchannel -; f391b -Cry_Muk_Ch8: ; f391b +Cry_Muk_Ch8: noise __, 5, $d3, $5c noise __, 16, $e6, $4c noise __, 9, $b1, $5c endchannel -; f3925 -Cry_Grimer_Ch5: ; f3925 +Cry_Grimer_Ch5: sound_duty 2, 2, 0, 0 sound __, 7, $e2, $0500 sound __, 7, $e3, $0580 sound __, 7, $d3, $0570 sound __, 9, $a1, $0560 endchannel -; f3938 -Cry_Grimer_Ch6: ; f3938 +Cry_Grimer_Ch6: sound_duty 1, 1, 3, 3 sound __, 7, $e2, $0482 sound __, 7, $d3, $0501 sound __, 7, $b2, $04e2 sound __, 9, $81, $04c1 -Cry_Grimer_Ch8: ; f394a +Cry_Grimer_Ch8: endchannel -; f394b -Cry_Diglett_Ch5: ; f394b +Cry_Diglett_Ch5: sound_duty 0, 3, 0, 3 sound __, 5, $f1, $0700 sound __, 5, $e1, $0780 @@ -1576,9 +1394,8 @@ Cry_Diglett_Ch5: ; f394b sound __, 5, $c1, $0742 sound __, 9, $b1, $0741 endchannel -; f3976 -Cry_Diglett_Ch6: ; f3976 +Cry_Diglett_Ch6: sound_duty 0, 1, 0, 1 sound __, 13, $8, 0 sound __, 5, $f1, $0701 @@ -1588,9 +1405,8 @@ Cry_Diglett_Ch6: ; f3976 sound __, 5, $f1, $0782 sound __, 9, $d1, $0701 endchannel -; f3995 -Cry_Diglett_Ch8: ; f3995 +Cry_Diglett_Ch8: noise __, 16, $8, $0 noise __, 5, $8, $0 noise __, 5, $d1, $4c @@ -1600,9 +1416,8 @@ Cry_Diglett_Ch8: ; f3995 noise __, 5, $c1, $2c noise __, 9, $a1, $4c endchannel -; f39ae -Cry_Seel_Ch5: ; f39ae +Cry_Seel_Ch5: sound_duty 0, 3, 0, 3 sound __, 9, $f5, $0600 sound __, 3, $d2, $0638 @@ -1614,9 +1429,8 @@ Cry_Seel_Ch5: ; f39ae sound __, 3, $b2, $0610 sound __, 9, $c1, $0620 endchannel -; f39d5 -Cry_Seel_Ch6: ; f39d5 +Cry_Seel_Ch6: sound_duty 0, 1, 0, 1 sound __, 13, $c3, $05c0 sound __, 4, $b1, $05f9 @@ -1627,28 +1441,25 @@ Cry_Seel_Ch6: ; f39d5 sound __, 3, $81, $05d1 sound __, 3, $91, $05d9 sound __, 9, $91, $05e1 -Cry_Seel_Ch8: ; f39fb +Cry_Seel_Ch8: endchannel -; f39fc -Cry_Slowpoke_Ch5: ; f39fc +Cry_Slowpoke_Ch5: sound_duty 0, 0, 0, 0 sound __, 9, $f5, $0480 sound __, 3, $e1, $05e0 sound __, 9, $d1, $05dc endchannel -; f3a0b -Cry_Slowpoke_Ch6: ; f3a0b +Cry_Slowpoke_Ch6: sound_duty 1, 1, 2, 2 sound __, 8, $95, $0441 sound __, 3, $81, $0521 sound __, 9, $61, $051a -Cry_Slowpoke_Ch8: ; f3a19 +Cry_Slowpoke_Ch8: endchannel -; f3a1a -Cry_Drowzee_Ch5: ; f3a1a +Cry_Drowzee_Ch5: sound_duty 0, 2, 0, 2 sound __, 6, $f2, $0650 sound __, 10, $d1, $0660 @@ -1658,9 +1469,8 @@ Cry_Drowzee_Ch5: ; f3a1a sound __, 7, $d1, $0620 loopchannel 2, Cry_Drowzee_Ch5 endchannel -; f3a39 -Cry_Drowzee_Ch6: ; f3a39 +Cry_Drowzee_Ch6: sound_duty 0, 0, 0, 1 sound __, 5, $8, 0 sound __, 6, $f2, $0651 @@ -1674,9 +1484,8 @@ Cry_Drowzee_Ch6: ; f3a39 sound __, 6, $f2, $0611 sound __, 5, $d1, $0621 endchannel -; f3a68 -Cry_Drowzee_Ch8: ; f3a68 +Cry_Drowzee_Ch8: noise __, 7, $d2, $1c noise __, 10, $b1, $2c noise __, 9, $c2, $2c @@ -1688,35 +1497,31 @@ Cry_Drowzee_Ch8: ; f3a68 noise __, 10, $c2, $2c noise __, 5, $a1, $3c endchannel -; f3a87 -Cry_Nidoran_F_Ch5: ; f3a87 +Cry_Nidoran_F_Ch5: sound_duty 0, 0, 2, 2 sound __, 5, $f3, $0600 sound __, 9, $d5, $0760 sound __, 4, $e2, $0720 sound __, 9, $d1, $0710 endchannel -; f3a9a -Cry_Nidoran_F_Ch6: ; f3a9a +Cry_Nidoran_F_Ch6: sound_duty 2, 2, 1, 1 sound __, 6, $b3, $06f1 sound __, 8, $c5, $0752 sound __, 4, $a2, $0711 sound __, 9, $b1, $0601 endchannel -; f3aad -Cry_Nidoran_F_Ch8: ; f3aad +Cry_Nidoran_F_Ch8: noise __, 4, $a2, $3c noise __, 13, $94, $2c noise __, 4, $82, $1c noise __, 9, $71, $2c endchannel -; f3aba -Cry_Nidoqueen_Ch5: ; f3aba +Cry_Nidoqueen_Ch5: sound_duty 0, 0, 3, 3 sound __, 9, $f7, $06e0 sound __, 7, $e6, $06e5 @@ -1726,9 +1531,8 @@ Cry_Nidoqueen_Ch5: ; f3aba sound __, 5, $f2, $06b0 sound __, 16, $a2, $06c8 endchannel -; f3ad9 -Cry_Nidoqueen_Ch6: ; f3ad9 +Cry_Nidoqueen_Ch6: sound_duty 1, 1, 0, 0 sound __, 4, $8, 0 sound __, 9, $a7, $06a1 @@ -1739,9 +1543,8 @@ Cry_Nidoqueen_Ch6: ; f3ad9 sound __, 5, $a2, $0671 sound __, 16, $72, $0689 endchannel -; f3afc -Cry_Nidoqueen_Ch8: ; f3afc +Cry_Nidoqueen_Ch8: noise __, 3, $f2, $3c noise __, 9, $e4, $3e noise __, 9, $d7, $3c @@ -1751,34 +1554,30 @@ Cry_Nidoqueen_Ch8: ; f3afc noise __, 4, $a4, $2c noise __, 9, $91, $3c endchannel -; f3b15 -Cry_Oddish_Ch5: ; f3b15 +Cry_Oddish_Ch5: sound_duty 0, 0, 3, 3 sound __, 16, $f6, $0565 sound __, 11, $e4, $057c sound __, 4, $c2, $055c sound __, 16, $b2, $053c endchannel -; f3b28 -Cry_Oddish_Ch6: ; f3b28 +Cry_Oddish_Ch6: sound_duty 2, 2, 1, 1 sound __, 15, $d6, $0503 sound __, 10, $b4, $051b sound __, 5, $92, $04fa sound __, 16, $a2, $04db endchannel -; f3b3b -Cry_Oddish_Ch8: ; f3b3b +Cry_Oddish_Ch8: noise __, 13, $e6, $4c noise __, 12, $d7, $5c noise __, 16, $c2, $4c endchannel -; f3b45 -Cry_Charmander_Ch5: ; f3b45 +Cry_Charmander_Ch5: sound_duty 0, 0, 3, 3 sound __, 5, $f7, $06a0 sound __, 9, $e6, $06a4 @@ -1788,9 +1587,8 @@ Cry_Charmander_Ch5: ; f3b45 sound __, 5, $c2, $0620 sound __, 9, $b1, $0610 endchannel -; f3b64 -Cry_Charmander_Ch6: ; f3b64 +Cry_Charmander_Ch6: sound_duty 2, 2, 1, 1 sound __, 5, $e7, $0601 sound __, 9, $d6, $0603 @@ -1800,9 +1598,8 @@ Cry_Charmander_Ch6: ; f3b64 sound __, 5, $b2, $0582 sound __, 9, $a1, $0571 endchannel -; f3b83 -Cry_Charmander_Ch8: ; f3b83 +Cry_Charmander_Ch8: noise __, 8, $d6, $5c noise __, 9, $e6, $4c noise __, 5, $d4, $5c @@ -1810,50 +1607,44 @@ Cry_Charmander_Ch8: ; f3b83 noise __, 8, $c3, $4c noise __, 9, $a1, $5c endchannel -; f3b96 -Cry_Clefairy_Ch5: ; f3b96 +Cry_Clefairy_Ch5: sound_duty 3, 2, 1, 0 sound __, 8, $d2, $0740 sound __, 16, $e5, $0760 sound C_, 9, $c1, $0730 endchannel -; f3ba5 -Cry_Clefairy_Ch6: ; f3ba5 +Cry_Clefairy_Ch6: sound_duty 1, 0, 0, 2 sound __, 3, $c2, $0701 sound __, 5, $c2, $0708 sound __, 16, $d7, $0741 sound C_, 9, $a2, $0701 -Cry_Clefairy_Ch8: ; f3bb7 +Cry_Clefairy_Ch8: endchannel -; f3bb8 -Cry_Caterpie_Ch5: ; f3bb8 +Cry_Caterpie_Ch5: sound_duty 0, 0, 3, 3 sound __, 16, $d7, $0780 sound __, 5, $e6, $07a0 sound __, 16, $d2, $0740 endchannel -; f3bc7 -Cry_Caterpie_Ch6: ; f3bc7 +Cry_Caterpie_Ch6: sound_duty 2, 2, 1, 1 sound __, 16, $c7, $0753 sound __, 6, $b6, $0772 sound __, 16, $c2, $0711 endchannel -; f3bd6 -Cry_Caterpie_Ch8: ; f3bd6 +Cry_Caterpie_Ch8: noise __, 14, $f6, $4c noise __, 5, $e6, $3c noise __, 16, $f2, $4c endchannel -; f3be0 -Cry_Lapras_Ch5: ; f3be0 +Cry_Lapras_Ch5: sound_duty 0, 0, 3, 3 sound __, 7, $f7, $06c0 sound __, 16, $e7, $0700 @@ -1861,9 +1652,8 @@ Cry_Lapras_Ch5: ; f3be0 sound __, 5, $e4, $06e0 sound __, 9, $d1, $06d0 endchannel -; f3bf7 -Cry_Lapras_Ch6: ; f3bf7 +Cry_Lapras_Ch6: sound_duty 2, 2, 0, 0 sound __, 8, $e6, $0681 sound __, 15, $d5, $06c1 @@ -1871,43 +1661,38 @@ Cry_Lapras_Ch6: ; f3bf7 sound __, 5, $d4, $06a1 sound __, 9, $c1, $0691 endchannel -; f3c0e -Cry_Lapras_Ch8: ; f3c0e +Cry_Lapras_Ch8: noise __, 11, $a6, $3c noise __, 15, $94, $2c noise __, 6, $a3, $3c noise __, 9, $91, $2c endchannel -; f3c1b -Cry_Golem_Ch5: ; f3c1b +Cry_Golem_Ch5: sound_duty 1, 1, 2, 2 sound __, 13, $f2, $0440 sound __, 16, $e3, $04a0 sound __, 5, $d2, $0490 sound __, 9, $d1, $0480 endchannel -; f3c2e -Cry_Golem_Ch6: ; f3c2e +Cry_Golem_Ch6: sound_duty 2, 3, 2, 3 sound __, 12, $d2, $0438 sound __, 15, $c6, $0498 sound __, 4, $b2, $0488 sound __, 9, $b1, $0478 endchannel -; f3c41 -Cry_Golem_Ch8: ; f3c41 +Cry_Golem_Ch8: noise __, 11, $e6, $6c noise __, 16, $d2, $5c noise __, 4, $c2, $6c noise __, 9, $d1, $5c endchannel -; f3c4e -Cry_Blastoise_Ch5: ; f3c4e +Cry_Blastoise_Ch5: sound_duty 3, 0, 3, 0 sound __, 16, $f6, $05c0 sound __, 9, $e3, $05bc @@ -1916,9 +1701,8 @@ Cry_Blastoise_Ch5: ; f3c4e sound __, 7, $c2, $05f0 sound __, 9, $b1, $0600 endchannel -; f3c69 -Cry_Blastoise_Ch6: ; f3c69 +Cry_Blastoise_Ch6: sound_duty 1, 2, 1, 2 sound __, 15, $c6, $04b1 sound __, 8, $c3, $04ad @@ -1927,9 +1711,8 @@ Cry_Blastoise_Ch6: ; f3c69 sound __, 7, $a2, $04e1 sound __, 9, $91, $04f1 endchannel -; f3c84 -Cry_Blastoise_Ch8: ; f3c84 +Cry_Blastoise_Ch8: noise __, 11, $e6, $5c noise __, 11, $d6, $6c noise __, 5, $c2, $4c @@ -1937,32 +1720,28 @@ Cry_Blastoise_Ch8: ; f3c84 noise __, 9, $b3, $4c noise __, 9, $a1, $5c endchannel -; f3c97 -Cry_Pidgeotto_Ch5: ; f3c97 +Cry_Pidgeotto_Ch5: sound_duty 0, 0, 3, 3 sound __, 9, $e4, $0790 sound __, 16, $f5, $07c0 sound __, 9, $d1, $07d8 endchannel -; f3ca6 -Cry_Pidgeotto_Ch6: ; f3ca6 +Cry_Pidgeotto_Ch6: sound_duty 1, 1, 2, 2 sound __, 11, $c4, $0771 sound __, 16, $b6, $07a2 sound __, 9, $a1, $07b7 endchannel -; f3cb5 -Cry_Pidgeotto_Ch8: ; f3cb5 +Cry_Pidgeotto_Ch8: noise __, 9, $e4, $4c noise __, 15, $c4, $3c noise __, 9, $d1, $2c endchannel -; f3cbf -Cry_Paras_Ch5: ; f3cbf +Cry_Paras_Ch5: sound_duty 0, 0, 3, 3 sound __, 7, $f2, $0600 sound __, 7, $e2, $0640 @@ -1973,9 +1752,8 @@ Cry_Paras_Ch5: ; f3cbf sound __, 7, $b2, $0780 sound __, 9, $a1, $07c0 endchannel -; f3ce2 -Cry_Paras_Ch6: ; f3ce2 +Cry_Paras_Ch6: sound_duty 1, 0, 1, 0 sound __, 4, $8, $0001 sound __, 7, $c2, $05c1 @@ -1987,9 +1765,8 @@ Cry_Paras_Ch6: ; f3ce2 sound __, 7, $a2, $0742 sound __, 9, $81, $0781 endchannel -; f3d09 -Cry_Paras_Ch8: ; f3d09 +Cry_Paras_Ch8: noise __, 7, $8, $1 noise __, 6, $e2, $5c noise __, 6, $c2, $4c @@ -2000,9 +1777,8 @@ Cry_Paras_Ch8: ; f3d09 noise __, 6, $92, $1a noise __, 9, $81, $18 endchannel -; f3d25 -Cry_Weedle_Ch5: ; f3d25 +Cry_Weedle_Ch5: sound_duty 0, 0, 3, 3 sound __, 5, $f3, $0780 sound __, 16, $e7, $0700 @@ -2011,9 +1787,8 @@ Cry_Weedle_Ch5: ; f3d25 sound __, 5, $d2, $06f0 sound __, 9, $c1, $06e0 endchannel -; f3d40 -Cry_Weedle_Ch6: ; f3d40 +Cry_Weedle_Ch6: sound_duty 2, 2, 1, 1 sound __, 7, $c3, $0701 sound __, 15, $b7, $0681 @@ -2022,9 +1797,8 @@ Cry_Weedle_Ch6: ; f3d40 sound __, 5, $b2, $0672 sound __, 9, $a1, $0661 endchannel -; f3d5b -Cry_Weedle_Ch8: ; f3d5b +Cry_Weedle_Ch8: noise __, 7, $e3, $5c noise __, 15, $d6, $4c noise __, 7, $c6, $3c @@ -2032,35 +1806,31 @@ Cry_Weedle_Ch8: ; f3d5b noise __, 4, $a2, $5c noise __, 9, $b1, $6c endchannel -; f3d6e -Cry_Ekans_Ch5: ; f3d6e +Cry_Ekans_Ch5: sound_duty 3, 3, 0, 0 sound __, 16, $f7, $0500 sound __, 16, $e7, $0508 sound __, 9, $b4, $0480 sound __, 16, $a2, $0460 endchannel -; f3d81 -Cry_Ekans_Ch6: ; f3d81 +Cry_Ekans_Ch6: sound_duty 0, 1, 0, 1 sound __, 15, $d7, $0481 sound __, 15, $c7, $0489 sound __, 11, $b4, $0401 sound __, 16, $c2, $03e1 endchannel -; f3d94 -Cry_Ekans_Ch8: ; f3d94 +Cry_Ekans_Ch8: noise __, 15, $f7, $7c noise __, 13, $f6, $6c noise __, 10, $e4, $7c noise __, 16, $e2, $6c endchannel -; f3da1 -Cry_Metapod_Ch5: ; f3da1 +Cry_Metapod_Ch5: sound_duty 1, 1, 3, 3 sound __, 8, $d6, $07e1 sound __, 7, $c6, $07e2 @@ -2071,9 +1841,8 @@ Cry_Metapod_Ch5: ; f3da1 sound __, 7, $b6, $07e0 sound __, 9, $a1, $07df endchannel -; f3dc4 -Cry_Metapod_Ch6: ; f3dc4 +Cry_Metapod_Ch6: sound_duty 0, 1, 0, 1 sound __, 7, $c3, $07c9 sound __, 7, $b3, $07c7 @@ -2082,18 +1851,16 @@ Cry_Metapod_Ch6: ; f3dc4 sound __, 7, $c3, $07c9 sound __, 16, $a2, $07c5 endchannel -; f3ddf -Cry_Metapod_Ch8: ; f3ddf +Cry_Metapod_Ch8: noise __, 14, $19, $7c noise __, 14, $f7, $8c noise __, 13, $d6, $7c noise __, 9, $c4, $6c noise __, 16, $b3, $5c endchannel -; f3def -Cry_Venonat_Ch5: ; f3def +Cry_Venonat_Ch5: sound_duty 0, 0, 3, 3 sound __, 7, $f7, $0740 sound __, 13, $e6, $0744 @@ -2102,9 +1869,8 @@ Cry_Venonat_Ch5: ; f3def sound __, 4, $c3, $0780 sound __, 9, $d1, $07a0 endchannel -; f3e0a -Cry_Venonat_Ch6: ; f3e0a +Cry_Venonat_Ch6: sound_duty 2, 2, 0, 0 sound __, 7, $c7, $0701 sound __, 12, $b6, $0702 @@ -2113,9 +1879,8 @@ Cry_Venonat_Ch6: ; f3e0a sound __, 4, $a3, $0741 sound __, 9, $91, $0762 endchannel -; f3e25 -Cry_Venonat_Ch8: ; f3e25 +Cry_Venonat_Ch8: noise __, 4, $e2, $3c noise __, 9, $d6, $4c noise __, 6, $d4, $3c @@ -2123,9 +1888,8 @@ Cry_Venonat_Ch8: ; f3e25 noise __, 3, $e2, $3c noise __, 9, $d1, $2c endchannel -; f3e38 -Cry_Squirtle_Ch5: ; f3e38 +Cry_Squirtle_Ch5: sound_duty 0, 1, 3, 3 sound __, 16, $f0, $0705 sound __, 11, $e0, $0700 @@ -2134,9 +1898,8 @@ Cry_Squirtle_Ch5: ; f3e38 sound __, 7, $b2, $0620 sound __, 9, $a1, $0624 endchannel -; f3e53 -Cry_Squirtle_Ch6: ; f3e53 +Cry_Squirtle_Ch6: sound_duty 2, 0, 2, 0 sound __, 16, $b0, $06c3 sound __, 11, $a0, $06c1 @@ -2145,18 +1908,16 @@ Cry_Squirtle_Ch6: ; f3e53 sound __, 7, $82, $05e1 sound __, 9, $61, $05e8 endchannel -; f3e6e -Cry_Squirtle_Ch8: ; f3e6e +Cry_Squirtle_Ch8: noise __, 7, $e6, $4c noise __, 16, $d6, $3c noise __, 11, $c5, $4a noise __, 2, $b2, $5b noise __, 16, $c2, $4c endchannel -; f3e7e -Cry_Fearow_Ch5: ; f3e7e +Cry_Fearow_Ch5: sound_duty 0, 0, 1, 1 sound __, 11, $f5, $0680 sound __, 4, $e2, $06a0 @@ -2167,9 +1928,8 @@ Cry_Fearow_Ch5: ; f3e7e sound __, 4, $d2, $06c0 sound __, 9, $c1, $06a0 endchannel -; f3ea1 -Cry_Fearow_Ch6: ; f3ea1 +Cry_Fearow_Ch6: sound_duty 3, 3, 0, 0 sound __, 10, $d5, $0631 sound __, 4, $d2, $0652 @@ -2180,9 +1940,8 @@ Cry_Fearow_Ch6: ; f3ea1 sound __, 4, $c2, $0671 sound __, 9, $b1, $0651 endchannel -; f3ec4 -Cry_Fearow_Ch8: ; f3ec4 +Cry_Fearow_Ch8: noise __, 7, $e3, $4c noise __, 5, $c3, $3c noise __, 6, $d4, $3c @@ -2190,61 +1949,54 @@ Cry_Fearow_Ch8: ; f3ec4 noise __, 7, $b4, $3c noise __, 9, $c1, $2c endchannel -; f3ed7 -Cry_Growlithe_Ch5: ; f3ed7 +Cry_Growlithe_Ch5: sound_duty 1, 1, 2, 2 sound __, 4, $f4, $0641 sound __, 14, $d6, $0721 sound __, 9, $f4, $0719 sound __, 9, $c1, $071a endchannel -; f3eea -Cry_Growlithe_Ch6: ; f3eea +Cry_Growlithe_Ch6: sound_duty 0, 3, 0, 3 sound __, 5, $f4, $0580 sound __, 15, $e6, $06e0 sound __, 9, $d5, $06d8 sound __, 9, $d1, $06dc endchannel -; f3efd -Cry_Growlithe_Ch8: ; f3efd +Cry_Growlithe_Ch8: noise __, 6, $c4, $46 noise __, 14, $a5, $44 noise __, 9, $c4, $45 noise __, 9, $b1, $44 endchannel -; f3f0a -Cry_Krabby_Ch5: ; f3f0a +Cry_Krabby_Ch5: sound_duty 0, 0, 3, 3 sound __, 14, $f1, $0511 sound __, 14, $e1, $0515 sound __, 14, $e1, $0511 sound __, 9, $d1, $0511 endchannel -; f3f1d -Cry_Krabby_Ch6: ; f3f1d +Cry_Krabby_Ch6: sound_duty 1, 1, 1, 0 sound __, 13, $e1, $050c sound __, 13, $d1, $0510 sound __, 15, $c1, $050c sound __, 9, $c1, $050a endchannel -; f3f30 -Cry_Krabby_Ch8: ; f3f30 +Cry_Krabby_Ch8: noise __, 15, $f2, $65 noise __, 14, $e2, $55 noise __, 15, $d2, $56 noise __, 9, $d1, $66 endchannel -; f3f3d -Cry_Psyduck_Ch5: ; f3f3d +Cry_Psyduck_Ch5: sound_duty 3, 2, 1, 0 sound __, 4, $f3, $0564 sound __, 3, $e2, $0544 @@ -2255,9 +2007,8 @@ Cry_Psyduck_Ch5: ; f3f3d sound __, 5, $e4, $04e4 sound __, 9, $d1, $0502 endchannel -; f3f60 -Cry_Psyduck_Ch6: ; f3f60 +Cry_Psyduck_Ch6: sound_duty 0, 3, 0, 3 sound __, 4, $d3, $0560 sound __, 3, $c2, $0540 @@ -2267,32 +2018,28 @@ Cry_Psyduck_Ch6: ; f3f60 sound __, 4, $d3, $0520 sound __, 4, $c4, $04e0 sound __, 9, $c1, $0500 -Cry_Psyduck_Ch8: ; f3f82 +Cry_Psyduck_Ch8: endchannel -; f3f83 -Cry_Rattata_Ch5: ; f3f83 +Cry_Rattata_Ch5: sound_duty 1, 0, 1, 0 sound __, 3, $3d, $0381 sound __, 8, $f5, $0601 sound __, 2, $c2, $0481 sound __, 9, $91, $0381 endchannel -; f3f96 -Cry_Rattata_Ch6: ; f3f96 +Cry_Rattata_Ch6: sound_duty 2, 3, 2, 3 sound __, 3, $3e, $05b0 sound __, 8, $d5, $075d sound __, 2, $b2, $06b0 sound __, 9, $61, $05b0 endchannel -; f3fa9 -Cry_Rattata_Ch8: ; f3fa9 +Cry_Rattata_Ch8: noise __, 3, $92, $49 noise __, 8, $b5, $29 noise __, 2, $a2, $39 noise __, 9, $91, $49 endchannel -; f3fb6 diff --git a/audio/cry_pointers.asm b/audio/cry_pointers.asm index 9ea69efdd8f..ec6b17e01eb 100644 --- a/audio/cry_pointers.asm +++ b/audio/cry_pointers.asm @@ -1,4 +1,4 @@ -Cries: ; e91b0 +Cries: dba Cry_Nidoran_M dba Cry_Nidoran_F dba Cry_Slowpoke @@ -67,4 +67,3 @@ Cries: ; e91b0 dba Cry_Aipom dba Cry_Dunsparce dba Cry_Donphan -; e927c diff --git a/audio/drumkits.asm b/audio/drumkits.asm index 4e311a2e577..a4fa4109b28 100644 --- a/audio/drumkits.asm +++ b/audio/drumkits.asm @@ -1,13 +1,12 @@ -Drumkits: ; e8e52 +Drumkits: dw Drumkit0 dw Drumkit1 dw Drumkit2 dw Drumkit3 dw Drumkit4 dw Drumkit5 -; e8e5e -Drumkit0: ; e8e5e +Drumkit0: dw Drum00 ; rest dw Snare1 ; c dw Snare2 ; c# @@ -21,7 +20,7 @@ Drumkit0: ; e8e5e dw Snare6 ; a dw Snare7 ; a# dw HiHat2 ; b -Drumkit1: ; e8e78 +Drumkit1: dw Drum00 dw HiHat1 dw Snare5 @@ -35,7 +34,7 @@ Drumkit1: ; e8e78 dw Snare9 dw Snare10 dw Snare11 -Drumkit2: ; e8e92 +Drumkit2: dw Drum00 dw Snare1 dw Snare9 @@ -49,7 +48,7 @@ Drumkit2: ; e8e92 dw Snare6 dw Snare7 dw HiHat2 -Drumkit3: ; e8eac +Drumkit3: dw Drum21 dw Snare12 dw Snare13 @@ -63,7 +62,7 @@ Drumkit3: ; e8eac dw Drum21 dw Kick2 dw Crash2 -Drumkit4: ; e8ec6 +Drumkit4: dw Drum21 dw Drum20 dw Snare13 @@ -77,7 +76,7 @@ Drumkit4: ; e8ec6 dw Drum36 dw Kick2 dw Crash1 -Drumkit5: ; e8ee0 +Drumkit5: dw Drum00 dw Snare9 dw Snare10 @@ -91,35 +90,29 @@ Drumkit5: ; e8ee0 dw Snare14 dw Snare13 dw Kick2 -; e8efa -Drum00: ; e8efa +Drum00: ; unused noise C#, 1, $11, $00 endchannel -; e8efe -Snare1: ; e8efe +Snare1: noise C#, 1, $c1, $33 endchannel -; e8f02 -Snare2: ; e8f02 +Snare2: noise C#, 1, $b1, $33 endchannel -; e8f06 -Snare3: ; e8f06 +Snare3: noise C#, 1, $a1, $33 endchannel -; e8f0a -Snare4: ; e8f0a +Snare4: noise C#, 1, $81, $33 endchannel -; e8f0e -Drum05: ; e8f0e +Drum05: noise C#, 8, $84, $37 noise C#, 7, $84, $36 noise C#, 6, $83, $35 @@ -127,175 +120,142 @@ Drum05: ; e8f0e noise C#, 4, $82, $33 noise C#, 3, $81, $32 endchannel -; e8f21 -Triangle1: ; e8f21 +Triangle1: noise C#, 1, $51, $2a endchannel -; e8f25 -Triangle2: ; e8f25 +Triangle2: noise C#, 2, $41, $2b noise C#, 1, $61, $2a endchannel -; e8f2c -HiHat1: ; e8f2c +HiHat1: noise C#, 1, $81, $10 endchannel -; e8f30 -Snare5: ; e8f30 +Snare5: noise C#, 1, $82, $23 endchannel -; e8f34 -Snare6: ; e8f34 +Snare6: noise C#, 1, $82, $25 endchannel -; e8f38 -Snare7: ; e8f38 +Snare7: noise C#, 1, $82, $26 endchannel -; e8f3c -HiHat2: ; e8f3c +HiHat2: noise C#, 1, $a1, $10 endchannel -; e8f40 -HiHat3: ; e8f40 +HiHat3: noise C#, 1, $a2, $11 endchannel -; e8f44 -Snare8: ; e8f44 +Snare8: noise C#, 1, $a2, $50 endchannel -; e8f48 -Triangle3: ; e8f48 +Triangle3: noise C#, 1, $a1, $18 noise C#, 1, $31, $33 endchannel -; e8f4f -Triangle4: ; e8f4f +Triangle4: noise C#, 3, $91, $28 noise C#, 1, $71, $18 endchannel -; e8f56 -Snare9: ; e8f56 +Snare9: noise C#, 1, $91, $22 endchannel -; e8f5a -Snare10: ; e8f5a +Snare10: noise C#, 1, $71, $22 endchannel -; e8f5e -Snare11: ; e8f5e +Snare11: noise C#, 1, $61, $22 endchannel -; e8f62 -Drum20: ; e8f62 +Drum20: noise C#, 1, $11, $11 endchannel -; e8f66 -Drum21: ; e8f66 +Drum21: endchannel -; e8f67 -Snare12: ; e8f67 +Snare12: noise C#, 1, $91, $33 endchannel -; e8f6b -Snare13: ; e8f6b +Snare13: noise C#, 1, $51, $32 endchannel -; e8f6f -Snare14: ; e8f6f +Snare14: noise C#, 1, $81, $31 endchannel -; e8f73 -Kick1: ; e8f73 +Kick1: noise C#, 1, $88, $6b noise C#, 1, $71, $00 endchannel -; e8f7a -Triangle5: ; e8f7a +Triangle5: noise D_, 1, $91, $18 endchannel -; e8f7e -Drum27: ; e8f7e +Drum27: noise C#, 8, $92, $10 endchannel -; e8f82 -Drum28: ; e8f82 +Drum28: noise D_, 4, $91, $00 noise D_, 4, $11, $00 endchannel -; e8f89 -Drum29: ; e8f89 +Drum29: noise D_, 4, $91, $11 noise D_, 4, $11, $00 endchannel -; e8f90 -Crash1: ; e8f90 +Crash1: noise D_, 4, $88, $15 noise C#, 1, $65, $12 endchannel -; e8f97 -Drum31: ; e8f97 +Drum31: noise D_, 4, $51, $21 noise D_, 4, $11, $11 endchannel -; e8f9e -Drum32: ; e8f9e +Drum32: noise D_, 4, $51, $50 noise D_, 4, $11, $11 endchannel -; e8fa5 -Drum33: ; e8fa5 +Drum33: noise C#, 1, $a1, $31 endchannel -; e8fa9 -Crash2: ; e8fa9 +Crash2: noise C#, 1, $84, $12 endchannel -; e8fad -Drum35: ; e8fad +Drum35: noise D_, 4, $81, $00 noise D_, 4, $11, $00 endchannel -; e8fb4 -Drum36: ; e8fb4 +Drum36: noise D_, 4, $81, $21 noise D_, 4, $11, $11 endchannel -; e8fbb -Kick2: ; e8fbb +Kick2: noise C#, 1, $a8, $6b noise C#, 1, $71, $00 endchannel -; e8fc2 diff --git a/audio/engine.asm b/audio/engine.asm index d0f64088b1a..a3d68a1b100 100644 --- a/audio/engine.asm +++ b/audio/engine.asm @@ -6,7 +6,7 @@ ; FadeMusic ; PlayStereoSFX -_MapSetup_Sound_Off:: ; e8000 +_MapSetup_Sound_Off:: ; restart sound operation ; clear all relevant hardware registers & wram push hl @@ -56,9 +56,8 @@ _MapSetup_Sound_Off:: ; e8000 pop hl ret -; e803d -MusicFadeRestart: ; e803d +MusicFadeRestart: ; restart but keep the music id to fade in to ld a, [wMusicFadeID + 1] push af @@ -71,23 +70,20 @@ MusicFadeRestart: ; e803d ld [wMusicFadeID + 1], a ret -; e8051 -MusicOn: ; e8051 +MusicOn: ld a, 1 ld [wMusicPlaying], a ret -; e8057 -MusicOff: ; e8057 +MusicOff: xor a ld [wMusicPlaying], a ret -; e805c -_UpdateSound:: ; e805c +_UpdateSound:: ; called once per frame ; no use updating audio if it's not playing ld a, [wMusicPlaying] @@ -216,9 +212,8 @@ _UpdateSound:: ; e805c ld [rNR51], a ret -; e8125 -UpdateChannels: ; e8125 +UpdateChannels: ld hl, .ChannelFnPtrs ld a, [wCurChannel] and $7 @@ -510,9 +505,8 @@ endr ld [rNR44], a ret -; e82e7 -_CheckSFX: ; e82e7 +_CheckSFX: ; return carry if any sfx channels are active ld hl, wChannel5Flags1 bit SOUND_CHANNEL_ON, [hl] @@ -533,9 +527,8 @@ _CheckSFX: ; e82e7 scf ret -; e8307 -PlayDanger: ; e8307 +PlayDanger: ld a, [wLowHealthAlarm] bit DANGER_ON_F, a ret z @@ -595,23 +588,20 @@ PlayDanger: ; e8307 ld [wSoundOutput], a ret -; e8350 -DangerSoundHigh: ; e8350 +DangerSoundHigh: db $80 ; duty 50% db $e2 ; volume 14, envelope decrease sweep 2 db $50 ; frequency: $750 db $87 ; restart sound -; e8354 -DangerSoundLow: ; e8354 +DangerSoundLow: db $80 ; duty 50% db $e2 ; volume 14, envelope decrease sweep 2 db $ee ; frequency: $6ee db $86 ; restart sound -; e8358 -FadeMusic: ; e8358 +FadeMusic: ; fade music if applicable ; usage: ; write to wMusicFade @@ -723,9 +713,8 @@ FadeMusic: ; e8358 ld [wVolume], a ret -; e83d1 -LoadNote: ; e83d1 +LoadNote: ; wait for pitch wheel to finish ld hl, CHANNEL_FLAGS2 add hl, bc @@ -845,9 +834,8 @@ LoadNote: ; e83d1 ld [hl], a ret -; e8466 -HandleTrackVibrato: ; e8466 +HandleTrackVibrato: ; handle duty, cry pitch, and vibrato ld hl, CHANNEL_FLAGS2 add hl, bc @@ -964,9 +952,8 @@ HandleTrackVibrato: ; e8466 .quit ret -; e84f9 -ApplyPitchWheel: ; e84f9 +ApplyPitchWheel: ; quit if pitch wheel inactive ld hl, CHANNEL_FLAGS2 add hl, bc @@ -1081,9 +1068,8 @@ ApplyPitchWheel: ; e84f9 set NOTE_DUTY_OVERRIDE, [hl] ret -; e858c -HandleNoise: ; e858c +HandleNoise: ; is noise sampling on? ld hl, CHANNEL_FLAGS1 add hl, bc @@ -1109,9 +1095,8 @@ HandleNoise: ; e858c ld [wNoiseSampleDelay], a ret -; e85af -ReadNoiseSample: ; e85af +ReadNoiseSample: ; sample struct: ; [wx] [yy] [zz] ; w: ? either 2 or 3 @@ -1161,9 +1146,8 @@ ReadNoiseSample: ; e85af .quit ret -; e85e1 -ParseMusic: ; e85e1 +ParseMusic: ; parses until a note is read or the song is ended call GetMusicByte ; store next byte in a cp $ff ; is the song over? @@ -1271,9 +1255,8 @@ ParseMusic: ; e85e1 ld [hli], a ; bank ret -; e8679 -RestoreVolume: ; e8679 +RestoreVolume: ; ch5 only ld a, [wCurChannel] cp CHAN5 @@ -1292,9 +1275,8 @@ RestoreVolume: ; e8679 ld [wSFXPriority], a ret -; e8698 -ParseSFXOrRest: ; e8698 +ParseSFXOrRest: ; turn noise sampling on ld hl, CHANNEL_NOTE_FLAGS add hl, bc @@ -1324,9 +1306,8 @@ ParseSFXOrRest: ; e8698 ld [hl], a ret -; e86c5 -GetNoiseSample: ; e86c5 +GetNoiseSample: ; load ptr to sample header in wNoiseSampleAddress ; are we on the last channel? ld a, [wCurChannel] @@ -1382,9 +1363,8 @@ GetNoiseSample: ; e86c5 ld [wNoiseSampleDelay], a ret -; e870f -ParseMusicCommand: ; e870f +ParseMusicCommand: ; reload command ld a, [wCurMusicByte] ; get command # @@ -1401,9 +1381,8 @@ ParseMusicCommand: ; e870f ld l, a jp hl -; e8720 -MusicCommands: ; e8720 +MusicCommands: ; entries correspond to macros/sound.asm enumeration dw Music_Octave8 ; octave 8 dw Music_Octave7 ; octave 7 @@ -1453,21 +1432,19 @@ MusicCommands: ; e8720 dw Music_LoopChannel ; loop dw Music_CallChannel ; call dw Music_EndChannel ; return -; e8780 -MusicF1: ; e8780 -MusicF2: ; e8780 -MusicF3: ; e8780 -MusicF4: ; e8780 -MusicF5: ; e8780 -MusicF6: ; e8780 -MusicF7: ; e8780 -MusicF8: ; e8780 +MusicF1: +MusicF2: +MusicF3: +MusicF4: +MusicF5: +MusicF6: +MusicF7: +MusicF8: ret -; e8781 -Music_EndChannel: ; e8781 +Music_EndChannel: ; called when $ff is encountered w/ subroutine flag set ; end music stream ; return to caller of the subroutine @@ -1488,9 +1465,8 @@ Music_EndChannel: ; e8781 ld [hl], d ret -; e8796 -Music_CallChannel: ; e8796 +Music_CallChannel: ; call music stream (subroutine) ; parameters: ll hh ; pointer to subroutine ; get pointer from next 2 bytes @@ -1523,9 +1499,8 @@ Music_CallChannel: ; e8796 set SOUND_SUBROUTINE, [hl] ret -; e87bc -Music_JumpChannel: ; e87bc +Music_JumpChannel: ; jump ; parameters: ll hh ; pointer ; get pointer from next 2 bytes @@ -1540,9 +1515,8 @@ Music_JumpChannel: ; e87bc ld [hl], d ret -; e87cc -Music_LoopChannel: ; e87cc +Music_LoopChannel: ; loops xx - 1 times ; 00: infinite ; params: 3 @@ -1603,9 +1577,8 @@ Music_LoopChannel: ; e87cc ld [hl], e ret -; e880e -Music_SetCondition: ; e880e +Music_SetCondition: ; set condition for a jump ; used with FB ; params: 1 @@ -1618,9 +1591,8 @@ Music_SetCondition: ; e880e ld [hl], a ret -; e8817 -Music_JumpIf: ; e8817 +Music_JumpIf: ; conditional jump ; used with FA ; params: 3 @@ -1666,9 +1638,8 @@ Music_JumpIf: ; e8817 ld [hl], d ret -; e883e -MusicEE; e883e +MusicEE ; conditional jump ; checks a byte in ram corresponding to the current channel ; doesn't seem to be set by any commands @@ -1720,9 +1691,8 @@ MusicEE; e883e ld [hl], d ret -; e886d -MusicF9: ; e886d +MusicF9: ; sets some flag ; seems to be unused ; params: 0 @@ -1730,9 +1700,8 @@ MusicF9: ; e886d ld [wc2b5], a ret -; e8873 -MusicE2: ; e8873 +MusicE2: ; seems to have been dummied out ; params: 1 call GetMusicByte @@ -1744,9 +1713,8 @@ MusicE2: ; e8873 set SOUND_UNKN_0B, [hl] ret -; e8882 -Music_Vibrato: ; e8882 +Music_Vibrato: ; vibrato ; params: 2 ; 1: [xx] @@ -1801,9 +1769,8 @@ Music_Vibrato: ; e8882 ld [hl], a ret -; e88bd -Music_SlidePitchTo: ; e88bd +Music_SlidePitchTo: ; set the target for pitch wheel ; params: 2 ; note duration @@ -1834,9 +1801,8 @@ Music_SlidePitchTo: ; e88bd set SOUND_PITCH_WHEEL, [hl] ret -; e88e4 -Music_Tone: ; e88e4 +Music_Tone: ; tone ; params: 1 (dw) ld hl, CHANNEL_FLAGS2 @@ -1850,9 +1816,8 @@ Music_Tone: ; e88e4 ld [hl], a ret -; e88f7 -MusicE7: ; e88f7 +MusicE7: ; unused ; params: 1 ld hl, CHANNEL_FLAGS2 @@ -1864,9 +1829,8 @@ MusicE7: ; e88f7 ld [hl], a ret -; e8906 -Music_SoundDuty: ; e8906 +Music_SoundDuty: ; sequence of 4 duty cycles to be looped ; params: 1 (4 2-bit duty cycle arguments) ld hl, CHANNEL_FLAGS2 @@ -1886,9 +1850,8 @@ Music_SoundDuty: ; e8906 ld [hl], a ret -; e891e -MusicE8: ; e891e +MusicE8: ; unused ; params: 1 ld hl, CHANNEL_FLAGS2 @@ -1900,9 +1863,8 @@ MusicE8: ; e891e ld [hl], a ret -; e892d -Music_ToggleSFX: ; e892d +Music_ToggleSFX: ; toggle something ; params: none ld hl, CHANNEL_FLAGS1 @@ -1916,9 +1878,8 @@ Music_ToggleSFX: ; e892d set SOUND_SFX, [hl] ret -; e893b -Music_ToggleNoise: ; e893b +Music_ToggleNoise: ; toggle music noise sampling ; can't be used as a straight toggle since the param is not read from on->off ; params: @@ -1940,9 +1901,8 @@ Music_ToggleNoise: ; e893b ld [wMusicNoiseSampleSet], a ret -; e894f -Music_SFXToggleNoise: ; e894f +Music_SFXToggleNoise: ; toggle sfx noise sampling ; params: ; on: 1 @@ -1963,9 +1923,8 @@ Music_SFXToggleNoise: ; e894f ld [wSFXNoiseSampleSet], a ret -; e8963 -Music_NoteType: ; e8963 +Music_NoteType: ; note length ; # frames per 16th note ; intensity: see Music_Intensity @@ -1983,9 +1942,8 @@ Music_NoteType: ; e8963 call Music_Intensity ret -; e8977 -Music_SoundStatus: ; e8977 +Music_SoundStatus: ; update sound status ; params: 1 call GetMusicByte @@ -1995,9 +1953,8 @@ Music_SoundStatus: ; e8977 set NOTE_UNKN_3, [hl] ret -; e8984 -Music_DutyCycle: ; e8984 +Music_DutyCycle: ; duty cycle ; params: 1 call GetMusicByte @@ -2009,9 +1966,8 @@ Music_DutyCycle: ; e8984 ld [hl], a ret -; e8991 -Music_Intensity: ; e8991 +Music_Intensity: ; intensity ; params: 1 ; hi: pressure @@ -2022,9 +1978,8 @@ Music_Intensity: ; e8991 ld [hl], a ret -; e899a -Music_Tempo: ; e899a +Music_Tempo: ; global tempo ; params: 2 ; de: tempo @@ -2035,16 +1990,15 @@ Music_Tempo: ; e899a call SetGlobalTempo ret -; e89a6 -Music_Octave8: ; e89a6 -Music_Octave7: ; e89a6 -Music_Octave6: ; e89a6 -Music_Octave5: ; e89a6 -Music_Octave4: ; e89a6 -Music_Octave3: ; e89a6 -Music_Octave2: ; e89a6 -Music_Octave1: ; e89a6 +Music_Octave8: +Music_Octave7: +Music_Octave6: +Music_Octave5: +Music_Octave4: +Music_Octave3: +Music_Octave2: +Music_Octave1: ; set octave based on lo nybble of the command ld hl, CHANNEL_OCTAVE add hl, bc @@ -2053,9 +2007,8 @@ Music_Octave1: ; e89a6 ld [hl], a ret -; e89b1 -Music_ForceOctave: ; e89b1 +Music_ForceOctave: ; set starting octave ; this forces all notes up by the starting octave ; params: 1 @@ -2065,9 +2018,8 @@ Music_ForceOctave: ; e89b1 ld [hl], a ret -; e89ba -Music_StereoPanning: ; e89ba +Music_StereoPanning: ; stereo panning ; params: 1 ; stereo on? @@ -2078,9 +2030,8 @@ Music_StereoPanning: ; e89ba call GetMusicByte ret -; e89c5 -Music_Panning: ; e89c5 +Music_Panning: ; force panning ; params: 1 call SetLRTracks @@ -2091,9 +2042,8 @@ Music_Panning: ; e89c5 ld [hl], a ret -; e89d2 -Music_Volume: ; e89d2 +Music_Volume: ; set volume ; params: 1 ; see Volume @@ -2109,9 +2059,8 @@ Music_Volume: ; e89d2 ld [wVolume], a ret -; e89e1 -Music_TempoRelative: ; e89e1 +Music_TempoRelative: ; set global tempo to current channel tempo +/- param ; params: 1 signed call GetMusicByte @@ -2137,27 +2086,24 @@ Music_TempoRelative: ; e89e1 call SetGlobalTempo ret -; e89fd -Music_SFXPriorityOn: ; e89fd +Music_SFXPriorityOn: ; turn sfx priority on ; params: none ld a, 1 ld [wSFXPriority], a ret -; e8a03 -Music_SFXPriorityOff: ; e8a03 +Music_SFXPriorityOff: ; turn sfx priority off ; params: none xor a ld [wSFXPriority], a ret -; e8a08 -Music_RestartChannel: ; e8a08 +Music_RestartChannel: ; restart current channel from channel header (same bank) ; params: 2 (5) ; ll hh: pointer to new channel header @@ -2191,9 +2137,8 @@ Music_RestartChannel: ; e8a08 pop bc ; restore current channel ret -; e8a30 -Music_NewSong: ; e8a30 +Music_NewSong: ; new song ; params: 2 ; de: song id @@ -2206,9 +2151,8 @@ Music_NewSong: ; e8a30 pop bc ret -; e8a3e -GetMusicByte: ; e8a3e +GetMusicByte: ; returns byte from current address in a ; advances to next byte in music data ; input: bc = start of current channel @@ -2240,9 +2184,8 @@ GetMusicByte: ; e8a3e ld a, [wCurMusicByte] ret -; e8a5d -GetFrequency: ; e8a5d +GetFrequency: ; generate frequency ; input: ; d: octave @@ -2294,9 +2237,8 @@ GetFrequency: ; e8a5d ld d, a ret -; e8a8d -SetNoteDuration: ; e8a8d +SetNoteDuration: ; input: a = note duration in 16ths ; store delay units in de inc a @@ -2335,9 +2277,8 @@ SetNoteDuration: ; e8a8d ld [hl], d ret -; e8ab8 -.Multiply: ; e8ab8 +.Multiply: ; multiplies a and de ; adds the result to l ; stores the result in hl @@ -2358,9 +2299,8 @@ SetNoteDuration: ; e8a8d jr nz, .loop ret -; e8ac7 -SetGlobalTempo: ; e8ac7 +SetGlobalTempo: push bc ; save current channel ; are we dealing with music or sfx? ld a, [wCurChannel] @@ -2389,9 +2329,8 @@ SetGlobalTempo: ; e8ac7 pop bc ; restore current channel ret -; e8b03 -Tempo: ; e8b03 +Tempo: ; input: ; de: note length ; update Tempo @@ -2407,18 +2346,16 @@ Tempo: ; e8b03 ld [hl], a ret -; e8b11 -StartChannel: ; e8b11 +StartChannel: call SetLRTracks ld hl, CHANNEL_FLAGS1 add hl, bc set SOUND_CHANNEL_ON, [hl] ; turn channel on ret -; e8b1b -SetLRTracks: ; e8b1b +SetLRTracks: ; set tracks for a the current channel to default ; seems to be redundant since this is overwritten by stereo data later push de @@ -2438,9 +2375,8 @@ SetLRTracks: ; e8b1b pop de ret -; e8b30 -_PlayMusic:: ; e8b30 +_PlayMusic:: ; load music call MusicOff ld hl, wMusicID @@ -2482,9 +2418,8 @@ _PlayMusic:: ; e8b30 call MusicOn ret -; e8b79 -_PlayCry:: ; e8b79 +_PlayCry:: ; Play cry de using parameters: ; wCryPitch ; wCryLength @@ -2595,9 +2530,8 @@ _PlayCry:: ; e8b79 call MusicOn ret -; e8c04 -_PlaySFX:: ; e8c04 +_PlaySFX:: ; clear channels if they aren't already call MusicOff ld hl, wChannel5Flags1 @@ -2696,9 +2630,8 @@ _PlaySFX:: ; e8c04 ld [wSFXPriority], a ret -; e8ca6 -PlayStereoSFX:: ; e8ca6 +PlayStereoSFX:: ; play sfx de call MusicOff @@ -2799,9 +2732,8 @@ PlayStereoSFX:: ; e8ca6 call MusicOn ret -; e8d1b -LoadChannel: ; e8d1b +LoadChannel: ; prep channel for use ; input: ; de: @@ -2845,9 +2777,8 @@ LoadChannel: ; e8d1b ld [hl], a ret -; e8d5b -ChannelInit: ; e8d5b +ChannelInit: ; make sure channel is cleared ; set default tempo and note length in case nothing is loaded ; input: @@ -2877,9 +2808,8 @@ ChannelInit: ; e8d5b pop de ret -; e8d76 -LoadMusicByte:: ; e8d76 +LoadMusicByte:: ; input: ; de = current music address ; output: @@ -2889,7 +2819,6 @@ LoadMusicByte:: ; e8d76 ld a, [wCurMusicByte] ret -; e8d80 INCLUDE "audio/notes.asm" @@ -2899,7 +2828,7 @@ INCLUDE "audio/wave_samples.asm" INCLUDE "audio/drumkits.asm" -GetLRTracks: ; e8fc2 +GetLRTracks: ; gets the default sound l/r channels ; stores mono/stereo table in hl ld a, [wOptions] @@ -2913,22 +2842,19 @@ GetLRTracks: ; e8fc2 ld hl, StereoTracks ret -; e8fd1 -MonoTracks: ; e8fd1 +MonoTracks: ; bit corresponds to track # ; hi: left channel ; lo: right channel db $11, $22, $44, $88 -; e8fd5 -StereoTracks: ; e8fd5 +StereoTracks: ; made redundant ; seems to be modified on a per-song basis db $11, $22, $44, $88 -; e8fd9 -ChannelPointers: ; e8fd9 +ChannelPointers: ; music channels dw wChannel1 dw wChannel2 @@ -2939,9 +2865,8 @@ ChannelPointers: ; e8fd9 dw wChannel6 dw wChannel7 dw wChannel8 -; e8fe9 -ClearChannels:: ; e8fe9 +ClearChannels:: ; runs ClearChannel for all 4 channels ; doesn't seem to be used, but functionally identical to MapSetup_Sound_Off ld hl, rNR50 @@ -2958,9 +2883,8 @@ ClearChannels:: ; e8fe9 jr nz, .loop ret -; e8ffe -ClearChannel: ; e8ffe +ClearChannel: ; input: hl = beginning hw sound register (rNR10, rNR20, rNR30, rNR40) ; output: 00 00 80 00 80 @@ -2977,9 +2901,8 @@ ClearChannel: ; e8ffe ld [hli], a ; rNR14, rNR24, rNR34, rNR44 ; restart sound (freq hi = 0) ret -; e900a -PlayTrainerEncounterMusic:: ; e900a +PlayTrainerEncounterMusic:: ; input: e = trainer type ; turn fade off xor a @@ -2998,4 +2921,3 @@ PlayTrainerEncounterMusic:: ; e900a ld e, [hl] call PlayMusic ret -; e9027 diff --git a/audio/music/aftertherivalfight.asm b/audio/music/aftertherivalfight.asm index 27ca1dc4146..114a6fd5526 100644 --- a/audio/music/aftertherivalfight.asm +++ b/audio/music/aftertherivalfight.asm @@ -1,11 +1,10 @@ -Music_AfterTheRivalFight: ; f5127 +Music_AfterTheRivalFight: musicheader 4, 1, Music_AfterTheRivalFight_Ch1 musicheader 1, 2, Music_AfterTheRivalFight_Ch2 musicheader 1, 3, Music_AfterTheRivalFight_Ch3 musicheader 1, 4, Music_AfterTheRivalFight_Ch4 -; f5133 -Music_AfterTheRivalFight_Ch1: ; f5133 +Music_AfterTheRivalFight_Ch1: tempo 112 volume $77 dutycycle $0 @@ -23,9 +22,8 @@ Music_AfterTheRivalFight_Ch1: ; f5133 note G#, 2 note G#, 2 loopchannel 0, Music_AfterTheRivalFight_branch_f4fb1 -; f5153 -Music_AfterTheRivalFight_Ch2: ; f5153 +Music_AfterTheRivalFight_Ch2: dutycycle $1 vibrato $6, $35 stereopanning $f @@ -39,9 +37,8 @@ Music_AfterTheRivalFight_Ch2: ; f5153 note G#, 2 note G#, 2 loopchannel 0, Music_AfterTheRivalFight_branch_f502e -; f516a -Music_AfterTheRivalFight_Ch3: ; f516a +Music_AfterTheRivalFight_Ch3: notetype $c, $28 octave 3 note D#, 2 @@ -53,9 +50,8 @@ Music_AfterTheRivalFight_Ch3: ; f516a note F_, 2 note D#, 2 loopchannel 0, Music_AfterTheRivalFight_branch_f509d -; f517a -Music_AfterTheRivalFight_Ch4: ; f517a +Music_AfterTheRivalFight_Ch4: togglenoise $3 stereopanning $f notetype $c @@ -66,4 +62,3 @@ Music_AfterTheRivalFight_Ch4: ; f517a note D_, 2 note D_, 2 loopchannel 0, Music_AfterTheRivalFight_branch_f5118 -; f518a diff --git a/audio/music/azaleatown.asm b/audio/music/azaleatown.asm index 0bce049bf64..0b2304476a5 100644 --- a/audio/music/azaleatown.asm +++ b/audio/music/azaleatown.asm @@ -1,18 +1,17 @@ -Music_AzaleaTown: ; f57e8 +Music_AzaleaTown: musicheader 4, 1, Music_AzaleaTown_Ch1 musicheader 1, 2, Music_AzaleaTown_Ch2 musicheader 1, 3, Music_AzaleaTown_Ch3 musicheader 1, 4, Music_AzaleaTown_Ch4 -; f57f4 -Music_AzaleaTown_Ch1: ; f57f4 +Music_AzaleaTown_Ch1: tempo 160 volume $77 dutycycle $2 stereopanning $f notetype $c, $a1 note __, 2 -Music_AzaleaTown_branch_f5801: ; f5801 +Music_AzaleaTown_branch_f5801: intensity $a1 octave 3 note F_, 2 @@ -27,7 +26,7 @@ Music_AzaleaTown_branch_f5801: ; f5801 note F_, 2 note F_, 2 loopchannel 2, Music_AzaleaTown_branch_f5801 -Music_AzaleaTown_branch_f5816: ; f5816 +Music_AzaleaTown_branch_f5816: callchannel Music_AzaleaTown_branch_f588c stereopanning $f0 intensity $a4 @@ -119,9 +118,8 @@ Music_AzaleaTown_branch_f5816: ; f5816 note G#, 14 note __, 2 loopchannel 0, Music_AzaleaTown_branch_f5816 -; f588c -Music_AzaleaTown_branch_f588c: ; f588c +Music_AzaleaTown_branch_f588c: notetype $c, $a1 octave 4 note F_, 2 @@ -219,9 +217,8 @@ Music_AzaleaTown_branch_f588c: ; f588c intensity $61 note C#, 2 endchannel -; f5912 -Music_AzaleaTown_branch_f5912: ; f5912 +Music_AzaleaTown_branch_f5912: intensity $61 note G#, 8 note G#, 8 @@ -230,9 +227,8 @@ Music_AzaleaTown_branch_f5912: ; f5912 intensity $a1 note A_, 8 endchannel -; f591d -Music_AzaleaTown_Ch2: ; f591d +Music_AzaleaTown_Ch2: vibrato $12, $23 dutycycle $2 stereopanning $f0 @@ -268,7 +264,7 @@ Music_AzaleaTown_Ch2: ; f591d dutycycle $1 octave 5 note C_, 1 -Music_AzaleaTown_branch_f5952: ; f5952 +Music_AzaleaTown_branch_f5952: callchannel Music_AzaleaTown_branch_f59c7 note C#, 4 note C_, 2 @@ -366,9 +362,8 @@ Music_AzaleaTown_branch_f5952: ; f5952 octave 5 note C_, 2 loopchannel 0, Music_AzaleaTown_branch_f5952 -; f59c7 -Music_AzaleaTown_branch_f59c7: ; f59c7 +Music_AzaleaTown_branch_f59c7: note C#, 4 octave 4 note G#, 2 @@ -420,9 +415,8 @@ Music_AzaleaTown_branch_f59c7: ; f59c7 note D#, 12 intensity $b4 endchannel -; f5a08 -Music_AzaleaTown_Ch3: ; f5a08 +Music_AzaleaTown_Ch3: stereopanning $ff vibrato $6, $26 notetype $c, $25 @@ -446,7 +440,7 @@ Music_AzaleaTown_Ch3: ; f5a08 note C#, 1 note __, 1 note G#, 4 -Music_AzaleaTown_branch_f5a24: ; f5a24 +Music_AzaleaTown_branch_f5a24: callchannel Music_AzaleaTown_branch_f5a86 note G#, 4 note D#, 2 @@ -534,9 +528,8 @@ Music_AzaleaTown_branch_f5a24: ; f5a24 octave 3 note C_, 1 loopchannel 0, Music_AzaleaTown_branch_f5a24 -; f5a86 -Music_AzaleaTown_branch_f5a86: ; f5a86 +Music_AzaleaTown_branch_f5a86: note C#, 1 note __, 5 note C#, 1 @@ -608,9 +601,8 @@ Music_AzaleaTown_branch_f5a86: ; f5a86 note C_, 1 note __, 1 endchannel -; f5acf -Music_AzaleaTown_branch_f5acf: ; f5acf +Music_AzaleaTown_branch_f5acf: intensity $35 octave 3 note F_, 1 @@ -631,13 +623,12 @@ Music_AzaleaTown_branch_f5acf: ; f5acf note F_, 1 note __, 1 endchannel -; f5ae5 -Music_AzaleaTown_Ch4: ; f5ae5 +Music_AzaleaTown_Ch4: togglenoise $3 notetype $c note F_, 2 -Music_AzaleaTown_branch_f5aea: ; f5aea +Music_AzaleaTown_branch_f5aea: note D#, 2 note F#, 2 note D_, 2 @@ -660,4 +651,3 @@ Music_AzaleaTown_branch_f5aea: ; f5aea note D_, 2 note F#, 2 loopchannel 0, Music_AzaleaTown_branch_f5aea -; f5b03 diff --git a/audio/music/battletowerlobby.asm b/audio/music/battletowerlobby.asm index fe7cba7a0d5..2bf38a836fd 100644 --- a/audio/music/battletowerlobby.asm +++ b/audio/music/battletowerlobby.asm @@ -1,11 +1,10 @@ -Music_BattleTowerLobby: ; 17948b +Music_BattleTowerLobby: musicheader 4, 1, Music_BattleTowerLobby_Ch1 musicheader 1, 2, Music_BattleTowerLobby_Ch2 musicheader 1, 3, Music_BattleTowerLobby_Ch3 musicheader 1, 4, Music_BattleTowerLobby_Ch4 -; 179497 -Music_BattleTowerLobby_Ch1: ; 179497 +Music_BattleTowerLobby_Ch1: tempo 152 volume $77 dutycycle $3 @@ -13,7 +12,7 @@ Music_BattleTowerLobby_Ch1: ; 179497 vibrato $8, $22 stereopanning $f0 notetype $c, $72 -Music_BattleTowerLobby_branch_1794a9: ; 1794a9 +Music_BattleTowerLobby_branch_1794a9: notetype $c, $72 octave 3 note G#, 2 @@ -116,14 +115,13 @@ Music_BattleTowerLobby_branch_1794a9: ; 1794a9 octave 2 note B_, 4 loopchannel 0, Music_BattleTowerLobby_branch_1794a9 -; 17953a -Music_BattleTowerLobby_Ch2: ; 17953a +Music_BattleTowerLobby_Ch2: dutycycle $2 vibrato $10, $34 stereopanning $f notetype $c, $82 -Music_BattleTowerLobby_branch_179544: ; 179544 +Music_BattleTowerLobby_branch_179544: notetype $c, $82 octave 4 note E_, 2 @@ -201,11 +199,10 @@ Music_BattleTowerLobby_branch_179544: ; 179544 octave 4 note D#, 1 loopchannel 0, Music_BattleTowerLobby_branch_179544 -; 1795ae -Music_BattleTowerLobby_Ch3: ; 1795ae +Music_BattleTowerLobby_Ch3: notetype $c, $11 -Music_BattleTowerLobby_branch_1795b1: ; 1795b1 +Music_BattleTowerLobby_branch_1795b1: octave 2 note B_, 2 octave 3 @@ -298,11 +295,10 @@ Music_BattleTowerLobby_branch_1795b1: ; 1795b1 note D#, 2 note F#, 2 loopchannel 0, Music_BattleTowerLobby_branch_1795b1 -; 179610 -Music_BattleTowerLobby_Ch4: ; 179610 +Music_BattleTowerLobby_Ch4: togglenoise $0 -Music_BattleTowerLobby_branch_179612: ; 179612 +Music_BattleTowerLobby_branch_179612: notetype $c note __, 2 note F_, 4 @@ -310,4 +306,3 @@ Music_BattleTowerLobby_branch_179612: ; 179612 note F_, 2 note F_, 4 loopchannel 0, Music_BattleTowerLobby_branch_179612 -; 17961d diff --git a/audio/music/battletowertheme.asm b/audio/music/battletowertheme.asm index b9e477de188..18af958664a 100644 --- a/audio/music/battletowertheme.asm +++ b/audio/music/battletowertheme.asm @@ -1,18 +1,17 @@ -Music_BattleTowerTheme: ; 178889 +Music_BattleTowerTheme: musicheader 4, 1, Music_BattleTowerTheme_Ch1 musicheader 1, 2, Music_BattleTowerTheme_Ch2 musicheader 1, 3, Music_BattleTowerTheme_Ch3 musicheader 1, 4, Music_BattleTowerTheme_Ch4 -; 178895 -Music_BattleTowerTheme_Ch1: ; 178895 +Music_BattleTowerTheme_Ch1: tempo 141 volume $77 tone $0001 vibrato $12, $34 stereopanning $f notetype $6, $94 -Music_BattleTowerTheme_branch_1788a5: ; 1788a5 +Music_BattleTowerTheme_branch_1788a5: note __, 16 note __, 16 note __, 12 @@ -185,9 +184,8 @@ Music_BattleTowerTheme_branch_1788a5: ; 1788a5 note E_, 4 note __, 12 loopchannel 0, Music_BattleTowerTheme_branch_1788a5 -; 17895e -Music_BattleTowerTheme_branch_17895e: ; 17895e +Music_BattleTowerTheme_branch_17895e: intensity $94 note A_, 2 note __, 2 @@ -202,11 +200,10 @@ Music_BattleTowerTheme_branch_17895e: ; 17895e note __, 4 note A_, 4 endchannel -; 17896d -Music_BattleTowerTheme_Ch2: ; 17896d +Music_BattleTowerTheme_Ch2: vibrato $12, $34 -Music_BattleTowerTheme_branch_178970: ; 178970 +Music_BattleTowerTheme_branch_178970: dutycycle $3 notetype $6, $b8 octave 3 @@ -345,9 +342,8 @@ Music_BattleTowerTheme_branch_178970: ; 178970 note D_, 2 note E_, 4 loopchannel 0, Music_BattleTowerTheme_branch_178970 -; 178a15 -Music_BattleTowerTheme_branch_178a15: ; 178a15 +Music_BattleTowerTheme_branch_178a15: note F_, 2 note __, 2 note F_, 8 @@ -359,12 +355,11 @@ Music_BattleTowerTheme_branch_178a15: ; 178a15 note A#, 4 note A_, 4 endchannel -; 178a20 -Music_BattleTowerTheme_Ch3: ; 178a20 +Music_BattleTowerTheme_Ch3: vibrato $12, $34 notetype $6, $16 -Music_BattleTowerTheme_branch_178a26: ; 178a26 +Music_BattleTowerTheme_branch_178a26: stereopanning $ff callchannel Music_BattleTowerTheme_branch_178afe note C_, 2 @@ -569,9 +564,8 @@ Music_BattleTowerTheme_branch_178a26: ; 178a26 note G_, 4 note __, 12 loopchannel 0, Music_BattleTowerTheme_branch_178a26 -; 178afe -Music_BattleTowerTheme_branch_178afe: ; 178afe +Music_BattleTowerTheme_branch_178afe: octave 3 note C_, 2 note __, 2 @@ -587,12 +581,11 @@ Music_BattleTowerTheme_branch_178afe: ; 178afe note C_, 2 note __, 2 endchannel -; 178b0d -Music_BattleTowerTheme_Ch4: ; 178b0d +Music_BattleTowerTheme_Ch4: togglenoise $3 notetype $c -Music_BattleTowerTheme_branch_178b11: ; 178b11 +Music_BattleTowerTheme_branch_178b11: callchannel Music_BattleTowerTheme_branch_178b58 note D_, 2 note D_, 4 @@ -603,7 +596,7 @@ Music_BattleTowerTheme_branch_178b11: ; 178b11 note C#, 1 note D_, 1 note C#, 1 -Music_BattleTowerTheme_branch_178b1d: ; 178b1d +Music_BattleTowerTheme_branch_178b1d: callchannel Music_BattleTowerTheme_branch_178b58 callchannel Music_BattleTowerTheme_branch_178b61 loopchannel 2, Music_BattleTowerTheme_branch_178b1d @@ -615,7 +608,7 @@ Music_BattleTowerTheme_branch_178b1d: ; 178b1d note D_, 1 note D_, 1 note D_, 8 -Music_BattleTowerTheme_branch_178b35: ; 178b35 +Music_BattleTowerTheme_branch_178b35: callchannel Music_BattleTowerTheme_branch_178b76 note D_, 2 note D_, 2 @@ -641,9 +634,8 @@ Music_BattleTowerTheme_branch_178b35: ; 178b35 note D_, 1 note C#, 1 loopchannel 0, Music_BattleTowerTheme_branch_178b11 -; 178b58 -Music_BattleTowerTheme_branch_178b58: ; 178b58 +Music_BattleTowerTheme_branch_178b58: note D_, 2 note D_, 4 note D_, 1 @@ -653,9 +645,8 @@ Music_BattleTowerTheme_branch_178b58: ; 178b58 note D_, 1 note D_, 1 endchannel -; 178b61 -Music_BattleTowerTheme_branch_178b61: ; 178b61 +Music_BattleTowerTheme_branch_178b61: note D_, 2 note D_, 4 note D_, 1 @@ -667,9 +658,8 @@ Music_BattleTowerTheme_branch_178b61: ; 178b61 note D_, 1 note C#, 1 endchannel -; 178b6c -Music_BattleTowerTheme_branch_178b6c: ; 178b6c +Music_BattleTowerTheme_branch_178b6c: note D_, 2 note D_, 4 note D_, 1 @@ -680,9 +670,8 @@ Music_BattleTowerTheme_branch_178b6c: ; 178b6c note D_, 1 note D_, 1 endchannel -; 178b76 -Music_BattleTowerTheme_branch_178b76: ; 178b76 +Music_BattleTowerTheme_branch_178b76: note D_, 2 note C#, 2 note D_, 2 @@ -694,4 +683,3 @@ Music_BattleTowerTheme_branch_178b76: ; 178b76 note D_, 1 note C#, 1 endchannel -; 178b81 diff --git a/audio/music/bicycle.asm b/audio/music/bicycle.asm index 3805627e6cd..92a19e813a7 100644 --- a/audio/music/bicycle.asm +++ b/audio/music/bicycle.asm @@ -1,11 +1,10 @@ -Music_Bicycle: ; ee119 +Music_Bicycle: musicheader 4, 1, Music_Bicycle_Ch1 musicheader 1, 2, Music_Bicycle_Ch2 musicheader 1, 3, Music_Bicycle_Ch3 musicheader 1, 4, Music_Bicycle_Ch4 -; ee125 -Music_Bicycle_Ch1: ; ee125 +Music_Bicycle_Ch1: tempo 140 volume $77 dutycycle $3 @@ -23,7 +22,7 @@ Music_Bicycle_Ch1: ; ee125 note A_, 8 intensity $b2 note F#, 2 -Music_Bicycle_branch_ee144: ; ee144 +Music_Bicycle_branch_ee144: stereopanning $f intensity $b2 note G_, 2 @@ -169,9 +168,8 @@ Music_Bicycle_branch_ee144: ; ee144 note G#, 2 note A_, 2 loopchannel 0, Music_Bicycle_branch_ee144 -; ee1de -Music_Bicycle_Ch2: ; ee1de +Music_Bicycle_Ch2: dutycycle $2 vibrato $10, $24 stereopanning $f0 @@ -195,7 +193,7 @@ Music_Bicycle_Ch2: ; ee1de octave 3 note B_, 2 note A_, 2 -Music_Bicycle_branch_ee1fd: ; ee1fd +Music_Bicycle_branch_ee1fd: stereopanning $ff dutycycle $2 intensity $c3 @@ -273,9 +271,8 @@ Music_Bicycle_branch_ee1fd: ; ee1fd note G_, 2 note F#, 4 loopchannel 0, Music_Bicycle_branch_ee1fd -; ee263 -Music_Bicycle_branch_ee263: ; ee263 +Music_Bicycle_branch_ee263: note G_, 6 note B_, 6 note G_, 4 @@ -286,9 +283,8 @@ Music_Bicycle_branch_ee263: ; ee263 note G_, 6 note E_, 4 endchannel -; ee26d -Music_Bicycle_Ch3: ; ee26d +Music_Bicycle_Ch3: notetype $c, $14 note __, 16 octave 3 @@ -305,7 +301,7 @@ Music_Bicycle_Ch3: ; ee26d octave 3 note A_, 1 note __, 1 -Music_Bicycle_branch_ee27f: ; ee27f +Music_Bicycle_branch_ee27f: callchannel Music_Bicycle_branch_ee333 note E_, 1 note __, 1 @@ -408,7 +404,7 @@ Music_Bicycle_branch_ee27f: ; ee27f note __, 1 note A_, 1 note __, 1 -Music_Bicycle_branch_ee2e9: ; ee2e9 +Music_Bicycle_branch_ee2e9: note G_, 1 note __, 1 note B_, 1 @@ -477,9 +473,8 @@ Music_Bicycle_branch_ee2e9: ; ee2e9 note __, 1 loopchannel 2, Music_Bicycle_branch_ee2e9 loopchannel 0, Music_Bicycle_branch_ee27f -; ee333 -Music_Bicycle_branch_ee333: ; ee333 +Music_Bicycle_branch_ee333: octave 3 note G_, 1 note __, 1 @@ -498,16 +493,15 @@ Music_Bicycle_branch_ee333: ; ee333 note B_, 1 note __, 1 endchannel -; ee345 -Music_Bicycle_Ch4: ; ee345 +Music_Bicycle_Ch4: togglenoise $0 notetype $c note __, 16 note __, 16 -Music_Bicycle_branch_ee34b: ; ee34b +Music_Bicycle_branch_ee34b: note __, 2 -Music_Bicycle_branch_ee34c: ; ee34c +Music_Bicycle_branch_ee34c: stereopanning $f0 note F_, 4 loopchannel 12, Music_Bicycle_branch_ee34c @@ -518,4 +512,3 @@ Music_Bicycle_branch_ee34c: ; ee34c note F_, 2 note F_, 2 loopchannel 0, Music_Bicycle_branch_ee34b -; ee35e diff --git a/audio/music/buenaspassword.asm b/audio/music/buenaspassword.asm index a91999f3010..316ec9a0ee9 100644 --- a/audio/music/buenaspassword.asm +++ b/audio/music/buenaspassword.asm @@ -1,17 +1,16 @@ -Music_BuenasPassword: ; 178153 +Music_BuenasPassword: musicheader 4, 1, Music_BuenasPassword_Ch1 musicheader 1, 2, Music_BuenasPassword_Ch2 musicheader 1, 3, Music_BuenasPassword_Ch3 musicheader 1, 4, Music_BuenasPassword_Ch4 -; 17815f -Music_BuenasPassword_Ch1: ; 17815f +Music_BuenasPassword_Ch1: tempo 136 volume $77 tone $0001 notetype $c, $b3 note __, 8 -Music_BuenasPassword_branch_17816b: ; 17816b +Music_BuenasPassword_branch_17816b: stereopanning $ff note __, 16 note __, 16 @@ -138,9 +137,8 @@ Music_BuenasPassword_branch_17816b: ; 17816b note G_, 1 note __, 1 loopchannel 0, Music_BuenasPassword_branch_17816b -; 178204 -Music_BuenasPassword_branch_178204: ; 178204 +Music_BuenasPassword_branch_178204: stereopanning $f notetype $6, $84 octave 4 @@ -162,9 +160,8 @@ Music_BuenasPassword_branch_178204: ; 178204 note __, 1 notetype $c, $84 endchannel -; 178222 -Music_BuenasPassword_branch_178222: ; 178222 +Music_BuenasPassword_branch_178222: octave 3 note D#, 1 note __, 1 @@ -180,16 +177,15 @@ Music_BuenasPassword_branch_178222: ; 178222 note D#, 1 note __, 2 endchannel -; 178231 -Music_BuenasPassword_Ch2: ; 178231 +Music_BuenasPassword_Ch2: vibrato $12, $34 dutycycle $2 notetype $c, $a5 note __, 7 octave 3 note F#, 1 -Music_BuenasPassword_branch_17823c: ; 17823c +Music_BuenasPassword_branch_17823c: stereopanning $ff callchannel Music_BuenasPassword_branch_1782df callchannel Music_BuenasPassword_branch_1782a4 @@ -274,9 +270,8 @@ Music_BuenasPassword_branch_17823c: ; 17823c note __, 1 intensity $a5 loopchannel 0, Music_BuenasPassword_branch_17823c -; 1782a4 -Music_BuenasPassword_branch_1782a4: ; 1782a4 +Music_BuenasPassword_branch_1782a4: octave 3 note G#, 1 note __, 1 @@ -308,9 +303,8 @@ Music_BuenasPassword_branch_1782a4: ; 1782a4 note __, 1 notetype $c, $a5 endchannel -; 1782cc -Music_BuenasPassword_branch_1782cc: ; 1782cc +Music_BuenasPassword_branch_1782cc: octave 4 note G#, 2 note __, 2 @@ -330,9 +324,8 @@ Music_BuenasPassword_branch_1782cc: ; 1782cc note D#, 2 note __, 2 endchannel -; 1782df -Music_BuenasPassword_branch_1782df: ; 1782df +Music_BuenasPassword_branch_1782df: octave 3 note G#, 1 note __, 1 @@ -383,12 +376,11 @@ Music_BuenasPassword_branch_1782df: ; 1782df note B_, 1 note G#, 3 endchannel -; 178311 -Music_BuenasPassword_Ch3: ; 178311 +Music_BuenasPassword_Ch3: notetype $c, $14 note __, 8 -Music_BuenasPassword_branch_178315: ; 178315 +Music_BuenasPassword_branch_178315: callchannel Music_BuenasPassword_branch_1783a7 callchannel Music_BuenasPassword_branch_1783a7 callchannel Music_BuenasPassword_branch_1783a7 @@ -519,9 +511,8 @@ Music_BuenasPassword_branch_178315: ; 178315 note G_, 1 note __, 1 loopchannel 0, Music_BuenasPassword_branch_178315 -; 1783a7 -Music_BuenasPassword_branch_1783a7: ; 1783a7 +Music_BuenasPassword_branch_1783a7: octave 2 note G#, 1 note __, 1 @@ -543,9 +534,8 @@ Music_BuenasPassword_branch_1783a7: ; 1783a7 note F_, 2 note C#, 1 endchannel -; 1783bc -Music_BuenasPassword_branch_1783bc: ; 1783bc +Music_BuenasPassword_branch_1783bc: octave 2 note G#, 1 note __, 1 @@ -566,9 +556,8 @@ Music_BuenasPassword_branch_1783bc: ; 1783bc octave 2 note G#, 2 endchannel -; 1783d0 -Music_BuenasPassword_Ch4: ; 1783d0 +Music_BuenasPassword_Ch4: togglenoise $3 notetype $c note D#, 2 @@ -576,7 +565,7 @@ Music_BuenasPassword_Ch4: ; 1783d0 note D_, 2 note D_, 1 note D_, 1 -Music_BuenasPassword_branch_1783d9: ; 1783d9 +Music_BuenasPassword_branch_1783d9: callchannel Music_BuenasPassword_branch_17840c callchannel Music_BuenasPassword_branch_17840c callchannel Music_BuenasPassword_branch_17840c @@ -602,9 +591,8 @@ Music_BuenasPassword_branch_1783d9: ; 1783d9 note D_, 1 note D_, 1 loopchannel 0, Music_BuenasPassword_branch_1783d9 -; 17840c -Music_BuenasPassword_branch_17840c: ; 17840c +Music_BuenasPassword_branch_17840c: stereopanning $ff note D#, 2 stereopanning $f0 @@ -622,9 +610,8 @@ Music_BuenasPassword_branch_17840c: ; 17840c stereopanning $f note G_, 2 endchannel -; 178424 -Music_BuenasPassword_branch_178424: ; 178424 +Music_BuenasPassword_branch_178424: stereopanning $ff note D#, 2 stereopanning $f0 @@ -642,4 +629,3 @@ Music_BuenasPassword_branch_178424: ; 178424 note D_, 1 note D_, 1 endchannel -; 17843b diff --git a/audio/music/bugcatchingcontest.asm b/audio/music/bugcatchingcontest.asm index 6195d664e64..e77bf550f23 100644 --- a/audio/music/bugcatchingcontest.asm +++ b/audio/music/bugcatchingcontest.asm @@ -1,11 +1,10 @@ -Music_BugCatchingContest: ; f7c16 +Music_BugCatchingContest: musicheader 4, 1, Music_BugCatchingContest_Ch1 musicheader 1, 2, Music_BugCatchingContest_Ch2 musicheader 1, 3, Music_BugCatchingContest_Ch3 musicheader 1, 4, Music_BugCatchingContest_Ch4 -; f7c22 -Music_BugCatchingContest_Ch1: ; f7c22 +Music_BugCatchingContest_Ch1: tempo 144 volume $77 stereopanning $f @@ -38,14 +37,14 @@ Music_BugCatchingContest_Ch1: ; f7c22 note __, 1 note E_, 1 note E_, 1 -Music_BugCatchingContest_branch_f7c4b: ; f7c4b +Music_BugCatchingContest_branch_f7c4b: notetype $c, $b1 -Music_BugCatchingContest_branch_f7c4e: ; f7c4e +Music_BugCatchingContest_branch_f7c4e: note __, 2 octave 2 note A_, 2 loopchannel 4, Music_BugCatchingContest_branch_f7c4e -Music_BugCatchingContest_branch_f7c55: ; f7c55 +Music_BugCatchingContest_branch_f7c55: note __, 2 note B_, 2 loopchannel 8, Music_BugCatchingContest_branch_f7c55 @@ -61,7 +60,7 @@ Music_BugCatchingContest_branch_f7c55: ; f7c55 note E_, 1 intensity $b1 dutycycle $2 -Music_BugCatchingContest_branch_f7c6b: ; f7c6b +Music_BugCatchingContest_branch_f7c6b: note __, 2 octave 2 note A_, 2 @@ -91,7 +90,7 @@ Music_BugCatchingContest_branch_f7c6b: ; f7c6b note E_, 4 note __, 4 note E_, 4 -Music_BugCatchingContest_branch_f7c8e: ; f7c8e +Music_BugCatchingContest_branch_f7c8e: note __, 4 octave 2 note A_, 4 @@ -187,15 +186,14 @@ Music_BugCatchingContest_branch_f7c8e: ; f7c8e note E_, 2 note E_, 2 loopchannel 0, Music_BugCatchingContest_branch_f7c4b -; f7cf4 -Music_BugCatchingContest_Ch2: ; f7cf4 +Music_BugCatchingContest_Ch2: stereopanning $f0 vibrato $8, $23 dutycycle $1 notetype $c, $c7 note __, 8 -Music_BugCatchingContest_branch_f7cff: ; f7cff +Music_BugCatchingContest_branch_f7cff: octave 4 note A_, 1 note __, 1 @@ -204,7 +202,7 @@ Music_BugCatchingContest_branch_f7cff: ; f7cff note A_, 1 note A_, 1 loopchannel 4, Music_BugCatchingContest_branch_f7cff -Music_BugCatchingContest_branch_f7d0a: ; f7d0a +Music_BugCatchingContest_branch_f7d0a: dutycycle $0 callchannel Music_BugCatchingContest_branch_f7d8e octave 2 @@ -328,9 +326,8 @@ Music_BugCatchingContest_branch_f7d0a: ; f7d0a note __, 3 note A_, 10 loopchannel 0, Music_BugCatchingContest_branch_f7d0a -; f7d8e -Music_BugCatchingContest_branch_f7d8e: ; f7d8e +Music_BugCatchingContest_branch_f7d8e: octave 2 note D_, 2 octave 3 @@ -372,9 +369,8 @@ Music_BugCatchingContest_branch_f7d8e: ; f7d8e note G_, 1 note __, 1 endchannel -; f7db7 -Music_BugCatchingContest_Ch3: ; f7db7 +Music_BugCatchingContest_Ch3: stereopanning $ff vibrato $10, $23 notetype $c, $14 @@ -405,7 +401,7 @@ Music_BugCatchingContest_Ch3: ; f7db7 note __, 1 note C#, 1 note C#, 1 -Music_BugCatchingContest_branch_f7dda: ; f7dda +Music_BugCatchingContest_branch_f7dda: notetype $c, $14 note F#, 5 note __, 1 @@ -587,9 +583,8 @@ Music_BugCatchingContest_branch_f7dda: ; f7dda note C#, 2 note C#, 2 loopchannel 0, Music_BugCatchingContest_branch_f7dda -; f7e9a -Music_BugCatchingContest_Ch4: ; f7e9a +Music_BugCatchingContest_Ch4: togglenoise $4 notetype $6 note C#, 1 @@ -607,7 +602,7 @@ Music_BugCatchingContest_Ch4: ; f7e9a note E_, 2 note E_, 2 callchannel Music_BugCatchingContest_branch_f7ee2 -Music_BugCatchingContest_branch_f7eaf: ; f7eaf +Music_BugCatchingContest_branch_f7eaf: note D_, 4 note D_, 4 note D_, 2 @@ -651,9 +646,8 @@ Music_BugCatchingContest_branch_f7eaf: ; f7eaf note D_, 2 callchannel Music_BugCatchingContest_branch_f7ee2 loopchannel 0, Music_BugCatchingContest_branch_f7eaf -; f7ee2 -Music_BugCatchingContest_branch_f7ee2: ; f7ee2 +Music_BugCatchingContest_branch_f7ee2: note D_, 4 note B_, 8 note D_, 2 @@ -671,4 +665,3 @@ Music_BugCatchingContest_branch_f7ee2: ; f7ee2 note D_, 2 note D_, 2 endchannel -; f7ef3 diff --git a/audio/music/burnedtower.asm b/audio/music/burnedtower.asm index e06a6a7b997..723e78140c7 100644 --- a/audio/music/burnedtower.asm +++ b/audio/music/burnedtower.asm @@ -1,11 +1,10 @@ -Music_BurnedTower: ; f6a99 +Music_BurnedTower: musicheader 4, 1, Music_BurnedTower_Ch1 musicheader 1, 2, Music_BurnedTower_Ch2 musicheader 1, 3, Music_BurnedTower_Ch3 musicheader 1, 4, Music_BurnedTower_Ch4 -; f6aa5 -Music_BurnedTower_Ch1: ; f6aa5 +Music_BurnedTower_Ch1: tempo 168 volume $77 dutycycle $1 @@ -27,7 +26,7 @@ Music_BurnedTower_Ch1: ; f6aa5 note D_, 2 intensity $80 note C#, 6 -Music_BurnedTower_branch_f6ac8: ; f6ac8 +Music_BurnedTower_branch_f6ac8: intensity $91 octave 2 note A_, 4 @@ -37,7 +36,7 @@ Music_BurnedTower_branch_f6ac8: ; f6ac8 note A#, 6 loopchannel 2, Music_BurnedTower_branch_f6ac8 tempo 150 -Music_BurnedTower_branch_f6ad8: ; f6ad8 +Music_BurnedTower_branch_f6ad8: intensity $b1 octave 2 note A_, 4 @@ -87,7 +86,7 @@ Music_BurnedTower_branch_f6ad8: ; f6ad8 note E_, 2 intensity $a0 note D#, 6 -Music_BurnedTower_branch_f6b17: ; f6b17 +Music_BurnedTower_branch_f6b17: intensity $b1 octave 2 note B_, 4 @@ -98,16 +97,15 @@ Music_BurnedTower_branch_f6b17: ; f6b17 note C_, 6 loopchannel 2, Music_BurnedTower_branch_f6b17 loopchannel 0, Music_BurnedTower_branch_f6ad8 -; f6b29 -Music_BurnedTower_Ch2: ; f6b29 +Music_BurnedTower_Ch2: dutycycle $2 vibrato $20, $82 tone $0002 notetype $c, $70 callchannel Music_BurnedTower_branch_f6b8e intensity $c5 -Music_BurnedTower_branch_f6b39: ; f6b39 +Music_BurnedTower_branch_f6b39: callchannel Music_BurnedTower_branch_f6b8e intensity $c1 dutycycle $3 @@ -170,9 +168,8 @@ Music_BurnedTower_branch_f6b39: ; f6b39 intensity $b7 note F#, 16 loopchannel 0, Music_BurnedTower_branch_f6b39 -; f6b8e -Music_BurnedTower_branch_f6b8e: ; f6b8e +Music_BurnedTower_branch_f6b8e: octave 3 note E_, 4 note D_, 2 @@ -193,9 +190,8 @@ Music_BurnedTower_branch_f6b8e: ; f6b8e note D_, 4 note E_, 16 endchannel -; f6ba2 -Music_BurnedTower_Ch3: ; f6ba2 +Music_BurnedTower_Ch3: stereopanning $f notetype $c, $14 note __, 16 @@ -204,7 +200,7 @@ Music_BurnedTower_Ch3: ; f6ba2 note __, 12 octave 3 note D#, 4 -Music_BurnedTower_branch_f6bad: ; f6bad +Music_BurnedTower_branch_f6bad: octave 2 note A_, 2 octave 3 @@ -224,7 +220,7 @@ Music_BurnedTower_branch_f6bad: ; f6bad note E_, 2 note D#, 4 loopchannel 4, Music_BurnedTower_branch_f6bad -Music_BurnedTower_branch_f6bc3: ; f6bc3 +Music_BurnedTower_branch_f6bc3: octave 2 note B_, 2 octave 3 @@ -245,16 +241,15 @@ Music_BurnedTower_branch_f6bc3: ; f6bc3 note F_, 4 loopchannel 2, Music_BurnedTower_branch_f6bc3 loopchannel 0, Music_BurnedTower_branch_f6bad -; f6bdd -Music_BurnedTower_Ch4: ; f6bdd +Music_BurnedTower_Ch4: togglenoise $0 notetype $c -Music_BurnedTower_branch_f6be1: ; f6be1 +Music_BurnedTower_branch_f6be1: note __, 16 loopchannel 4, Music_BurnedTower_branch_f6be1 note __, 2 -Music_BurnedTower_branch_f6be7: ; f6be7 +Music_BurnedTower_branch_f6be7: stereopanning $f0 note G_, 2 note G#, 2 @@ -262,4 +257,3 @@ Music_BurnedTower_branch_f6be7: ; f6be7 note G#, 2 note G_, 4 loopchannel 0, Music_BurnedTower_branch_f6be7 -; f6bf2 diff --git a/audio/music/celadoncity.asm b/audio/music/celadoncity.asm index f118d0243d7..de815cc91be 100644 --- a/audio/music/celadoncity.asm +++ b/audio/music/celadoncity.asm @@ -1,14 +1,13 @@ -Music_CeladonCity: ; f435b +Music_CeladonCity: musicheader 3, 1, Music_CeladonCity_Ch1 musicheader 1, 2, Music_CeladonCity_Ch2 musicheader 1, 3, Music_CeladonCity_Ch3 -; f4364 -Music_CeladonCity_Ch1: ; f4364 +Music_CeladonCity_Ch1: tempo 146 volume $77 tone $0001 -Music_CeladonCity_branch_f436c: ; f436c +Music_CeladonCity_branch_f436c: stereopanning $f notetype $c, $a6 octave 3 @@ -20,7 +19,7 @@ Music_CeladonCity_branch_f436c: ; f436c note E_, 2 note F#, 2 callchannel Music_CeladonCity_branch_f43cc -Music_CeladonCity_branch_f437d: ; f437d +Music_CeladonCity_branch_f437d: note D_, 2 note F#, 1 note A_, 1 @@ -84,9 +83,8 @@ Music_CeladonCity_branch_f437d: ; f437d note G_, 1 note A_, 8 loopchannel 0, Music_CeladonCity_branch_f436c -; f43cc -Music_CeladonCity_branch_f43cc: ; f43cc +Music_CeladonCity_branch_f43cc: note D_, 2 note G_, 1 note B_, 1 @@ -105,9 +103,8 @@ Music_CeladonCity_branch_f43cc: ; f43cc octave 3 note A_, 1 endchannel -; f43e1 -Music_CeladonCity_branch_f43e1: ; f43e1 +Music_CeladonCity_branch_f43e1: octave 2 note G_, 2 note B_, 1 @@ -134,17 +131,15 @@ Music_CeladonCity_branch_f43e1: ; f43e1 octave 3 note B_, 1 endchannel -; f43fe -Music_CeladonCity_branch_f43fe: ; f43fe +Music_CeladonCity_branch_f43fe: note D_, 2 note F#, 1 note A_, 1 loopchannel 4, Music_CeladonCity_branch_f43fe endchannel -; f4406 -Music_CeladonCity_Ch2: ; f4406 +Music_CeladonCity_Ch2: vibrato $12, $34 dutycycle $2 stereopanning $f0 @@ -159,7 +154,7 @@ Music_CeladonCity_Ch2: ; f4406 note F#, 1 note G_, 1 note A_, 8 -Music_CeladonCity_branch_f441a: ; f441a +Music_CeladonCity_branch_f441a: callchannel Music_CeladonCity_branch_f4463 note A_, 4 note F#, 4 @@ -218,9 +213,8 @@ Music_CeladonCity_branch_f441a: ; f441a octave 5 note D_, 16 loopchannel 0, Music_CeladonCity_branch_f441a -; f4463 -Music_CeladonCity_branch_f4463: ; f4463 +Music_CeladonCity_branch_f4463: intensity $b2 octave 4 note B_, 4 @@ -237,9 +231,8 @@ Music_CeladonCity_branch_f4463: ; f4463 note B_, 2 note A_, 8 endchannel -; f4474 -Music_CeladonCity_branch_f4474: ; f4474 +Music_CeladonCity_branch_f4474: note G_, 3 note B_, 1 octave 2 @@ -270,11 +263,10 @@ Music_CeladonCity_branch_f4474: ; f4474 note D_, 2 note F#, 4 endchannel -; f4492 -Music_CeladonCity_Ch3: ; f4492 +Music_CeladonCity_Ch3: vibrato $12, $24 -Music_CeladonCity_branch_f4495: ; f4495 +Music_CeladonCity_branch_f4495: notetype $c, $25 octave 3 note A_, 2 @@ -283,7 +275,7 @@ Music_CeladonCity_branch_f4495: ; f4495 note __, 2 note D_, 8 callchannel Music_CeladonCity_branch_f44fd -Music_CeladonCity_branch_f44a1: ; f44a1 +Music_CeladonCity_branch_f44a1: octave 2 note A_, 2 note __, 2 @@ -363,9 +355,8 @@ Music_CeladonCity_branch_f44a1: ; f44a1 note D_, 2 note __, 6 loopchannel 0, Music_CeladonCity_branch_f4495 -; f44fd -Music_CeladonCity_branch_f44fd: ; f44fd +Music_CeladonCity_branch_f44fd: octave 2 note G_, 2 note __, 2 @@ -382,9 +373,8 @@ Music_CeladonCity_branch_f44fd: ; f44fd octave 2 note G#, 1 endchannel -; f4510 -Music_CeladonCity_branch_f4510: ; f4510 +Music_CeladonCity_branch_f4510: octave 5 note D_, 8 note C_, 2 @@ -393,4 +383,3 @@ Music_CeladonCity_branch_f4510: ; f4510 note A_, 2 note B_, 2 endchannel -; f4518 diff --git a/audio/music/championbattle.asm b/audio/music/championbattle.asm index 2973258031c..e732d39c7dd 100644 --- a/audio/music/championbattle.asm +++ b/audio/music/championbattle.asm @@ -1,10 +1,9 @@ -Music_ChampionBattle: ; ea9c1 +Music_ChampionBattle: musicheader 3, 1, Music_ChampionBattle_Ch1 musicheader 1, 2, Music_ChampionBattle_Ch2 musicheader 1, 3, Music_ChampionBattle_Ch3 -; ea9ca -Music_ChampionBattle_Ch1: ; ea9ca +Music_ChampionBattle_Ch1: tempo 98 volume $77 dutycycle $3 @@ -18,7 +17,7 @@ Music_ChampionBattle_Ch1: ; ea9ca note A#, 4 intensity $b7 note B_, 4 -Music_ChampionBattle_branch_ea9e2: ; ea9e2 +Music_ChampionBattle_branch_ea9e2: callchannel Music_ChampionBattle_branch_eaaee octave 3 note D#, 4 @@ -26,11 +25,11 @@ Music_ChampionBattle_branch_ea9e2: ; ea9e2 callchannel Music_ChampionBattle_branch_eaaee octave 3 note E_, 4 -Music_ChampionBattle_branch_ea9f0: ; ea9f0 +Music_ChampionBattle_branch_ea9f0: callchannel Music_ChampionBattle_branch_eaafc loopchannel 3, Music_ChampionBattle_branch_ea9f0 callchannel Music_ChampionBattle_branch_eab06 -Music_ChampionBattle_branch_ea9fa: ; ea9fa +Music_ChampionBattle_branch_ea9fa: callchannel Music_ChampionBattle_branch_eaafc loopchannel 7, Music_ChampionBattle_branch_ea9fa callchannel Music_ChampionBattle_branch_eab06 @@ -73,13 +72,13 @@ Music_ChampionBattle_branch_ea9fa: ; ea9fa octave 4 note C_, 1 note C#, 1 -Music_ChampionBattle_branch_eaa35: ; eaa35 +Music_ChampionBattle_branch_eaa35: callchannel Music_ChampionBattle_branch_eab0f note E_, 2 note E_, 2 intensity $b7 note F#, 4 -Music_ChampionBattle_branch_eaa3d: ; eaa3d +Music_ChampionBattle_branch_eaa3d: intensity $b2 note E_, 2 note E_, 2 @@ -167,7 +166,7 @@ Music_ChampionBattle_branch_eaa3d: ; eaa3d intensity $90 note D#, 16 note C#, 16 -Music_ChampionBattle_branch_eaab1: ; eaab1 +Music_ChampionBattle_branch_eaab1: intensity $b2 octave 2 note A#, 2 @@ -176,7 +175,7 @@ Music_ChampionBattle_branch_eaab1: ; eaab1 octave 3 note D#, 4 loopchannel 4, Music_ChampionBattle_branch_eaab1 -Music_ChampionBattle_branch_eaabe: ; eaabe +Music_ChampionBattle_branch_eaabe: intensity $b2 note C_, 2 note C_, 2 @@ -207,9 +206,8 @@ Music_ChampionBattle_branch_eaabe: ; eaabe octave 4 note D_, 4 loopchannel 0, Music_ChampionBattle_branch_eaa35 -; eaaee -Music_ChampionBattle_branch_eaaee: ; eaaee +Music_ChampionBattle_branch_eaaee: intensity $b2 octave 2 note A#, 2 @@ -222,9 +220,8 @@ Music_ChampionBattle_branch_eaaee: ; eaaee note A#, 2 intensity $b7 endchannel -; eaafc -Music_ChampionBattle_branch_eaafc: ; eaafc +Music_ChampionBattle_branch_eaafc: intensity $b2 octave 2 note A#, 2 @@ -233,9 +230,8 @@ Music_ChampionBattle_branch_eaafc: ; eaafc octave 3 note D#, 4 endchannel -; eab06 -Music_ChampionBattle_branch_eab06: ; eab06 +Music_ChampionBattle_branch_eab06: intensity $b2 octave 2 note A#, 2 @@ -243,9 +239,8 @@ Music_ChampionBattle_branch_eab06: ; eab06 intensity $b7 note B_, 4 endchannel -; eab0f -Music_ChampionBattle_branch_eab0f: ; eab0f +Music_ChampionBattle_branch_eab0f: intensity $b5 octave 3 note D#, 2 @@ -265,9 +260,8 @@ Music_ChampionBattle_branch_eab0f: ; eab0f note G_, 2 intensity $b2 endchannel -; eab24 -Music_ChampionBattle_branch_eab24: ; eab24 +Music_ChampionBattle_branch_eab24: intensity $b2 octave 3 note A#, 2 @@ -279,9 +273,8 @@ Music_ChampionBattle_branch_eab24: ; eab24 note A#, 2 intensity $b7 endchannel -; eab31 -Music_ChampionBattle_branch_eab31: ; eab31 +Music_ChampionBattle_branch_eab31: intensity $b2 note D#, 2 note D#, 2 @@ -300,9 +293,8 @@ Music_ChampionBattle_branch_eab31: ; eab31 note C#, 4 intensity $b2 endchannel -; eab4a -Music_ChampionBattle_Ch2: ; eab4a +Music_ChampionBattle_Ch2: dutycycle $3 vibrato $8, $36 tone $0001 @@ -357,7 +349,7 @@ Music_ChampionBattle_Ch2: ; eab4a note E_, 8 intensity $3c note E_, 8 -Music_ChampionBattle_branch_eab9d: ; eab9d +Music_ChampionBattle_branch_eab9d: intensity $c5 note D#, 6 octave 3 @@ -425,7 +417,7 @@ Music_ChampionBattle_branch_eab9d: ; eab9d note F_, 16 note F#, 16 intensity $c4 -Music_ChampionBattle_branch_eabef: ; eabef +Music_ChampionBattle_branch_eabef: octave 5 note D#, 4 note D_, 4 @@ -498,9 +490,8 @@ Music_ChampionBattle_branch_eabef: ; eabef note F#, 8 note G#, 8 loopchannel 0, Music_ChampionBattle_branch_eab9d -; eac4f -Music_ChampionBattle_branch_eac4f: ; eac4f +Music_ChampionBattle_branch_eac4f: intensity $c2 note D#, 2 note D#, 6 @@ -512,9 +503,8 @@ Music_ChampionBattle_branch_eac4f: ; eac4f note D#, 2 intensity $c7 endchannel -; eac5c -Music_ChampionBattle_branch_eac5c: ; eac5c +Music_ChampionBattle_branch_eac5c: intensity $c2 octave 3 note D#, 2 @@ -536,9 +526,8 @@ Music_ChampionBattle_branch_eac5c: ; eac5c note D#, 2 intensity $c7 endchannel -; eac79 -Music_ChampionBattle_branch_eac79: ; eac79 +Music_ChampionBattle_branch_eac79: intensity $c1 note D#, 2 note D#, 4 @@ -549,11 +538,10 @@ Music_ChampionBattle_branch_eac79: ; eac79 note D#, 2 intensity $c5 endchannel -; eac85 -Music_ChampionBattle_Ch3: ; eac85 +Music_ChampionBattle_Ch3: notetype $c, $14 -Music_ChampionBattle_branch_eac88: ; eac88 +Music_ChampionBattle_branch_eac88: octave 3 note D#, 1 note __, 7 @@ -601,11 +589,11 @@ Music_ChampionBattle_branch_eac88: ; eac88 note A#, 2 note F_, 2 note A_, 2 -Music_ChampionBattle_branch_eacc6: ; eacc6 +Music_ChampionBattle_branch_eacc6: note D#, 2 note A#, 2 loopchannel 8, Music_ChampionBattle_branch_eacc6 -Music_ChampionBattle_branch_eaccc: ; eaccc +Music_ChampionBattle_branch_eaccc: note E_, 2 note B_, 2 loopchannel 5, Music_ChampionBattle_branch_eaccc @@ -617,11 +605,11 @@ Music_ChampionBattle_branch_eaccc: ; eaccc note B_, 2 note G_, 2 note A_, 2 -Music_ChampionBattle_branch_eacda: ; eacda +Music_ChampionBattle_branch_eacda: note D#, 2 note A#, 2 loopchannel 8, Music_ChampionBattle_branch_eacda -Music_ChampionBattle_branch_eace0: ; eace0 +Music_ChampionBattle_branch_eace0: note E_, 2 note B_, 2 loopchannel 8, Music_ChampionBattle_branch_eace0 @@ -652,7 +640,7 @@ Music_ChampionBattle_branch_eace0: ; eace0 note D#, 8 note B_, 8 note D#, 8 -Music_ChampionBattle_branch_ead05: ; ead05 +Music_ChampionBattle_branch_ead05: note D#, 2 note F#, 2 loopchannel 16, Music_ChampionBattle_branch_ead05 @@ -670,12 +658,12 @@ Music_ChampionBattle_branch_ead05: ; ead05 note D#, 2 note E_, 2 callchannel Music_ChampionBattle_branch_ead8e -Music_ChampionBattle_branch_ead1d: ; ead1d +Music_ChampionBattle_branch_ead1d: octave 3 note E_, 2 note B_, 2 loopchannel 4, Music_ChampionBattle_branch_ead1d -Music_ChampionBattle_branch_ead24: ; ead24 +Music_ChampionBattle_branch_ead24: note D#, 2 note A#, 2 loopchannel 5, Music_ChampionBattle_branch_ead24 @@ -687,7 +675,7 @@ Music_ChampionBattle_branch_ead24: ; ead24 note __, 2 note D#, 2 note __, 2 -Music_ChampionBattle_branch_ead32: ; ead32 +Music_ChampionBattle_branch_ead32: note E_, 2 note B_, 2 loopchannel 5, Music_ChampionBattle_branch_ead32 @@ -699,17 +687,17 @@ Music_ChampionBattle_branch_ead32: ; ead32 note __, 2 note E_, 2 note __, 2 -Music_ChampionBattle_branch_ead40: ; ead40 +Music_ChampionBattle_branch_ead40: note D#, 2 note G#, 2 loopchannel 8, Music_ChampionBattle_branch_ead40 -Music_ChampionBattle_branch_ead46: ; ead46 +Music_ChampionBattle_branch_ead46: note D#, 2 note A#, 2 loopchannel 7, Music_ChampionBattle_branch_ead46 note B_, 2 note A#, 2 -Music_ChampionBattle_branch_ead4e: ; ead4e +Music_ChampionBattle_branch_ead4e: octave 3 note D#, 2 note A#, 2 @@ -723,9 +711,8 @@ Music_ChampionBattle_branch_ead4e: ; ead4e note A#, 2 note G#, 2 loopchannel 0, Music_ChampionBattle_branch_eacc6 -; ead61 -Music_ChampionBattle_branch_ead61: ; ead61 +Music_ChampionBattle_branch_ead61: note D#, 1 note __, 1 note D#, 1 @@ -737,9 +724,8 @@ Music_ChampionBattle_branch_ead61: ; ead61 note __, 1 note B_, 4 endchannel -; ead6f -Music_ChampionBattle_branch_ead6f: ; ead6f +Music_ChampionBattle_branch_ead6f: note D#, 1 note __, 1 note D#, 1 @@ -760,9 +746,8 @@ Music_ChampionBattle_branch_ead6f: ; ead6f note D#, 1 note __, 1 endchannel -; ead83 -Music_ChampionBattle_branch_ead83: ; ead83 +Music_ChampionBattle_branch_ead83: octave 3 note D#, 2 note F#, 2 @@ -774,9 +759,8 @@ Music_ChampionBattle_branch_ead83: ; ead83 note C#, 2 note C_, 2 endchannel -; ead8e -Music_ChampionBattle_branch_ead8e: ; ead8e +Music_ChampionBattle_branch_ead8e: octave 3 note E_, 2 note B_, 2 @@ -788,4 +772,3 @@ Music_ChampionBattle_branch_ead8e: ; ead8e note D#, 2 note E_, 2 endchannel -; ead99 diff --git a/audio/music/cherrygrovecity.asm b/audio/music/cherrygrovecity.asm index e327eba1f88..9a7e09808cf 100644 --- a/audio/music/cherrygrovecity.asm +++ b/audio/music/cherrygrovecity.asm @@ -1,11 +1,10 @@ -Music_CherrygroveCity: ; f5b03 +Music_CherrygroveCity: musicheader 4, 1, Music_CherrygroveCity_Ch1 musicheader 1, 2, Music_CherrygroveCity_Ch2 musicheader 1, 3, Music_CherrygroveCity_Ch3 musicheader 1, 4, Music_CherrygroveCity_Ch4 -; f5b0f -Music_CherrygroveCity_Ch1: ; f5b0f +Music_CherrygroveCity_Ch1: tempo 152 volume $77 dutycycle $3 @@ -18,7 +17,7 @@ Music_CherrygroveCity_Ch1: ; f5b0f note C_, 2 note D_, 2 note E_, 2 -Music_CherrygroveCity_branch_f5b26: ; f5b26 +Music_CherrygroveCity_branch_f5b26: note A_, 4 note G#, 2 note A_, 2 @@ -92,9 +91,8 @@ Music_CherrygroveCity_branch_f5b26: ; f5b26 octave 3 note C_, 4 loopchannel 0, Music_CherrygroveCity_branch_f5b26 -; f5b74 -Music_CherrygroveCity_Ch2: ; f5b74 +Music_CherrygroveCity_Ch2: dutycycle $3 vibrato $10, $36 stereopanning $f @@ -108,7 +106,7 @@ Music_CherrygroveCity_Ch2: ; f5b74 note G_, 2 note A_, 2 note A#, 2 -Music_CherrygroveCity_branch_f5b87: ; f5b87 +Music_CherrygroveCity_branch_f5b87: intensity $c6 octave 4 note C_, 6 @@ -173,9 +171,8 @@ Music_CherrygroveCity_branch_f5b87: ; f5b87 intensity $a7 note F_, 8 loopchannel 0, Music_CherrygroveCity_branch_f5b87 -; f5bd8 -Music_CherrygroveCity_Ch3: ; f5bd8 +Music_CherrygroveCity_Ch3: notetype $c, $16 note __, 4 octave 4 @@ -186,7 +183,7 @@ Music_CherrygroveCity_Ch3: ; f5bd8 note G_, 2 note F_, 2 note E_, 2 -Music_CherrygroveCity_branch_f5be4: ; f5be4 +Music_CherrygroveCity_branch_f5be4: note A_, 2 note F_, 2 note A_, 2 @@ -284,13 +281,12 @@ Music_CherrygroveCity_branch_f5be4: ; f5be4 note F_, 2 note A_, 2 loopchannel 0, Music_CherrygroveCity_branch_f5be4 -; f5c48 -Music_CherrygroveCity_Ch4: ; f5c48 +Music_CherrygroveCity_Ch4: togglenoise $3 notetype $c note __, 16 -Music_CherrygroveCity_branch_f5c4d: ; f5c4d +Music_CherrygroveCity_branch_f5c4d: note C#, 2 note __, 2 note G_, 2 @@ -307,4 +303,3 @@ Music_CherrygroveCity_branch_f5c4d: ; f5c4d note C#, 2 note G_, 2 loopchannel 0, Music_CherrygroveCity_branch_f5c4d -; f5c60 diff --git a/audio/music/clair.asm b/audio/music/clair.asm index bedfc4deeff..90d676cf083 100644 --- a/audio/music/clair.asm +++ b/audio/music/clair.asm @@ -1,11 +1,10 @@ -Music_Clair: ; 1fa8d +Music_Clair: musicheader 4, 1, Music_Clair_Ch1 musicheader 1, 2, Music_Clair_Ch2 musicheader 1, 3, Music_Clair_Ch3 musicheader 1, 4, Music_Clair_Ch4 -; 1fa99 -Music_Clair_Ch1: ; 1fa99 +Music_Clair_Ch1: tempo 136 volume $77 tone $0001 @@ -13,7 +12,7 @@ Music_Clair_Ch1: ; 1fa99 stereopanning $f notetype $c, $93 dutycycle $3 -Music_Clair_branch_1faab: ; 1faab +Music_Clair_branch_1faab: octave 4 note F_, 1 note F#, 1 @@ -37,7 +36,7 @@ Music_Clair_branch_1faab: ; 1faab note D#, 4 note F_, 4 note G_, 4 -Music_Clair_branch_1fac9: ; 1fac9 +Music_Clair_branch_1fac9: intensity $93 callchannel Music_Clair_branch_1fb12 octave 2 @@ -95,9 +94,8 @@ Music_Clair_branch_1fac9: ; 1fac9 octave 4 note D#, 1 loopchannel 0, Music_Clair_branch_1fac9 -; 1fb12 -Music_Clair_branch_1fb12: ; 1fb12 +Music_Clair_branch_1fb12: dutycycle $3 stereopanning $ff octave 3 @@ -122,9 +120,8 @@ Music_Clair_branch_1fb12: ; 1fb12 note C#, 1 note __, 1 endchannel -; 1fb2e -Music_Clair_branch_1fb2e: ; 1fb2e +Music_Clair_branch_1fb2e: octave 4 note F#, 1 note D#, 1 @@ -144,13 +141,12 @@ Music_Clair_branch_1fb2e: ; 1fb2e note D#, 1 note F#, 1 endchannel -; 1fb41 -Music_Clair_Ch2: ; 1fb41 +Music_Clair_Ch2: dutycycle $3 vibrato $12, $34 notetype $6, $b7 -Music_Clair_branch_1fb49: ; 1fb49 +Music_Clair_branch_1fb49: octave 3 note A#, 2 note B_, 2 @@ -189,7 +185,7 @@ Music_Clair_branch_1fb49: ; 1fb49 note G_, 2 note A#, 2 intensity $b7 -Music_Clair_branch_1fb77: ; 1fb77 +Music_Clair_branch_1fb77: callchannel Music_Clair_branch_1fba6 note F#, 2 note __, 4 @@ -228,9 +224,8 @@ Music_Clair_branch_1fb77: ; 1fb77 note G#, 16 note __, 4 loopchannel 0, Music_Clair_branch_1fb77 -; 1fba6 -Music_Clair_branch_1fba6: ; 1fba6 +Music_Clair_branch_1fba6: octave 4 note F#, 2 note __, 4 @@ -250,9 +245,8 @@ Music_Clair_branch_1fba6: ; 1fba6 note D#, 16 note __, 4 endchannel -; 1fbb9 -Music_Clair_Ch3: ; 1fbb9 +Music_Clair_Ch3: notetype $c, $14 pitchoffset 0, CC octave 3 @@ -274,7 +268,7 @@ Music_Clair_Ch3: ; 1fbb9 note A#, 4 note G#, 4 note G_, 4 -Music_Clair_branch_1fbd1: ; 1fbd1 +Music_Clair_branch_1fbd1: callchannel Music_Clair_branch_1fc3c octave 2 note C#, 2 @@ -375,9 +369,8 @@ Music_Clair_branch_1fbd1: ; 1fbd1 octave 1 note G#, 1 loopchannel 0, Music_Clair_branch_1fbd1 -; 1fc3c -Music_Clair_branch_1fc3c: ; 1fc3c +Music_Clair_branch_1fc3c: octave 1 note G#, 2 note __, 1 @@ -393,9 +386,8 @@ Music_Clair_branch_1fc3c: ; 1fc3c octave 1 note G#, 2 endchannel -; 1fc4b -Music_Clair_Ch4: ; 1fc4b +Music_Clair_Ch4: togglenoise $3 notetype $c stereopanning $f0 @@ -411,7 +403,7 @@ Music_Clair_Ch4: ; 1fc4b note D_, 2 note D_, 1 note D_, 1 -Music_Clair_branch_1fc5e: ; 1fc5e +Music_Clair_branch_1fc5e: stereopanning $ff callchannel Music_Clair_branch_1fc6e note G_, 1 @@ -419,9 +411,8 @@ Music_Clair_branch_1fc5e: ; 1fc5e callchannel Music_Clair_branch_1fc6e note F#, 1 loopchannel 0, Music_Clair_branch_1fc5e -; 1fc6e -Music_Clair_branch_1fc6e: ; 1fc6e +Music_Clair_branch_1fc6e: note D#, 2 stereopanning $f0 note G_, 2 @@ -440,4 +431,3 @@ Music_Clair_branch_1fc6e: ; 1fc6e stereopanning $f0 note G_, 1 endchannel -; 1fc87 diff --git a/audio/music/contestresults.asm b/audio/music/contestresults.asm index e6d730daf09..85d8291e765 100644 --- a/audio/music/contestresults.asm +++ b/audio/music/contestresults.asm @@ -1,15 +1,14 @@ -Music_ContestResults: ; efb3e +Music_ContestResults: musicheader 4, 1, Music_ContestResults_Ch1 musicheader 1, 2, Music_ContestResults_Ch2 musicheader 1, 3, Music_ContestResults_Ch3 musicheader 1, 4, Music_ContestResults_Ch4 -; efb4a -Music_ContestResults_Ch1: ; efb4a +Music_ContestResults_Ch1: tempo 144 volume $77 notetype $c, $51 -Music_ContestResults_branch_efb52: ; efb52 +Music_ContestResults_branch_efb52: note __, 2 octave 2 note G_, 1 @@ -48,11 +47,10 @@ Music_ContestResults_branch_efb52: ; efb52 note G_, 1 note __, 1 loopchannel 0, Music_ContestResults_branch_efb52 -; efb7b -Music_ContestResults_Ch2: ; efb7b +Music_ContestResults_Ch2: notetype $c, $61 -Music_ContestResults_branch_efb7e: ; efb7e +Music_ContestResults_branch_efb7e: octave 2 note C_, 2 octave 3 @@ -93,7 +91,7 @@ Music_ContestResults_branch_efb7e: ; efb7e octave 3 note F_, 1 note __, 1 -Music_ContestResults_branch_efba6: ; efba6 +Music_ContestResults_branch_efba6: octave 2 note D_, 2 octave 3 @@ -126,12 +124,11 @@ Music_ContestResults_branch_efba6: ; efba6 note D_, 1 note __, 1 loopchannel 0, Music_ContestResults_branch_efb7e -; efbcc -Music_ContestResults_Ch3: ; efbcc +Music_ContestResults_Ch3: vibrato $8, $24 notetype $c, $23 -Music_ContestResults_branch_efbd2: ; efbd2 +Music_ContestResults_branch_efbd2: octave 4 note E_, 5 note __, 1 @@ -152,12 +149,11 @@ Music_ContestResults_branch_efbd2: ; efbd2 note A_, 8 note G_, 8 loopchannel 0, Music_ContestResults_branch_efbd2 -; efbe9 -Music_ContestResults_Ch4: ; efbe9 +Music_ContestResults_Ch4: togglenoise $4 notetype $6 -Music_ContestResults_branch_efbed: ; efbed +Music_ContestResults_branch_efbed: note C#, 4 note C#, 4 note C#, 2 @@ -175,4 +171,3 @@ Music_ContestResults_branch_efbed: ; efbed note G_, 1 note G_, 1 loopchannel 0, Music_ContestResults_branch_efbed -; efc01 diff --git a/audio/music/credits.asm b/audio/music/credits.asm index 708b70ee4f3..8d862240bba 100644 --- a/audio/music/credits.asm +++ b/audio/music/credits.asm @@ -1,11 +1,10 @@ -Music_Credits: ; 1f31c +Music_Credits: musicheader 4, 1, Music_Credits_Ch1 musicheader 1, 2, Music_Credits_Ch2 musicheader 1, 3, Music_Credits_Ch3 musicheader 1, 4, Music_Credits_Ch4 -; 1f328 -Music_Credits_Ch1: ; 1f328 +Music_Credits_Ch1: tempo 139 volume $77 stereopanning $f @@ -181,7 +180,7 @@ Music_Credits_Ch1: ; 1f328 octave 5 note C#, 6 notetype $c, $a7 -Music_Credits_branch_1f407: ; 1f407 +Music_Credits_branch_1f407: octave 3 note A_, 1 octave 4 @@ -280,9 +279,8 @@ Music_Credits_branch_1f407: ; 1f407 note __, 16 note __, 16 endchannel -; 1f483 -Music_Credits_branch_1f483: ; 1f483 +Music_Credits_branch_1f483: note C_, 16 note F#, 1 note G_, 3 @@ -389,9 +387,8 @@ Music_Credits_branch_1f483: ; 1f483 note C_, 1 note __, 1 endchannel -; 1f4ed -Music_Credits_branch_1f4ed: ; 1f4ed +Music_Credits_branch_1f4ed: octave 4 note C_, 4 octave 3 @@ -403,9 +400,8 @@ Music_Credits_branch_1f4ed: ; 1f4ed note C_, 4 note D#, 4 endchannel -; 1f4f8 -Music_Credits_branch_1f4f8: ; 1f4f8 +Music_Credits_branch_1f4f8: octave 3 note A_, 2 octave 4 @@ -503,9 +499,8 @@ Music_Credits_branch_1f4f8: ; 1f4f8 note C_, 2 note F_, 2 endchannel -; 1f559 -Music_Credits_branch_1f559: ; 1f559 +Music_Credits_branch_1f559: octave 3 note A_, 2 octave 4 @@ -547,9 +542,8 @@ Music_Credits_branch_1f559: ; 1f559 note A#, 2 note A_, 2 endchannel -; 1f582 -Music_Credits_branch_1f582: ; 1f582 +Music_Credits_branch_1f582: note __, 6 octave 3 note D_, 6 @@ -561,9 +555,8 @@ Music_Credits_branch_1f582: ; 1f582 note F#, 6 note C#, 6 endchannel -; 1f58d -Music_Credits_Ch2: ; 1f58d +Music_Credits_Ch2: dutycycle $1 vibrato $14, $23 notetype $c, $2f @@ -723,7 +716,7 @@ Music_Credits_Ch2: ; 1f58d octave 2 note F#, 1 note __, 1 -Music_Credits_branch_1f657: ; 1f657 +Music_Credits_branch_1f657: octave 1 note G_, 2 octave 2 @@ -818,9 +811,8 @@ Music_Credits_branch_1f657: ; 1f657 note __, 16 note __, 16 endchannel -; 1f6cb -Music_Credits_branch_1f6cb: ; 1f6cb +Music_Credits_branch_1f6cb: octave 2 note C_, 4 intensity $b1 @@ -931,9 +923,8 @@ Music_Credits_branch_1f6cb: ; 1f6cb octave 3 note C_, 2 endchannel -; 1f73f -Music_Credits_branch_1f73f: ; 1f73f +Music_Credits_branch_1f73f: octave 1 note G_, 4 note __, 4 @@ -943,9 +934,8 @@ Music_Credits_branch_1f73f: ; 1f73f note G_, 12 note F#, 8 endchannel -; 1f748 -Music_Credits_branch_1f748: ; 1f748 +Music_Credits_branch_1f748: octave 4 note A_, 8 note B_, 8 @@ -980,9 +970,8 @@ Music_Credits_branch_1f748: ; 1f748 octave 5 note C_, 4 endchannel -; 1f772 -Music_Credits_Ch3: ; 1f772 +Music_Credits_Ch3: vibrato $16, $23 notetype $c, $34 stereopanning $ff @@ -1238,9 +1227,8 @@ Music_Credits_Ch3: ; 1f772 note __, 16 note __, 16 endchannel -; 1f8aa -Music_Credits_branch_1f8aa: ; 1f8aa +Music_Credits_branch_1f8aa: note G_, 16 octave 6 note C#, 1 @@ -1280,9 +1268,8 @@ Music_Credits_branch_1f8aa: ; 1f8aa notetype $c, $14 note D_, 16 endchannel -; 1f8db -Music_Credits_branch_1f8db: ; 1f8db +Music_Credits_branch_1f8db: notetype $6, $14 note F#, 1 note G_, 3 @@ -1293,9 +1280,8 @@ Music_Credits_branch_1f8db: ; 1f8db note G_, 12 note G#, 8 endchannel -; 1f8e7 -Music_Credits_branch_1f8e7: ; 1f8e7 +Music_Credits_branch_1f8e7: octave 3 note F_, 4 note __, 2 @@ -1373,9 +1359,8 @@ Music_Credits_branch_1f8e7: ; 1f8e7 octave 3 note G#, 2 endchannel -; 1f934 -Music_Credits_branch_1f934: ; 1f934 +Music_Credits_branch_1f934: octave 2 note F_, 4 note __, 2 @@ -1399,9 +1384,8 @@ Music_Credits_branch_1f934: ; 1f934 note E_, 2 note F_, 2 endchannel -; 1f94b -Music_Credits_branch_1f94b: ; 1f94b +Music_Credits_branch_1f94b: octave 2 note F#, 4 note __, 2 @@ -1442,9 +1426,8 @@ Music_Credits_branch_1f94b: ; 1f94b note G_, 2 note D_, 2 endchannel -; 1f973 -Music_Credits_Ch4: ; 1f973 +Music_Credits_Ch4: togglenoise $3 notetype $c note G#, 1 @@ -1480,7 +1463,7 @@ Music_Credits_Ch4: ; 1f973 callchannel Music_Credits_branch_1fa4d callchannel Music_Credits_branch_1fa4d callchannel Music_Credits_branch_1fa6d -Music_Credits_branch_1f9a8: ; 1f9a8 +Music_Credits_branch_1f9a8: note A#, 2 note G_, 1 note G_, 1 @@ -1508,7 +1491,7 @@ Music_Credits_branch_1f9a8: ; 1f9a8 note C#, 1 note D_, 1 note D_, 1 -Music_Credits_branch_1f9c6: ; 1f9c6 +Music_Credits_branch_1f9c6: note A#, 2 note G_, 1 note G_, 1 @@ -1542,7 +1525,7 @@ Music_Credits_branch_1f9c6: ; 1f9c6 callchannel Music_Credits_branch_1fa4d callchannel Music_Credits_branch_1fa4d callchannel Music_Credits_branch_1fa6d -Music_Credits_branch_1f9f2: ; 1f9f2 +Music_Credits_branch_1f9f2: note A#, 2 note G_, 1 note G_, 1 @@ -1621,9 +1604,8 @@ Music_Credits_branch_1f9f2: ; 1f9f2 note __, 16 note __, 16 endchannel -; 1fa4d -Music_Credits_branch_1fa4d: ; 1fa4d +Music_Credits_branch_1fa4d: note G#, 1 note G_, 1 note G_, 1 @@ -1656,9 +1638,8 @@ Music_Credits_branch_1fa4d: ; 1fa4d note G_, 1 note F#, 2 endchannel -; 1fa6d -Music_Credits_branch_1fa6d: ; 1fa6d +Music_Credits_branch_1fa6d: note G#, 1 note G_, 1 note G_, 1 @@ -1691,4 +1672,3 @@ Music_Credits_branch_1fa6d: ; 1fa6d note A#, 1 note D_, 1 endchannel -; 1fa8d diff --git a/audio/music/crystalopening.asm b/audio/music/crystalopening.asm index e01d57d424a..ca2e525de57 100644 --- a/audio/music/crystalopening.asm +++ b/audio/music/crystalopening.asm @@ -1,11 +1,10 @@ -Music_CrystalOpening: ; 1786e8 +Music_CrystalOpening: musicheader 4, 1, Music_CrystalOpening_Ch1 musicheader 1, 2, Music_CrystalOpening_Ch2 musicheader 1, 3, Music_CrystalOpening_Ch3 musicheader 1, 4, Music_CrystalOpening_Ch4 -; 1786f4 -Music_CrystalOpening_Ch1: ; 1786f4 +Music_CrystalOpening_Ch1: tempo 136 volume $77 tone $0002 @@ -121,9 +120,8 @@ Music_CrystalOpening_Ch1: ; 1786f4 octave 2 note D_, 16 endchannel -; 17877a -Music_CrystalOpening_Ch2: ; 17877a +Music_CrystalOpening_Ch2: notetype $c, $a2 dutycycle $3 vibrato $8, $44 @@ -177,9 +175,8 @@ Music_CrystalOpening_Ch2: ; 17877a octave 3 note D_, 16 endchannel -; 1787c8 -Music_CrystalOpening_Ch3: ; 1787c8 +Music_CrystalOpening_Ch3: notetype $c, $16 octave 1 note B_, 4 @@ -242,9 +239,8 @@ Music_CrystalOpening_Ch3: ; 1787c8 note D_, 1 note __, 15 endchannel -; 178810 -Music_CrystalOpening_Ch4: ; 178810 +Music_CrystalOpening_Ch4: stereopanning $f togglenoise $3 notetype $c @@ -361,4 +357,3 @@ Music_CrystalOpening_Ch4: ; 178810 note __, 16 note __, 16 endchannel -; 178889 diff --git a/audio/music/dancinghall.asm b/audio/music/dancinghall.asm index 1241d60761a..6884000b9d6 100644 --- a/audio/music/dancinghall.asm +++ b/audio/music/dancinghall.asm @@ -1,19 +1,18 @@ -Music_DancingHall: ; ef9bc +Music_DancingHall: musicheader 3, 1, Music_DancingHall_Ch1 musicheader 1, 2, Music_DancingHall_Ch2 musicheader 1, 3, Music_DancingHall_Ch3 -; ef9c5 db $3 -Music_DancingHall_Ch1: ; ef9c6 +Music_DancingHall_Ch1: tempo 208 volume $77 stereopanning $f notetype $6, $b7 note __, 3 dutycycle $0 -Music_DancingHall_branch_ef9d3: ; ef9d3 +Music_DancingHall_branch_ef9d3: notetype $c, $b7 callchannel Music_DancingHall_branch_efa17 note __, 16 @@ -64,9 +63,8 @@ Music_DancingHall_branch_ef9d3: ; ef9d3 note __, 1 note F_, 2 loopchannel 0, Music_DancingHall_branch_ef9d3 -; efa17 -Music_DancingHall_branch_efa17: ; efa17 +Music_DancingHall_branch_efa17: octave 3 note B_, 1 note __, 1 @@ -88,15 +86,14 @@ Music_DancingHall_branch_efa17: ; efa17 note D_, 1 note __, 1 endchannel -; efa2c -Music_DancingHall_Ch2: ; efa2c +Music_DancingHall_Ch2: stereopanning $f0 notetype $6, $a1 dutycycle $0 vibrato $10, $24 note __, 3 -Music_DancingHall_branch_efa37: ; efa37 +Music_DancingHall_branch_efa37: notetype $6, $a2 callchannel Music_DancingHall_branch_efa7a callchannel Music_DancingHall_branch_efa7a @@ -144,9 +141,8 @@ Music_DancingHall_branch_efa37: ; efa37 note __, 1 note D_, 2 loopchannel 0, Music_DancingHall_branch_efa37 -; efa7a -Music_DancingHall_branch_efa7a: ; efa7a +Music_DancingHall_branch_efa7a: intensity $a1 octave 4 note E_, 4 @@ -222,9 +218,8 @@ Music_DancingHall_branch_efa7a: ; efa7a octave 4 note D_, 1 endchannel -; efad6 -Music_DancingHall_Ch3: ; efad6 +Music_DancingHall_Ch3: stereopanning $ff vibrato $16, $24 notetype $6, $10 @@ -233,7 +228,7 @@ Music_DancingHall_Ch3: ; efad6 note B_, 1 octave 6 note D_, 1 -Music_DancingHall_branch_efae3: ; efae3 +Music_DancingHall_branch_efae3: note E_, 13 note D_, 1 note E_, 1 @@ -308,4 +303,3 @@ Music_DancingHall_branch_efae3: ; efae3 octave 6 note D_, 1 loopchannel 0, Music_DancingHall_branch_efae3 -; efb3e diff --git a/audio/music/darkcave.asm b/audio/music/darkcave.asm index 89f9bc56b3a..8d2877d069f 100644 --- a/audio/music/darkcave.asm +++ b/audio/music/darkcave.asm @@ -1,11 +1,10 @@ -Music_DarkCave: ; ea2be +Music_DarkCave: musicheader 4, 1, Music_DarkCave_Ch1 musicheader 1, 2, Music_DarkCave_Ch2 musicheader 1, 3, Music_DarkCave_Ch3 musicheader 1, 4, Music_DarkCave_Ch4 -; ea2ca -Music_DarkCave_Ch1: ; ea2ca +Music_DarkCave_Ch1: tempo 128 volume $77 dutycycle $3 @@ -13,7 +12,7 @@ Music_DarkCave_Ch1: ; ea2ca vibrato $11, $15 stereopanning $f0 notetype $c, $a7 -Music_DarkCave_branch_ea2dc: ; ea2dc +Music_DarkCave_branch_ea2dc: note __, 16 loopchannel 4, Music_DarkCave_branch_ea2dc octave 3 @@ -22,7 +21,7 @@ Music_DarkCave_branch_ea2dc: ; ea2dc note C#, 16 note C_, 16 intensity $a3 -Music_DarkCave_branch_ea2e8: ; ea2e8 +Music_DarkCave_branch_ea2e8: callchannel Music_DarkCave_branch_ea333 loopchannel 3, Music_DarkCave_branch_ea2e8 intensity $b7 @@ -43,7 +42,7 @@ Music_DarkCave_branch_ea2e8: ; ea2e8 note D#, 8 note C_, 8 intensity $a3 -Music_DarkCave_branch_ea303: ; ea303 +Music_DarkCave_branch_ea303: callchannel Music_DarkCave_branch_ea333 loopchannel 2, Music_DarkCave_branch_ea303 note __, 16 @@ -74,13 +73,12 @@ Music_DarkCave_branch_ea303: ; ea303 note G_, 2 note G#, 4 intensity $a3 -Music_DarkCave_branch_ea328: ; ea328 +Music_DarkCave_branch_ea328: callchannel Music_DarkCave_branch_ea333 loopchannel 2, Music_DarkCave_branch_ea328 loopchannel 0, Music_DarkCave_branch_ea2e8 -; ea333 -Music_DarkCave_branch_ea333: ; ea333 +Music_DarkCave_branch_ea333: octave 4 note D#, 2 octave 3 @@ -136,14 +134,13 @@ Music_DarkCave_branch_ea333: ; ea333 octave 3 note A#, 2 endchannel -; ea36a -Music_DarkCave_Ch2: ; ea36a +Music_DarkCave_Ch2: dutycycle $1 vibrato $12, $36 stereopanning $f notetype $c, $a7 -Music_DarkCave_branch_ea374: ; ea374 +Music_DarkCave_branch_ea374: note __, 16 loopchannel 4, Music_DarkCave_branch_ea374 octave 3 @@ -151,7 +148,7 @@ Music_DarkCave_branch_ea374: ; ea374 note A#, 16 note F_, 16 note G_, 16 -Music_DarkCave_branch_ea37e: ; ea37e +Music_DarkCave_branch_ea37e: note __, 16 loopchannel 4, Music_DarkCave_branch_ea37e note __, 8 @@ -347,14 +344,13 @@ Music_DarkCave_branch_ea37e: ; ea37e note F_, 16 note D#, 16 loopchannel 0, Music_DarkCave_branch_ea37e -; ea46e -Music_DarkCave_Ch3: ; ea46e +Music_DarkCave_Ch3: notetype $c, $27 -Music_DarkCave_branch_ea471: ; ea471 +Music_DarkCave_branch_ea471: callchannel Music_DarkCave_branch_ea4ce loopchannel 2, Music_DarkCave_branch_ea471 -Music_DarkCave_branch_ea478: ; ea478 +Music_DarkCave_branch_ea478: callchannel Music_DarkCave_branch_ea4ce loopchannel 7, Music_DarkCave_branch_ea478 callchannel Music_DarkCave_branch_ea4c3 @@ -386,9 +382,8 @@ Music_DarkCave_branch_ea478: ; ea478 callchannel Music_DarkCave_branch_ea4a7 callchannel Music_DarkCave_branch_ea4a7 loopchannel 0, Music_DarkCave_branch_ea478 -; ea4a7 -Music_DarkCave_branch_ea4a7: ; ea4a7 +Music_DarkCave_branch_ea4a7: octave 3 note C_, 4 note G_, 2 @@ -417,9 +412,8 @@ Music_DarkCave_branch_ea4a7: ; ea4a7 note C_, 2 note C#, 4 endchannel -; ea4c3 -Music_DarkCave_branch_ea4c3: ; ea4c3 +Music_DarkCave_branch_ea4c3: octave 3 note C_, 4 note G_, 2 @@ -431,9 +425,8 @@ Music_DarkCave_branch_ea4c3: ; ea4c3 octave 2 note A#, 12 endchannel -; ea4ce -Music_DarkCave_branch_ea4ce: ; ea4ce +Music_DarkCave_branch_ea4ce: octave 2 note C_, 4 note G_, 2 @@ -462,12 +455,11 @@ Music_DarkCave_branch_ea4ce: ; ea4ce note C_, 2 note C#, 4 endchannel -; ea4ea -Music_DarkCave_Ch4: ; ea4ea +Music_DarkCave_Ch4: togglenoise $3 notetype $c -Music_DarkCave_branch_ea4ee: ; ea4ee +Music_DarkCave_branch_ea4ee: stereopanning $ff note D#, 8 note D#, 8 @@ -489,4 +481,3 @@ Music_DarkCave_branch_ea4ee: ; ea4ee note C#, 2 note C#, 2 loopchannel 0, Music_DarkCave_branch_ea4ee -; ea50d diff --git a/audio/music/dragonsden.asm b/audio/music/dragonsden.asm index 6778a09b2f7..2dc0ae09ad1 100644 --- a/audio/music/dragonsden.asm +++ b/audio/music/dragonsden.asm @@ -1,18 +1,17 @@ -Music_DragonsDen: ; eece8 +Music_DragonsDen: musicheader 4, 1, Music_DragonsDen_Ch1 musicheader 1, 2, Music_DragonsDen_Ch2 musicheader 1, 3, Music_DragonsDen_Ch3 musicheader 1, 4, Music_DragonsDen_Ch4 -; eecf4 -Music_DragonsDen_Ch1: ; eecf4 +Music_DragonsDen_Ch1: tempo 144 volume $77 dutycycle $0 tone $0004 stereopanning $f0 notetype $c, $80 -Music_DragonsDen_branch_eed03: ; eed03 +Music_DragonsDen_branch_eed03: callchannel Music_DragonsDen_branch_eed1e note __, 16 callchannel Music_DragonsDen_branch_eed2d @@ -25,9 +24,8 @@ Music_DragonsDen_branch_eed03: ; eed03 note __, 10 notetype $c, $b7 loopchannel 0, Music_DragonsDen_branch_eed03 -; eed1e -Music_DragonsDen_branch_eed1e: ; eed1e +Music_DragonsDen_branch_eed1e: octave 3 note A#, 12 note A_, 4 @@ -43,9 +41,8 @@ Music_DragonsDen_branch_eed1e: ; eed1e octave 3 note G#, 16 endchannel -; eed2d -Music_DragonsDen_branch_eed2d: ; eed2d +Music_DragonsDen_branch_eed2d: intensity $b1 note __, 2 octave 4 @@ -60,14 +57,13 @@ Music_DragonsDen_branch_eed2d: ; eed2d note C#, 2 note C#, 2 endchannel -; eed3c -Music_DragonsDen_Ch2: ; eed3c +Music_DragonsDen_Ch2: dutycycle $0 tone $0004 stereopanning $f notetype $c, $90 -Music_DragonsDen_branch_eed46: ; eed46 +Music_DragonsDen_branch_eed46: callchannel Music_DragonsDen_branch_eed5e note __, 16 callchannel Music_DragonsDen_branch_eed6b @@ -77,9 +73,8 @@ Music_DragonsDen_branch_eed46: ; eed46 note __, 16 notetype $c, $c7 loopchannel 0, Music_DragonsDen_branch_eed46 -; eed5e -Music_DragonsDen_branch_eed5e: ; eed5e +Music_DragonsDen_branch_eed5e: octave 4 note D#, 12 note D_, 4 @@ -93,11 +88,10 @@ Music_DragonsDen_branch_eed5e: ; eed5e note G_, 4 note C#, 16 endchannel -; eed6b -Music_DragonsDen_branch_eed6b: ; eed6b +Music_DragonsDen_branch_eed6b: intensity $c1 -Music_DragonsDen_branch_eed6d: ; eed6d +Music_DragonsDen_branch_eed6d: octave 5 note C#, 4 octave 4 @@ -106,10 +100,9 @@ Music_DragonsDen_branch_eed6d: ; eed6d note G#, 4 loopchannel 2, Music_DragonsDen_branch_eed6d endchannel -; eed78 -Music_DragonsDen_Ch3: ; eed78 -Music_DragonsDen_branch_eed78: ; eed78 +Music_DragonsDen_Ch3: +Music_DragonsDen_branch_eed78: notetype $c, $14 octave 4 note C#, 2 @@ -136,7 +129,7 @@ Music_DragonsDen_branch_eed78: ; eed78 loopchannel 15, Music_DragonsDen_branch_eed78 note __, 16 notetype $6, $27 -Music_DragonsDen_branch_eed99: ; eed99 +Music_DragonsDen_branch_eed99: octave 3 note C#, 4 octave 2 @@ -161,14 +154,13 @@ Music_DragonsDen_branch_eed99: ; eed99 note C#, 2 loopchannel 16, Music_DragonsDen_branch_eed99 loopchannel 0, Music_DragonsDen_branch_eed78 -; eedb7 -Music_DragonsDen_Ch4: ; eedb7 +Music_DragonsDen_Ch4: togglenoise $0 notetype $c note __, 16 note __, 16 -Music_DragonsDen_branch_eedbd: ; eedbd +Music_DragonsDen_branch_eedbd: stereopanning $f0 note F_, 4 stereopanning $f @@ -177,4 +169,3 @@ Music_DragonsDen_branch_eedbd: ; eedbd stereopanning $f0 note F#, 4 loopchannel 0, Music_DragonsDen_branch_eedbd -; eedcb diff --git a/audio/music/ecruteakcity.asm b/audio/music/ecruteakcity.asm index 77b349295a2..df60e9eb0a8 100644 --- a/audio/music/ecruteakcity.asm +++ b/audio/music/ecruteakcity.asm @@ -1,16 +1,15 @@ -Music_EcruteakCity: ; ef2d0 +Music_EcruteakCity: musicheader 3, 1, Music_EcruteakCity_Ch1 musicheader 1, 2, Music_EcruteakCity_Ch2 musicheader 1, 3, Music_EcruteakCity_Ch3 -; ef2d9 -Music_EcruteakCity_Ch1: ; ef2d9 +Music_EcruteakCity_Ch1: tempo 197 volume $77 stereopanning $f vibrato $12, $25 dutycycle $2 -Music_EcruteakCity_branch_ef2e5: ; ef2e5 +Music_EcruteakCity_branch_ef2e5: notetype $c, $57 note __, 10 octave 4 @@ -145,9 +144,8 @@ Music_EcruteakCity_branch_ef2e5: ; ef2e5 note C_, 2 callchannel Music_EcruteakCity_branch_ef391 loopchannel 0, Music_EcruteakCity_branch_ef2e5 -; ef37f -Music_EcruteakCity_branch_ef37f: ; ef37f +Music_EcruteakCity_branch_ef37f: octave 5 note E_, 2 note C_, 2 @@ -163,9 +161,8 @@ Music_EcruteakCity_branch_ef37f: ; ef37f note C_, 2 loopchannel 2, Music_EcruteakCity_branch_ef37f endchannel -; ef391 -Music_EcruteakCity_branch_ef391: ; ef391 +Music_EcruteakCity_branch_ef391: octave 5 note D_, 2 octave 4 @@ -211,7 +208,7 @@ Music_EcruteakCity_branch_ef391: ; ef391 note C_, 2 octave 3 note A_, 2 -Music_EcruteakCity_branch_ef3be: ; ef3be +Music_EcruteakCity_branch_ef3be: octave 4 note F_, 2 note A_, 2 @@ -227,7 +224,7 @@ Music_EcruteakCity_branch_ef3be: ; ef3be note C_, 2 note F_, 2 loopchannel 2, Music_EcruteakCity_branch_ef3be -Music_EcruteakCity_branch_ef3d0: ; ef3d0 +Music_EcruteakCity_branch_ef3d0: octave 4 note G_, 2 note B_, 2 @@ -249,13 +246,12 @@ Music_EcruteakCity_branch_ef3d0: ; ef3d0 note G_, 16 dutycycle $2 endchannel -; ef3eb -Music_EcruteakCity_Ch2: ; ef3eb +Music_EcruteakCity_Ch2: vibrato $12, $25 dutycycle $3 stereopanning $f0 -Music_EcruteakCity_branch_ef3f2: ; ef3f2 +Music_EcruteakCity_branch_ef3f2: notetype $6, $67 note __, 16 note __, 5 @@ -472,11 +468,10 @@ Music_EcruteakCity_branch_ef3f2: ; ef3f2 note D_, 2 note E_, 16 loopchannel 0, Music_EcruteakCity_branch_ef3f2 -; ef4e1 -Music_EcruteakCity_Ch3: ; ef4e1 +Music_EcruteakCity_Ch3: stereopanning $ff -Music_EcruteakCity_branch_ef4e3: ; ef4e3 +Music_EcruteakCity_branch_ef4e3: vibrato $12, $25 notetype $c, $25 octave 3 @@ -598,9 +593,8 @@ Music_EcruteakCity_branch_ef4e3: ; ef4e3 note E_, 8 note D_, 8 loopchannel 0, Music_EcruteakCity_branch_ef4e3 -; ef569 -Music_EcruteakCity_branch_ef569: ; ef569 +Music_EcruteakCity_branch_ef569: octave 3 note F_, 4 note __, 2 @@ -671,4 +665,3 @@ Music_EcruteakCity_branch_ef569: ; ef569 note __, 1 note B_, 1 endchannel -; ef5b1 diff --git a/audio/music/elmslab.asm b/audio/music/elmslab.asm index 39bf03a9bac..38b04b590dc 100644 --- a/audio/music/elmslab.asm +++ b/audio/music/elmslab.asm @@ -1,11 +1,10 @@ -Music_ElmsLab: ; ea040 +Music_ElmsLab: musicheader 4, 1, Music_ElmsLab_Ch1 musicheader 1, 2, Music_ElmsLab_Ch2 musicheader 1, 3, Music_ElmsLab_Ch3 musicheader 1, 4, Music_ElmsLab_Ch4 -; ea04c -Music_ElmsLab_Ch1: ; ea04c +Music_ElmsLab_Ch1: tempo 144 volume $77 dutycycle $3 @@ -34,7 +33,7 @@ Music_ElmsLab_Ch1: ; ea04c note A_, 4 note A_, 4 note A_, 2 -Music_ElmsLab_branch_ea075: ; ea075 +Music_ElmsLab_branch_ea075: note __, 2 note A_, 2 note G#, 2 @@ -182,9 +181,8 @@ Music_ElmsLab_branch_ea075: ; ea075 note F_, 2 note F_, 4 loopchannel 0, Music_ElmsLab_branch_ea075 -; ea128 -Music_ElmsLab_Ch2: ; ea128 +Music_ElmsLab_Ch2: dutycycle $3 vibrato $10, $26 stereopanning $f @@ -214,7 +212,7 @@ Music_ElmsLab_Ch2: ; ea128 note C_, 4 note C_, 2 stereopanning $ff -Music_ElmsLab_branch_ea14f: ; ea14f +Music_ElmsLab_branch_ea14f: intensity $c6 octave 4 note F_, 6 @@ -350,9 +348,8 @@ Music_ElmsLab_branch_ea14f: ; ea14f octave 3 note E_, 2 loopchannel 0, Music_ElmsLab_branch_ea14f -; ea1fd -Music_ElmsLab_Ch3: ; ea1fd +Music_ElmsLab_Ch3: stereopanning $f notetype $c, $25 note __, 8 @@ -375,7 +372,7 @@ Music_ElmsLab_Ch3: ; ea1fd note C_, 2 note D_, 2 note E_, 2 -Music_ElmsLab_branch_ea216: ; ea216 +Music_ElmsLab_branch_ea216: note F_, 2 note A_, 2 note C_, 2 @@ -528,15 +525,13 @@ Music_ElmsLab_branch_ea216: ; ea216 note F_, 2 note A_, 2 loopchannel 0, Music_ElmsLab_branch_ea216 -; ea2b1 -Music_ElmsLab_Ch4: ; ea2b1 +Music_ElmsLab_Ch4: stereopanning $f0 togglenoise $0 notetype $c note __, 16 note __, 2 -Music_ElmsLab_branch_ea2b9: ; ea2b9 +Music_ElmsLab_branch_ea2b9: note G_, 4 loopchannel 0, Music_ElmsLab_branch_ea2b9 -; ea2be diff --git a/audio/music/evolution.asm b/audio/music/evolution.asm index 61f7af716c0..47e115431c6 100644 --- a/audio/music/evolution.asm +++ b/audio/music/evolution.asm @@ -1,11 +1,10 @@ -Music_Evolution: ; f06e1 +Music_Evolution: musicheader 4, 1, Music_Evolution_Ch1 musicheader 1, 2, Music_Evolution_Ch2 musicheader 1, 3, Music_Evolution_Ch3 musicheader 1, 4, Music_Evolution_Ch4 -; f06ed -Music_Evolution_Ch1: ; f06ed +Music_Evolution_Ch1: tempo 132 volume $77 vibrato $6, $34 @@ -24,7 +23,7 @@ Music_Evolution_Ch1: ; f06ed note __, 4 dutycycle $3 stereopanning $f -Music_Evolution_branch_f0713: ; f0713 +Music_Evolution_branch_f0713: callchannel Music_Evolution_branch_f0737 notetype $c, $a4 note F#, 4 @@ -39,9 +38,8 @@ Music_Evolution_branch_f0713: ; f0713 notetype $c, $a4 note G#, 4 loopchannel 0, Music_Evolution_branch_f0713 -; f0737 -Music_Evolution_branch_f0737: ; f0737 +Music_Evolution_branch_f0737: notetype $c, $a2 octave 3 note C_, 4 @@ -52,9 +50,8 @@ Music_Evolution_branch_f0737: ; f0737 note G_, 4 note C_, 4 endchannel -; f0743 -Music_Evolution_branch_f0743: ; f0743 +Music_Evolution_branch_f0743: notetype $c, $a2 octave 3 note D_, 4 @@ -65,9 +62,8 @@ Music_Evolution_branch_f0743: ; f0743 note A_, 4 note D_, 4 endchannel -; f074f -Music_Evolution_Ch2: ; f074f +Music_Evolution_Ch2: dutycycle $2 vibrato $8, $25 notetype $c, $a2 @@ -79,7 +75,7 @@ Music_Evolution_Ch2: ; f074f note __, 4 dutycycle $3 stereopanning $f0 -Music_Evolution_branch_f0761: ; f0761 +Music_Evolution_branch_f0761: callchannel Music_Evolution_branch_f0787 notetype $c, $b5 note A_, 4 @@ -96,9 +92,8 @@ Music_Evolution_branch_f0761: ; f0761 note C#, 4 octave 3 loopchannel 0, Music_Evolution_branch_f0761 -; f0787 -Music_Evolution_branch_f0787: ; f0787 +Music_Evolution_branch_f0787: notetype $c, $b2 octave 3 note G_, 4 @@ -109,9 +104,8 @@ Music_Evolution_branch_f0787: ; f0787 note D_, 4 note G_, 4 endchannel -; f0793 -Music_Evolution_branch_f0793: ; f0793 +Music_Evolution_branch_f0793: notetype $c, $b2 octave 3 note A_, 4 @@ -122,12 +116,11 @@ Music_Evolution_branch_f0793: ; f0793 note E_, 4 note A_, 4 endchannel -; f079f -Music_Evolution_Ch3: ; f079f +Music_Evolution_Ch3: notetype $c, $16 note __, 8 -Music_Evolution_branch_f07a3: ; f07a3 +Music_Evolution_branch_f07a3: callchannel Music_Evolution_branch_f07bf octave 3 note A_, 4 @@ -142,9 +135,8 @@ Music_Evolution_branch_f07a3: ; f07a3 octave 4 note C#, 4 loopchannel 0, Music_Evolution_branch_f07a3 -; f07bf -Music_Evolution_branch_f07bf: ; f07bf +Music_Evolution_branch_f07bf: octave 2 note A_, 2 note __, 2 @@ -167,9 +159,8 @@ Music_Evolution_branch_f07bf: ; f07bf note A_, 2 note __, 2 endchannel -; f07d5 -Music_Evolution_branch_f07d5: ; f07d5 +Music_Evolution_branch_f07d5: octave 2 note B_, 2 note __, 2 @@ -192,13 +183,12 @@ Music_Evolution_branch_f07d5: ; f07d5 note A_, 2 note __, 2 endchannel -; f07eb -Music_Evolution_Ch4: ; f07eb +Music_Evolution_Ch4: togglenoise $5 notetype $c note __, 8 -Music_Evolution_branch_f07f0: ; f07f0 +Music_Evolution_branch_f07f0: stereopanning $f0 note A#, 6 note A#, 4 @@ -207,4 +197,3 @@ Music_Evolution_branch_f07f0: ; f07f0 note E_, 2 note E_, 2 loopchannel 0, Music_Evolution_branch_f07f0 -; f07fd diff --git a/audio/music/gamecorner.asm b/audio/music/gamecorner.asm index 844ceee2f4f..d275bc9a381 100644 --- a/audio/music/gamecorner.asm +++ b/audio/music/gamecorner.asm @@ -1,17 +1,16 @@ -Music_GameCorner: ; edd6d +Music_GameCorner: musicheader 4, 1, Music_GameCorner_Ch1 musicheader 1, 2, Music_GameCorner_Ch2 musicheader 1, 3, Music_GameCorner_Ch3 musicheader 1, 4, Music_GameCorner_Ch4 -; edd79 -Music_GameCorner_Ch1: ; edd79 +Music_GameCorner_Ch1: tempo 147 volume $77 stereopanning $f notetype $c, $91 note __, 8 -Music_GameCorner_branch_edd84: ; edd84 +Music_GameCorner_branch_edd84: intensity $91 note __, 16 note __, 16 @@ -39,7 +38,7 @@ Music_GameCorner_branch_edd84: ; edd84 note G#, 2 note G_, 2 intensity $71 -Music_GameCorner_branch_eddb1: ; eddb1 +Music_GameCorner_branch_eddb1: octave 4 note G#, 1 octave 5 @@ -47,7 +46,7 @@ Music_GameCorner_branch_eddb1: ; eddb1 note F_, 1 note C_, 1 loopchannel 4, Music_GameCorner_branch_eddb1 -Music_GameCorner_branch_eddbb: ; eddbb +Music_GameCorner_branch_eddbb: octave 4 note A#, 1 octave 5 @@ -55,7 +54,7 @@ Music_GameCorner_branch_eddbb: ; eddbb note G_, 1 note D_, 1 loopchannel 4, Music_GameCorner_branch_eddbb -Music_GameCorner_branch_eddc5: ; eddc5 +Music_GameCorner_branch_eddc5: octave 4 note D#, 1 note G_, 1 @@ -64,7 +63,7 @@ Music_GameCorner_branch_eddc5: ; eddc5 octave 4 note G_, 1 loopchannel 4, Music_GameCorner_branch_eddc5 -Music_GameCorner_branch_eddd0: ; eddd0 +Music_GameCorner_branch_eddd0: octave 4 note F_, 1 note A_, 1 @@ -73,7 +72,7 @@ Music_GameCorner_branch_eddd0: ; eddd0 octave 4 note A_, 1 loopchannel 4, Music_GameCorner_branch_eddd0 -Music_GameCorner_branch_edddb: ; edddb +Music_GameCorner_branch_edddb: octave 4 note G#, 1 octave 5 @@ -81,7 +80,7 @@ Music_GameCorner_branch_edddb: ; edddb note F_, 1 note C_, 1 loopchannel 4, Music_GameCorner_branch_edddb -Music_GameCorner_branch_edde5: ; edde5 +Music_GameCorner_branch_edde5: octave 4 note A#, 1 octave 5 @@ -89,7 +88,7 @@ Music_GameCorner_branch_edde5: ; edde5 note G_, 1 note D_, 1 loopchannel 4, Music_GameCorner_branch_edde5 -Music_GameCorner_branch_eddef: ; eddef +Music_GameCorner_branch_eddef: octave 4 note B_, 1 octave 5 @@ -104,9 +103,8 @@ Music_GameCorner_branch_eddef: ; eddef note F_, 2 note F_, 9 loopchannel 0, Music_GameCorner_branch_edd84 -; ede03 -Music_GameCorner_branch_ede03: ; ede03 +Music_GameCorner_branch_ede03: note __, 2 octave 4 note A#, 3 @@ -123,9 +121,8 @@ Music_GameCorner_branch_ede03: ; ede03 note G#, 1 note A#, 3 endchannel -; ede13 -Music_GameCorner_branch_ede13: ; ede13 +Music_GameCorner_branch_ede13: note __, 2 octave 4 note A#, 3 @@ -135,14 +132,13 @@ Music_GameCorner_branch_ede13: ; ede13 note F_, 3 note F_, 2 endchannel -; ede1c -Music_GameCorner_Ch2: ; ede1c +Music_GameCorner_Ch2: stereopanning $ff vibrato $8, $24 notetype $c, $a1 note __, 8 -Music_GameCorner_branch_ede25: ; ede25 +Music_GameCorner_branch_ede25: intensity $92 dutycycle $1 callchannel Music_GameCorner_branch_ede75 @@ -207,9 +203,8 @@ Music_GameCorner_branch_ede25: ; ede25 note A#, 9 intensity $a4 loopchannel 0, Music_GameCorner_branch_ede25 -; ede75 -Music_GameCorner_branch_ede75: ; ede75 +Music_GameCorner_branch_ede75: octave 1 note C_, 2 octave 3 @@ -319,13 +314,12 @@ Music_GameCorner_branch_ede75: ; ede75 note D_, 2 note D#, 2 endchannel -; edee8 -Music_GameCorner_Ch3: ; edee8 +Music_GameCorner_Ch3: vibrato $8, $22 notetype $c, $14 note __, 8 -Music_GameCorner_branch_edeef: ; edeef +Music_GameCorner_branch_edeef: stereopanning $ff notetype $c, $14 callchannel Music_GameCorner_branch_edfdd @@ -504,9 +498,8 @@ Music_GameCorner_branch_edeef: ; edeef note E_, 1 note D_, 1 loopchannel 0, Music_GameCorner_branch_edeef -; edfdd -Music_GameCorner_branch_edfdd: ; edfdd +Music_GameCorner_branch_edfdd: octave 2 note C_, 1 octave 3 @@ -534,9 +527,8 @@ Music_GameCorner_branch_edfdd: ; edfdd octave 4 note A_, 2 endchannel -; edff8 -Music_GameCorner_branch_edff8: ; edff8 +Music_GameCorner_branch_edff8: octave 2 note C_, 1 octave 3 @@ -557,9 +549,8 @@ Music_GameCorner_branch_edff8: ; edff8 note A_, 1 note __, 1 endchannel -; ee00c -Music_GameCorner_branch_ee00c: ; ee00c +Music_GameCorner_branch_ee00c: octave 2 note F_, 1 octave 3 @@ -584,9 +575,8 @@ Music_GameCorner_branch_ee00c: ; ee00c note C_, 1 note D_, 3 endchannel -; ee024 -Music_GameCorner_branch_ee024: ; ee024 +Music_GameCorner_branch_ee024: octave 2 note F_, 1 octave 3 @@ -614,9 +604,8 @@ Music_GameCorner_branch_ee024: ; ee024 note F_, 1 note __, 1 endchannel -; ee03f -Music_GameCorner_branch_ee03f: ; ee03f +Music_GameCorner_branch_ee03f: octave 2 note F_, 2 note __, 1 @@ -665,9 +654,8 @@ Music_GameCorner_branch_ee03f: ; ee03f octave 3 note D_, 1 endchannel -; ee06f -Music_GameCorner_Ch4: ; ee06f +Music_GameCorner_Ch4: togglenoise $3 notetype $c notetype $8 @@ -680,9 +668,9 @@ Music_GameCorner_Ch4: ; ee06f note D_, 2 note D_, 1 note D_, 1 -Music_GameCorner_branch_ee07f: ; ee07f +Music_GameCorner_branch_ee07f: callchannel Music_GameCorner_branch_ee106 -Music_GameCorner_branch_ee082: ; ee082 +Music_GameCorner_branch_ee082: note A#, 2 note F#, 2 note D_, 2 @@ -693,7 +681,7 @@ Music_GameCorner_branch_ee082: ; ee082 note F#, 2 loopchannel 6, Music_GameCorner_branch_ee082 callchannel Music_GameCorner_branch_ee10f -Music_GameCorner_branch_ee091: ; ee091 +Music_GameCorner_branch_ee091: note A#, 2 note F#, 2 note D_, 2 @@ -708,7 +696,7 @@ Music_GameCorner_branch_ee091: ; ee091 note D_, 1 note F#, 2 callchannel Music_GameCorner_branch_ee106 -Music_GameCorner_branch_ee0a4: ; ee0a4 +Music_GameCorner_branch_ee0a4: note A#, 2 note F#, 2 note D_, 2 @@ -719,7 +707,7 @@ Music_GameCorner_branch_ee0a4: ; ee0a4 note F#, 2 loopchannel 6, Music_GameCorner_branch_ee0a4 callchannel Music_GameCorner_branch_ee10f -Music_GameCorner_branch_ee0b3: ; ee0b3 +Music_GameCorner_branch_ee0b3: note A#, 2 note F#, 2 note D_, 2 @@ -739,7 +727,7 @@ Music_GameCorner_branch_ee0b3: ; ee0b3 note D_, 1 note D_, 1 note D_, 1 -Music_GameCorner_branch_ee0c9: ; ee0c9 +Music_GameCorner_branch_ee0c9: note A#, 2 note F#, 1 note D#, 1 @@ -768,7 +756,7 @@ Music_GameCorner_branch_ee0c9: ; ee0c9 note D_, 2 note D_, 1 note D_, 1 -Music_GameCorner_branch_ee0e8: ; ee0e8 +Music_GameCorner_branch_ee0e8: note A#, 2 note F#, 1 note D#, 1 @@ -793,9 +781,8 @@ Music_GameCorner_branch_ee0e8: ; ee0e8 note D_, 1 note D#, 2 loopchannel 0, Music_GameCorner_branch_ee07f -; ee106 -Music_GameCorner_branch_ee106: ; ee106 +Music_GameCorner_branch_ee106: note C_, 2 note F#, 2 note D_, 2 @@ -805,9 +792,8 @@ Music_GameCorner_branch_ee106: ; ee106 note D_, 2 note F#, 2 endchannel -; ee10f -Music_GameCorner_branch_ee10f: ; ee10f +Music_GameCorner_branch_ee10f: note A#, 2 note F#, 2 note D_, 2 @@ -818,4 +804,3 @@ Music_GameCorner_branch_ee10f: ; ee10f note D_, 1 note F#, 2 endchannel -; ee119 diff --git a/audio/music/goldenrodcity.asm b/audio/music/goldenrodcity.asm index d7318310e48..42f861e3fec 100644 --- a/audio/music/goldenrodcity.asm +++ b/audio/music/goldenrodcity.asm @@ -1,11 +1,10 @@ -Music_GoldenrodCity: ; eb453 +Music_GoldenrodCity: musicheader 4, 1, Music_GoldenrodCity_Ch1 musicheader 1, 2, Music_GoldenrodCity_Ch2 musicheader 1, 3, Music_GoldenrodCity_Ch3 musicheader 1, 4, Music_GoldenrodCity_Ch4 -; eb45f -Music_GoldenrodCity_Ch1: ; eb45f +Music_GoldenrodCity_Ch1: stereopanning $f tempo 176 volume $77 @@ -14,7 +13,7 @@ Music_GoldenrodCity_Ch1: ; eb45f note __, 16 note __, 16 note __, 16 -Music_GoldenrodCity_branch_eb46d: ; eb46d +Music_GoldenrodCity_branch_eb46d: dutycycle $0 callchannel Music_GoldenrodCity_branch_eb4a9 octave 3 @@ -56,9 +55,8 @@ Music_GoldenrodCity_branch_eb46d: ; eb46d octave 4 note C_, 2 loopchannel 0, Music_GoldenrodCity_branch_eb46d -; eb4a9 -Music_GoldenrodCity_branch_eb4a9: ; eb4a9 +Music_GoldenrodCity_branch_eb4a9: octave 4 note C#, 2 octave 3 @@ -99,9 +97,8 @@ Music_GoldenrodCity_branch_eb4a9: ; eb4a9 octave 4 note C#, 2 endchannel -; eb4d1 -Music_GoldenrodCity_branch_eb4d1: ; eb4d1 +Music_GoldenrodCity_branch_eb4d1: octave 4 note F_, 1 note C#, 1 @@ -174,14 +171,13 @@ Music_GoldenrodCity_branch_eb4d1: ; eb4d1 note D#, 1 note F#, 1 endchannel -; eb519 -Music_GoldenrodCity_Ch2: ; eb519 +Music_GoldenrodCity_Ch2: stereopanning $f0 vibrato $12, $23 dutycycle $2 notetype $c, $97 -Music_GoldenrodCity_branch_eb523: ; eb523 +Music_GoldenrodCity_branch_eb523: intensity $97 callchannel Music_GoldenrodCity_branch_eb555 octave 4 @@ -216,9 +212,8 @@ Music_GoldenrodCity_branch_eb523: ; eb523 octave 4 note G#, 2 loopchannel 0, Music_GoldenrodCity_branch_eb523 -; eb555 -Music_GoldenrodCity_branch_eb555: ; eb555 +Music_GoldenrodCity_branch_eb555: octave 4 note F_, 4 note C#, 4 @@ -247,9 +242,8 @@ Music_GoldenrodCity_branch_eb555: ; eb555 note F#, 2 dutycycle $1 endchannel -; eb572 -Music_GoldenrodCity_branch_eb572: ; eb572 +Music_GoldenrodCity_branch_eb572: note C#, 6 note F_, 6 note C#, 4 @@ -268,13 +262,12 @@ Music_GoldenrodCity_branch_eb572: ; eb572 note C_, 4 note D#, 2 endchannel -; eb584 -Music_GoldenrodCity_Ch3: ; eb584 +Music_GoldenrodCity_Ch3: stereopanning $ff vibrato $8, $23 notetype $c, $25 -Music_GoldenrodCity_branch_eb58c: ; eb58c +Music_GoldenrodCity_branch_eb58c: callchannel Music_GoldenrodCity_branch_eb5aa callchannel Music_GoldenrodCity_branch_eb5aa callchannel Music_GoldenrodCity_branch_eb5d2 @@ -294,9 +287,8 @@ Music_GoldenrodCity_branch_eb58c: ; eb58c octave 2 note G#, 2 loopchannel 0, Music_GoldenrodCity_branch_eb58c -; eb5aa -Music_GoldenrodCity_branch_eb5aa: ; eb5aa +Music_GoldenrodCity_branch_eb5aa: octave 3 note C#, 4 note __, 2 @@ -337,9 +329,8 @@ Music_GoldenrodCity_branch_eb5aa: ; eb5aa note G#, 1 note __, 1 endchannel -; eb5d2 -Music_GoldenrodCity_branch_eb5d2: ; eb5d2 +Music_GoldenrodCity_branch_eb5d2: note C#, 1 note __, 1 octave 4 @@ -392,9 +383,8 @@ Music_GoldenrodCity_branch_eb5d2: ; eb5d2 note __, 2 note G#, 1 endchannel -; eb606 -Music_GoldenrodCity_Ch4: ; eb606 +Music_GoldenrodCity_Ch4: togglenoise $3 notetype $c note __, 16 @@ -406,7 +396,7 @@ Music_GoldenrodCity_Ch4: ; eb606 note D_, 1 note D_, 1 note F#, 2 -Music_GoldenrodCity_branch_eb613: ; eb613 +Music_GoldenrodCity_branch_eb613: note D#, 2 note F#, 2 note D_, 2 @@ -447,7 +437,7 @@ Music_GoldenrodCity_branch_eb613: ; eb613 note D_, 2 note D_, 1 note D_, 1 -Music_GoldenrodCity_branch_eb650: ; eb650 +Music_GoldenrodCity_branch_eb650: note D#, 2 note F#, 2 note D_, 2 @@ -459,9 +449,8 @@ Music_GoldenrodCity_branch_eb650: ; eb650 loopchannel 3, Music_GoldenrodCity_branch_eb650 callchannel Music_GoldenrodCity_branch_eb663 loopchannel 0, Music_GoldenrodCity_branch_eb613 -; eb663 -Music_GoldenrodCity_branch_eb663: ; eb663 +Music_GoldenrodCity_branch_eb663: note D#, 2 note F#, 2 note D_, 2 @@ -472,9 +461,8 @@ Music_GoldenrodCity_branch_eb663: ; eb663 note D_, 1 note F#, 2 endchannel -; eb66d -Music_GoldenrodCity_branch_eb66d: ; eb66d +Music_GoldenrodCity_branch_eb66d: note D#, 2 note D_, 1 note D#, 3 @@ -484,4 +472,3 @@ Music_GoldenrodCity_branch_eb66d: ; eb66d note G_, 1 note G_, 1 endchannel -; eb676 diff --git a/audio/music/goldsilveropening.asm b/audio/music/goldsilveropening.asm index 9c677f47b16..a9359f0092e 100644 --- a/audio/music/goldsilveropening.asm +++ b/audio/music/goldsilveropening.asm @@ -1,10 +1,9 @@ -Music_GoldSilverOpening: ; f7055 +Music_GoldSilverOpening: musicheader 3, 1, Music_GoldSilverOpening_Ch1 musicheader 1, 2, Music_GoldSilverOpening_Ch2 musicheader 1, 3, Music_GoldSilverOpening_Ch3 -; f705e -Music_GoldSilverOpening_Ch1: ; f705e +Music_GoldSilverOpening_Ch1: tempo 256 volume $77 tone $0001 @@ -128,9 +127,8 @@ Music_GoldSilverOpening_Ch1: ; f705e note G_, 2 note A_, 16 endchannel -; f70f8 -Music_GoldSilverOpening_Ch2: ; f70f8 +Music_GoldSilverOpening_Ch2: tone $0001 stereopanning $f notetype $c, $b7 @@ -309,9 +307,8 @@ Music_GoldSilverOpening_Ch2: ; f70f8 note C_, 4 note D#, 16 endchannel -; f71c8 -Music_GoldSilverOpening_Ch3: ; f71c8 +Music_GoldSilverOpening_Ch3: notetype $6, $10 octave 2 note D_, 4 @@ -616,4 +613,3 @@ Music_GoldSilverOpening_Ch3: ; f71c8 note C_, 1 note __, 13 endchannel -; f7308 diff --git a/audio/music/goldsilveropening2.asm b/audio/music/goldsilveropening2.asm index 90b9b511cee..2dc43e3b79f 100644 --- a/audio/music/goldsilveropening2.asm +++ b/audio/music/goldsilveropening2.asm @@ -1,11 +1,10 @@ -Music_GoldSilverOpening2: ; f7308 +Music_GoldSilverOpening2: musicheader 4, 1, Music_GoldSilverOpening2_Ch1 musicheader 1, 2, Music_GoldSilverOpening2_Ch2 musicheader 1, 3, Music_GoldSilverOpening2_Ch3 musicheader 1, 4, Music_GoldSilverOpening2_Ch4 -; f7314 -Music_GoldSilverOpening2_Ch1: ; f7314 +Music_GoldSilverOpening2_Ch1: tempo 92 volume $77 dutycycle $3 @@ -14,7 +13,7 @@ Music_GoldSilverOpening2_Ch1: ; f7314 notetype $c, $3d octave 3 note D#, 8 -Music_GoldSilverOpening2_branch_f7325: ; f7325 +Music_GoldSilverOpening2_branch_f7325: notetype $c, $c1 octave 3 note D_, 2 @@ -52,9 +51,8 @@ Music_GoldSilverOpening2_branch_f7325: ; f7325 octave 4 note D_, 16 endchannel -; f7358 -Music_GoldSilverOpening2_Ch2: ; f7358 +Music_GoldSilverOpening2_Ch2: dutycycle $3 vibrato $14, $14 stereopanning $f0 @@ -105,9 +103,8 @@ Music_GoldSilverOpening2_Ch2: ; f7358 intensity $c2 note D_, 16 endchannel -; f739c -Music_GoldSilverOpening2_Ch3: ; f739c +Music_GoldSilverOpening2_Ch3: notetype $c, $17 note __, 8 octave 2 @@ -184,9 +181,8 @@ Music_GoldSilverOpening2_Ch3: ; f739c note D_, 2 note __, 14 endchannel -; f73ea -Music_GoldSilverOpening2_Ch4: ; f73ea +Music_GoldSilverOpening2_Ch4: togglenoise $0 notetype $6 note D#, 2 @@ -198,7 +194,7 @@ Music_GoldSilverOpening2_Ch4: ; f73ea note D_, 2 note D_, 2 notetype $c -Music_GoldSilverOpening2_branch_f73f8: ; f73f8 +Music_GoldSilverOpening2_branch_f73f8: note D_, 2 note D_, 2 note D_, 2 @@ -219,4 +215,3 @@ Music_GoldSilverOpening2_branch_f73f8: ; f73f8 loopchannel 4, Music_GoldSilverOpening2_branch_f73f8 note C_, 16 endchannel -; f7411 diff --git a/audio/music/gym.asm b/audio/music/gym.asm index 89c145724bb..acb944adff9 100644 --- a/audio/music/gym.asm +++ b/audio/music/gym.asm @@ -1,18 +1,17 @@ -Music_Gym: ; f48ae +Music_Gym: musicheader 4, 1, Music_Gym_Ch1 musicheader 1, 2, Music_Gym_Ch2 musicheader 1, 3, Music_Gym_Ch3 musicheader 1, 4, Music_Gym_Ch4 -; f48ba -Music_Gym_Ch1: ; f48ba +Music_Gym_Ch1: tempo 156 volume $77 stereopanning $f vibrato $12, $24 dutycycle $1 notetype $c, $b7 -Music_Gym_branch_f48c9: ; f48c9 +Music_Gym_branch_f48c9: octave 4 note F#, 2 octave 2 @@ -189,12 +188,11 @@ Music_Gym_branch_f48c9: ; f48c9 note F#, 1 note E_, 1 loopchannel 0, Music_Gym_branch_f48c9 -; f497c -Music_Gym_Ch2: ; f497c +Music_Gym_Ch2: dutycycle $1 stereopanning $f0 -Music_Gym_branch_f4980: ; f4980 +Music_Gym_branch_f4980: notetype $c, $c3 octave 2 note D_, 2 @@ -286,9 +284,8 @@ Music_Gym_branch_f4980: ; f4980 note F#, 2 note D_, 2 loopchannel 0, Music_Gym_branch_f4980 -; f49e9 -Music_Gym_branch_f49e9: ; f49e9 +Music_Gym_branch_f49e9: octave 3 note D_, 3 octave 2 @@ -333,9 +330,8 @@ Music_Gym_branch_f49e9: ; f49e9 note C_, 1 note C_, 2 endchannel -; f4a15 -Music_Gym_branch_f4a15: ; f4a15 +Music_Gym_branch_f4a15: octave 2 note D_, 4 note D_, 2 @@ -370,12 +366,11 @@ Music_Gym_branch_f4a15: ; f4a15 note F#, 1 note F#, 1 endchannel -; f4a37 -Music_Gym_Ch3: ; f4a37 +Music_Gym_Ch3: vibrato $14, $23 stereopanning $ff -Music_Gym_branch_f4a3c: ; f4a3c +Music_Gym_branch_f4a3c: notetype $c, $14 octave 6 note D_, 2 @@ -485,9 +480,8 @@ Music_Gym_branch_f4a3c: ; f4a3c note F#, 8 note E_, 4 loopchannel 0, Music_Gym_branch_f4a3c -; f4ab3 -Music_Gym_branch_f4ab3: ; f4ab3 +Music_Gym_branch_f4ab3: octave 5 note A_, 6 octave 6 @@ -506,11 +500,10 @@ Music_Gym_branch_f4ab3: ; f4ab3 note G_, 1 note A_, 4 endchannel -; f4ac5 -Music_Gym_Ch4: ; f4ac5 +Music_Gym_Ch4: togglenoise $4 -Music_Gym_branch_f4ac7: ; f4ac7 +Music_Gym_branch_f4ac7: notetype $c note D_, 2 note C#, 1 @@ -535,7 +528,7 @@ Music_Gym_branch_f4ac7: ; f4ac7 note D_, 1 note D_, 1 notetype $6 -Music_Gym_branch_f4ae1: ; f4ae1 +Music_Gym_branch_f4ae1: note D_, 6 note D_, 6 note D_, 4 @@ -558,7 +551,7 @@ Music_Gym_branch_f4ae1: ; f4ae1 note D_, 4 note B_, 8 loopchannel 4, Music_Gym_branch_f4ae1 -Music_Gym_branch_f4afa: ; f4afa +Music_Gym_branch_f4afa: note D#, 4 note F#, 4 note D_, 4 @@ -571,4 +564,3 @@ Music_Gym_branch_f4afa: ; f4afa note F#, 4 loopchannel 8, Music_Gym_branch_f4afa loopchannel 0, Music_Gym_branch_f4ac7 -; f4b0c diff --git a/audio/music/gymleadervictory.asm b/audio/music/gymleadervictory.asm index 28ef4319257..d6a1a36ee0a 100644 --- a/audio/music/gymleadervictory.asm +++ b/audio/music/gymleadervictory.asm @@ -1,11 +1,10 @@ -Music_GymLeaderVictory: ; f462c +Music_GymLeaderVictory: musicheader 4, 1, Music_GymLeaderVictory_Ch1 musicheader 1, 2, Music_GymLeaderVictory_Ch2 musicheader 1, 3, Music_GymLeaderVictory_Ch3 musicheader 1, 4, Music_GymLeaderVictory_Ch4 -; f4638 -Music_GymLeaderVictory_Ch1: ; f4638 +Music_GymLeaderVictory_Ch1: tempo 116 volume $77 vibrato $12, $34 @@ -27,7 +26,7 @@ Music_GymLeaderVictory_Ch1: ; f4638 octave 5 note D_, 8 stereopanning $f -Music_GymLeaderVictory_branch_f4658: ; f4658 +Music_GymLeaderVictory_branch_f4658: dutycycle $1 callchannel Music_GymLeaderVictory_branch_f4689 octave 4 @@ -59,9 +58,8 @@ Music_GymLeaderVictory_branch_f4658: ; f4658 intensity $87 note F#, 16 loopchannel 0, Music_GymLeaderVictory_branch_f4658 -; f4689 -Music_GymLeaderVictory_branch_f4689: ; f4689 +Music_GymLeaderVictory_branch_f4689: intensity $91 octave 3 note F#, 2 @@ -84,9 +82,8 @@ Music_GymLeaderVictory_branch_f4689: ; f4689 note G_, 1 note D_, 1 endchannel -; f46a0 -Music_GymLeaderVictory_branch_f46a0: ; f46a0 +Music_GymLeaderVictory_branch_f46a0: intensity $87 octave 3 note F#, 14 @@ -115,9 +112,8 @@ Music_GymLeaderVictory_branch_f46a0: ; f46a0 note C#, 1 note E_, 8 endchannel -; f46bd -Music_GymLeaderVictory_Ch2: ; f46bd +Music_GymLeaderVictory_Ch2: vibrato $12, $34 dutycycle $3 notetype $c, $d7 @@ -132,7 +128,7 @@ Music_GymLeaderVictory_Ch2: ; f46bd octave 5 note D_, 1 note F#, 16 -Music_GymLeaderVictory_branch_f46d0: ; f46d0 +Music_GymLeaderVictory_branch_f46d0: dutycycle $3 intensity $a1 callchannel Music_GymLeaderVictory_branch_f4711 @@ -175,9 +171,8 @@ Music_GymLeaderVictory_branch_f46d0: ; f46d0 octave 5 note C#, 1 loopchannel 0, Music_GymLeaderVictory_branch_f46d0 -; f4711 -Music_GymLeaderVictory_branch_f4711: ; f4711 +Music_GymLeaderVictory_branch_f4711: octave 5 note D_, 2 note C#, 2 @@ -193,9 +188,8 @@ Music_GymLeaderVictory_branch_f4711: ; f4711 note G_, 2 note F#, 2 endchannel -; f4720 -Music_GymLeaderVictory_branch_f4720: ; f4720 +Music_GymLeaderVictory_branch_f4720: intensity $98 note A_, 6 note F#, 1 @@ -218,9 +212,8 @@ Music_GymLeaderVictory_branch_f4720: ; f4720 note C#, 8 note C#, 8 endchannel -; f4737 -Music_GymLeaderVictory_Ch3: ; f4737 +Music_GymLeaderVictory_Ch3: notetype $c, $25 octave 3 note F#, 16 @@ -231,7 +224,7 @@ Music_GymLeaderVictory_Ch3: ; f4737 octave 3 note C#, 2 stereopanning $f0 -Music_GymLeaderVictory_branch_f4744: ; f4744 +Music_GymLeaderVictory_branch_f4744: note D_, 2 note __, 4 octave 2 @@ -312,9 +305,8 @@ Music_GymLeaderVictory_branch_f4744: ; f4744 octave 3 note C#, 2 loopchannel 0, Music_GymLeaderVictory_branch_f4744 -; f479e -Music_GymLeaderVictory_branch_f479e: ; f479e +Music_GymLeaderVictory_branch_f479e: octave 3 note D_, 2 note __, 2 @@ -386,14 +378,13 @@ Music_GymLeaderVictory_branch_f479e: ; f479e octave 2 note A_, 2 endchannel -; f47e5 -Music_GymLeaderVictory_Ch4: ; f47e5 +Music_GymLeaderVictory_Ch4: togglenoise $4 notetype $c note B_, 16 note B_, 16 -Music_GymLeaderVictory_branch_f47eb: ; f47eb +Music_GymLeaderVictory_branch_f47eb: callchannel Music_GymLeaderVictory_branch_f480b note D#, 6 note D#, 2 @@ -406,7 +397,7 @@ Music_GymLeaderVictory_branch_f47eb: ; f47eb note C#, 1 note C#, 1 note C#, 1 -Music_GymLeaderVictory_branch_f47fb: ; f47fb +Music_GymLeaderVictory_branch_f47fb: note D#, 2 note G_, 2 note D_, 2 @@ -417,9 +408,8 @@ Music_GymLeaderVictory_branch_f47fb: ; f47fb note G_, 2 loopchannel 16, Music_GymLeaderVictory_branch_f47fb loopchannel 0, Music_GymLeaderVictory_branch_f47eb -; f480b -Music_GymLeaderVictory_branch_f480b: ; f480b +Music_GymLeaderVictory_branch_f480b: note D#, 6 note D#, 2 note D#, 4 @@ -427,4 +417,3 @@ Music_GymLeaderVictory_branch_f480b: ; f480b note D#, 2 loopchannel 3, Music_GymLeaderVictory_branch_f480b endchannel -; f4815 diff --git a/audio/music/halloffame.asm b/audio/music/halloffame.asm index 8abc46f7bbd..2f4c444d787 100644 --- a/audio/music/halloffame.asm +++ b/audio/music/halloffame.asm @@ -1,11 +1,10 @@ -Music_HallOfFame: ; f05bf +Music_HallOfFame: musicheader 4, 1, Music_HallOfFame_Ch1 musicheader 1, 2, Music_HallOfFame_Ch2 musicheader 1, 3, Music_HallOfFame_Ch3 musicheader 1, 4, Music_HallOfFame_Ch4 -; f05cb -Music_HallOfFame_Ch1: ; f05cb +Music_HallOfFame_Ch1: tempo 112 volume $77 dutycycle $2 @@ -22,7 +21,7 @@ Music_HallOfFame_Ch1: ; f05cb note E_, 1 note F_, 1 note F#, 1 -Music_HallOfFame_branch_f05e6: ; f05e6 +Music_HallOfFame_branch_f05e6: intensity $97 octave 4 note C_, 8 @@ -46,12 +45,11 @@ Music_HallOfFame_branch_f05e6: ; f05e6 note __, 16 note __, 16 loopchannel 0, Music_HallOfFame_branch_f05e6 -; f060b -Music_HallOfFame_Ch2: ; f060b +Music_HallOfFame_Ch2: vibrato $8, $25 dutycycle $3 -Music_HallOfFame_branch_f0610: ; f0610 +Music_HallOfFame_branch_f0610: notetype $c, $c4 octave 3 note G_, 2 @@ -77,12 +75,11 @@ Music_HallOfFame_branch_f0610: ; f0610 note A_, 4 note F_, 2 loopchannel 0, Music_HallOfFame_branch_f0610 -; f062e -Music_HallOfFame_Ch3: ; f062e -Music_HallOfFame_branch_f062e: ; f062e +Music_HallOfFame_Ch3: +Music_HallOfFame_branch_f062e: notetype $c, $28 -Music_HallOfFame_branch_f0631: ; f0631 +Music_HallOfFame_branch_f0631: octave 3 note D_, 2 note G_, 2 @@ -137,9 +134,8 @@ Music_HallOfFame_branch_f0631: ; f0631 note E_, 4 note G_, 4 loopchannel 0, Music_HallOfFame_branch_f062e -; f066d -Music_HallOfFame_Ch4: ; f066d +Music_HallOfFame_Ch4: togglenoise $5 notetype $c note __, 16 @@ -147,7 +143,7 @@ Music_HallOfFame_Ch4: ; f066d note __, 16 note __, 16 notetype $6 -Music_HallOfFame_branch_f0677: ; f0677 +Music_HallOfFame_branch_f0677: stereopanning $f note A#, 4 note A#, 8 @@ -174,4 +170,3 @@ Music_HallOfFame_branch_f0677: ; f0677 note A#, 1 note A#, 1 loopchannel 0, Music_HallOfFame_branch_f0677 -; f0697 diff --git a/audio/music/healpokemon.asm b/audio/music/healpokemon.asm index 264d3db78bb..6de58bc5c07 100644 --- a/audio/music/healpokemon.asm +++ b/audio/music/healpokemon.asm @@ -1,10 +1,9 @@ -Music_HealPokemon: ; f0697 +Music_HealPokemon: musicheader 3, 1, Music_HealPokemon_Ch1 musicheader 1, 2, Music_HealPokemon_Ch2 musicheader 1, 3, Music_HealPokemon_Ch3 -; f06a0 -Music_HealPokemon_Ch1: ; f06a0 +Music_HealPokemon_Ch1: tempo 144 volume $77 dutycycle $2 @@ -23,9 +22,8 @@ Music_HealPokemon_Ch1: ; f06a0 slidepitchto 1, 4, __ note B_, 4 endchannel -; f06c4 -Music_HealPokemon_Ch2: ; f06c4 +Music_HealPokemon_Ch2: dutycycle $2 notetype $c, $c3 octave 4 @@ -37,9 +35,8 @@ Music_HealPokemon_Ch2: ; f06c4 octave 5 note E_, 8 endchannel -; f06d4 -Music_HealPokemon_Ch3: ; f06d4 +Music_HealPokemon_Ch3: notetype $c, $10 octave 4 note E_, 2 @@ -51,4 +48,3 @@ Music_HealPokemon_Ch3: ; f06d4 note E_, 6 note __, 2 endchannel -; f06e1 diff --git a/audio/music/indigoplateau.asm b/audio/music/indigoplateau.asm index 64d19da99cf..b56f1b388e2 100644 --- a/audio/music/indigoplateau.asm +++ b/audio/music/indigoplateau.asm @@ -1,17 +1,16 @@ -Music_IndigoPlateau: ; ee852 +Music_IndigoPlateau: musicheader 4, 1, Music_IndigoPlateau_Ch1 musicheader 1, 2, Music_IndigoPlateau_Ch2 musicheader 1, 3, Music_IndigoPlateau_Ch3 musicheader 1, 4, Music_IndigoPlateau_Ch4 -; ee85e -Music_IndigoPlateau_Ch1: ; ee85e +Music_IndigoPlateau_Ch1: tempo 128 volume $77 dutycycle $3 tone $0002 stereopanning $f -Music_IndigoPlateau_branch_ee86a: ; ee86a +Music_IndigoPlateau_branch_ee86a: callchannel Music_IndigoPlateau_branch_ee881 octave 3 note D_, 4 @@ -24,9 +23,8 @@ Music_IndigoPlateau_branch_ee86a: ; ee86a callchannel Music_IndigoPlateau_branch_ee881 note A#, 4 loopchannel 0, Music_IndigoPlateau_branch_ee86a -; ee881 -Music_IndigoPlateau_branch_ee881: ; ee881 +Music_IndigoPlateau_branch_ee881: notetype $c, $b6 octave 2 note A_, 4 @@ -40,13 +38,12 @@ Music_IndigoPlateau_branch_ee881: ; ee881 note A_, 2 intensity $a0 endchannel -; ee892 -Music_IndigoPlateau_Ch2: ; ee892 +Music_IndigoPlateau_Ch2: dutycycle $3 vibrato $10, $22 stereopanning $f0 -Music_IndigoPlateau_branch_ee899: ; ee899 +Music_IndigoPlateau_branch_ee899: callchannel Music_IndigoPlateau_branch_ee8e9 note A_, 4 callchannel Music_IndigoPlateau_branch_ee8e9 @@ -100,9 +97,8 @@ Music_IndigoPlateau_branch_ee899: ; ee899 callchannel Music_IndigoPlateau_branch_ee8e9 note C#, 4 loopchannel 0, Music_IndigoPlateau_branch_ee899 -; ee8e9 -Music_IndigoPlateau_branch_ee8e9: ; ee8e9 +Music_IndigoPlateau_branch_ee8e9: notetype $c, $c6 octave 3 note D_, 4 @@ -116,11 +112,10 @@ Music_IndigoPlateau_branch_ee8e9: ; ee8e9 note D_, 2 intensity $b0 endchannel -; ee8fa -Music_IndigoPlateau_Ch3: ; ee8fa +Music_IndigoPlateau_Ch3: notetype $c, $19 -Music_IndigoPlateau_branch_ee8fd: ; ee8fd +Music_IndigoPlateau_branch_ee8fd: callchannel Music_IndigoPlateau_branch_ee915 octave 3 note A_, 4 @@ -134,9 +129,8 @@ Music_IndigoPlateau_branch_ee8fd: ; ee8fd octave 3 note F#, 4 loopchannel 0, Music_IndigoPlateau_branch_ee8fd -; ee915 -Music_IndigoPlateau_branch_ee915: ; ee915 +Music_IndigoPlateau_branch_ee915: octave 3 note D_, 1 note __, 3 @@ -152,13 +146,12 @@ Music_IndigoPlateau_branch_ee915: ; ee915 note A_, 1 note __, 3 endchannel -; ee924 -Music_IndigoPlateau_Ch4: ; ee924 +Music_IndigoPlateau_Ch4: stereopanning $f0 togglenoise $0 notetype $c -Music_IndigoPlateau_branch_ee92a: ; ee92a +Music_IndigoPlateau_branch_ee92a: note D#, 4 note D_, 2 note D#, 2 @@ -187,4 +180,3 @@ Music_IndigoPlateau_branch_ee92a: ; ee92a note D_, 2 note C#, 4 loopchannel 0, Music_IndigoPlateau_branch_ee92a -; ee94b diff --git a/audio/music/johtogymbattle.asm b/audio/music/johtogymbattle.asm index 191b62ad905..2b6e82f0038 100644 --- a/audio/music/johtogymbattle.asm +++ b/audio/music/johtogymbattle.asm @@ -1,24 +1,23 @@ -Music_JohtoGymBattle: ; ea50d +Music_JohtoGymBattle: musicheader 3, 1, Music_JohtoGymBattle_Ch1 musicheader 1, 2, Music_JohtoGymBattle_Ch2 musicheader 1, 3, Music_JohtoGymBattle_Ch3 -; ea516 -Music_JohtoGymBattle_Ch1: ; ea516 +Music_JohtoGymBattle_Ch1: tempo 101 volume $77 dutycycle $3 tone $0002 vibrato $12, $15 notetype $c, $b2 -Music_JohtoGymBattle_branch_ea526: ; ea526 +Music_JohtoGymBattle_branch_ea526: octave 3 note A#, 1 note A_, 1 note G#, 1 note A_, 1 loopchannel 4, Music_JohtoGymBattle_branch_ea526 -Music_JohtoGymBattle_branch_ea52f: ; ea52f +Music_JohtoGymBattle_branch_ea52f: note C#, 1 note C_, 1 octave 2 @@ -58,7 +57,7 @@ Music_JohtoGymBattle_branch_ea52f: ; ea52f octave 3 note G#, 2 note F_, 2 -Music_JohtoGymBattle_branch_ea55d: ; ea55d +Music_JohtoGymBattle_branch_ea55d: intensity $b5 note D_, 6 note G_, 6 @@ -286,21 +285,20 @@ Music_JohtoGymBattle_branch_ea55d: ; ea55d note D#, 2 note F#, 2 loopchannel 0, Music_JohtoGymBattle_branch_ea55d -; ea65f -Music_JohtoGymBattle_Ch2: ; ea65f +Music_JohtoGymBattle_Ch2: dutycycle $3 vibrato $8, $36 tone $0001 notetype $c, $c2 -Music_JohtoGymBattle_branch_ea66a: ; ea66a +Music_JohtoGymBattle_branch_ea66a: octave 4 note F#, 1 note F_, 1 note E_, 1 note A#, 1 loopchannel 4, Music_JohtoGymBattle_branch_ea66a -Music_JohtoGymBattle_branch_ea673: ; ea673 +Music_JohtoGymBattle_branch_ea673: note F#, 1 note F_, 1 note F#, 1 @@ -397,7 +395,7 @@ Music_JohtoGymBattle_branch_ea673: ; ea673 octave 3 note G#, 1 note A_, 1 -Music_JohtoGymBattle_branch_ea6ee: ; ea6ee +Music_JohtoGymBattle_branch_ea6ee: intensity $c7 note A#, 8 intensity $c4 @@ -613,9 +611,8 @@ Music_JohtoGymBattle_branch_ea6ee: ; ea6ee note B_, 16 note G_, 16 loopchannel 0, Music_JohtoGymBattle_branch_ea6ee -; ea7f4 -Music_JohtoGymBattle_Ch3: ; ea7f4 +Music_JohtoGymBattle_Ch3: notetype $c, $19 octave 4 note F_, 1 @@ -685,7 +682,7 @@ Music_JohtoGymBattle_Ch3: ; ea7f4 octave 3 note A#, 2 note G#, 2 -Music_JohtoGymBattle_branch_ea83f: ; ea83f +Music_JohtoGymBattle_branch_ea83f: callchannel Music_JohtoGymBattle_branch_ea963 callchannel Music_JohtoGymBattle_branch_ea963 callchannel Music_JohtoGymBattle_branch_ea96a @@ -900,9 +897,8 @@ Music_JohtoGymBattle_branch_ea83f: ; ea83f note F_, 2 note D#, 2 loopchannel 0, Music_JohtoGymBattle_branch_ea83f -; ea952 -Music_JohtoGymBattle_branch_ea952: ; ea952 +Music_JohtoGymBattle_branch_ea952: note G_, 2 note D_, 2 note F_, 2 @@ -920,30 +916,26 @@ Music_JohtoGymBattle_branch_ea952: ; ea952 note D#, 2 note F_, 2 endchannel -; ea963 -Music_JohtoGymBattle_branch_ea963: ; ea963 +Music_JohtoGymBattle_branch_ea963: note D_, 2 note G_, 2 loopchannel 4, Music_JohtoGymBattle_branch_ea963 endchannel -; ea96a -Music_JohtoGymBattle_branch_ea96a: ; ea96a +Music_JohtoGymBattle_branch_ea96a: note C#, 2 note G#, 2 loopchannel 4, Music_JohtoGymBattle_branch_ea96a endchannel -; ea971 -Music_JohtoGymBattle_branch_ea971: ; ea971 +Music_JohtoGymBattle_branch_ea971: note C_, 2 note G_, 2 loopchannel 4, Music_JohtoGymBattle_branch_ea971 endchannel -; ea978 -Music_JohtoGymBattle_branch_ea978: ; ea978 +Music_JohtoGymBattle_branch_ea978: octave 2 note A#, 2 octave 3 @@ -955,9 +947,8 @@ Music_JohtoGymBattle_branch_ea978: ; ea978 octave 2 note A#, 2 endchannel -; ea983 -Music_JohtoGymBattle_branch_ea983: ; ea983 +Music_JohtoGymBattle_branch_ea983: octave 3 note C_, 2 note G_, 2 @@ -971,9 +962,8 @@ Music_JohtoGymBattle_branch_ea983: ; ea983 octave 3 note C_, 2 endchannel -; ea990 -Music_JohtoGymBattle_branch_ea990: ; ea990 +Music_JohtoGymBattle_branch_ea990: note C#, 2 note G#, 2 octave 4 @@ -986,9 +976,8 @@ Music_JohtoGymBattle_branch_ea990: ; ea990 octave 3 note C#, 2 endchannel -; ea99c -Music_JohtoGymBattle_branch_ea99c: ; ea99c +Music_JohtoGymBattle_branch_ea99c: octave 3 note D_, 2 note A_, 2 @@ -1002,24 +991,21 @@ Music_JohtoGymBattle_branch_ea99c: ; ea99c octave 3 note D_, 2 endchannel -; ea9a9 -Music_JohtoGymBattle_branch_ea9a9: ; ea9a9 +Music_JohtoGymBattle_branch_ea9a9: octave 3 note D#, 2 note G#, 2 loopchannel 4, Music_JohtoGymBattle_branch_ea9a9 endchannel -; ea9b1 -Music_JohtoGymBattle_branch_ea9b1: ; ea9b1 +Music_JohtoGymBattle_branch_ea9b1: note C#, 2 note F#, 2 loopchannel 4, Music_JohtoGymBattle_branch_ea9b1 endchannel -; ea9b8 -Music_JohtoGymBattle_branch_ea9b8: ; ea9b8 +Music_JohtoGymBattle_branch_ea9b8: note F_, 2 note C_, 2 note D#, 2 @@ -1029,4 +1015,3 @@ Music_JohtoGymBattle_branch_ea9b8: ; ea9b8 note F_, 2 note D#, 2 endchannel -; ea9c1 diff --git a/audio/music/johtotrainerbattle.asm b/audio/music/johtotrainerbattle.asm index 52f60502dcc..c235410a54b 100644 --- a/audio/music/johtotrainerbattle.asm +++ b/audio/music/johtotrainerbattle.asm @@ -1,10 +1,9 @@ -Music_JohtoTrainerBattle: ; f6096 +Music_JohtoTrainerBattle: musicheader 3, 1, Music_JohtoTrainerBattle_Ch1 musicheader 1, 2, Music_JohtoTrainerBattle_Ch2 musicheader 1, 3, Music_JohtoTrainerBattle_Ch3 -; f609f -Music_JohtoTrainerBattle_Ch1: ; f609f +Music_JohtoTrainerBattle_Ch1: tempo 102 volume $77 dutycycle $3 @@ -86,7 +85,7 @@ Music_JohtoTrainerBattle_Ch1: ; f609f note F_, 6 intensity $b7 note G_, 4 -Music_JohtoTrainerBattle_branch_f6102: ; f6102 +Music_JohtoTrainerBattle_branch_f6102: intensity $b4 callchannel Music_JohtoTrainerBattle_branch_f629f intensity $b7 @@ -243,7 +242,7 @@ Music_JohtoTrainerBattle_branch_f6102: ; f6102 intensity $a7 note D#, 12 note __, 16 -Music_JohtoTrainerBattle_branch_f61bd: ; f61bd +Music_JohtoTrainerBattle_branch_f61bd: intensity $b7 note F_, 8 intensity $b4 @@ -428,9 +427,8 @@ Music_JohtoTrainerBattle_branch_f61bd: ; f61bd intensity $a7 note F_, 6 loopchannel 0, Music_JohtoTrainerBattle_branch_f6102 -; f629f -Music_JohtoTrainerBattle_branch_f629f: ; f629f +Music_JohtoTrainerBattle_branch_f629f: octave 3 note E_, 2 note D_, 2 @@ -451,9 +449,8 @@ Music_JohtoTrainerBattle_branch_f629f: ; f629f note F_, 2 note D_, 2 endchannel -; f62b3 -Music_JohtoTrainerBattle_Ch2: ; f62b3 +Music_JohtoTrainerBattle_Ch2: dutycycle $3 vibrato $8, $36 tone $0001 @@ -547,7 +544,7 @@ Music_JohtoTrainerBattle_Ch2: ; f62b3 note E_, 2 intensity $c7 note B_, 4 -Music_JohtoTrainerBattle_branch_f632a: ; f632a +Music_JohtoTrainerBattle_branch_f632a: callchannel Music_JohtoTrainerBattle_branch_f64a3 intensity $3e note A#, 8 @@ -584,7 +581,7 @@ Music_JohtoTrainerBattle_branch_f632a: ; f632a note A_, 16 intensity $b7 note A_, 16 -Music_JohtoTrainerBattle_branch_f635a: ; f635a +Music_JohtoTrainerBattle_branch_f635a: intensity $c3 octave 3 note A_, 2 @@ -607,7 +604,7 @@ Music_JohtoTrainerBattle_branch_f635a: ; f635a note G_, 2 note A_, 2 note A#, 2 -Music_JohtoTrainerBattle_branch_f6376: ; f6376 +Music_JohtoTrainerBattle_branch_f6376: note G_, 2 note F_, 2 note G_, 2 @@ -685,7 +682,7 @@ Music_JohtoTrainerBattle_branch_f6376: ; f6376 callchannel Music_JohtoTrainerBattle_branch_f64b6 intensity $a2 callchannel Music_JohtoTrainerBattle_branch_f64b6 -Music_JohtoTrainerBattle_branch_f63dd: ; f63dd +Music_JohtoTrainerBattle_branch_f63dd: octave 4 note D#, 2 octave 3 @@ -829,9 +826,8 @@ Music_JohtoTrainerBattle_branch_f63dd: ; f63dd note D_, 2 note F_, 2 loopchannel 0, Music_JohtoTrainerBattle_branch_f632a -; f649a -Music_JohtoTrainerBattle_branch_f649a: ; f649a +Music_JohtoTrainerBattle_branch_f649a: octave 3 note A_, 6 note A_, 4 @@ -840,9 +836,8 @@ Music_JohtoTrainerBattle_branch_f649a: ; f649a intensity $c7 note A#, 4 endchannel -; f64a3 -Music_JohtoTrainerBattle_branch_f64a3: ; f64a3 +Music_JohtoTrainerBattle_branch_f64a3: intensity $c7 octave 3 note A_, 6 @@ -859,9 +854,8 @@ Music_JohtoTrainerBattle_branch_f64a3: ; f64a3 intensity $b7 note F_, 8 endchannel -; f64b6 -Music_JohtoTrainerBattle_branch_f64b6: ; f64b6 +Music_JohtoTrainerBattle_branch_f64b6: octave 3 note A#, 2 note D#, 2 @@ -870,9 +864,8 @@ Music_JohtoTrainerBattle_branch_f64b6: ; f64b6 octave 3 note D#, 2 endchannel -; f64be -Music_JohtoTrainerBattle_branch_f64be: ; f64be +Music_JohtoTrainerBattle_branch_f64be: intensity $c7 octave 4 note F_, 4 @@ -891,9 +884,8 @@ Music_JohtoTrainerBattle_branch_f64be: ; f64be note D#, 1 note F_, 2 endchannel -; f64d2 -Music_JohtoTrainerBattle_branch_f64d2: ; f64d2 +Music_JohtoTrainerBattle_branch_f64d2: intensity $c7 octave 4 note D#, 6 @@ -905,9 +897,8 @@ Music_JohtoTrainerBattle_branch_f64d2: ; f64d2 note F_, 4 note D#, 4 endchannel -; f64de -Music_JohtoTrainerBattle_Ch3: ; f64de +Music_JohtoTrainerBattle_Ch3: notetype $c, $19 octave 4 note E_, 1 @@ -941,7 +932,7 @@ Music_JohtoTrainerBattle_Ch3: ; f64de note A#, 2 note A_, 2 note G#, 2 -Music_JohtoTrainerBattle_branch_f6501: ; f6501 +Music_JohtoTrainerBattle_branch_f6501: note A_, 2 note E_, 2 note F#, 2 @@ -983,7 +974,7 @@ Music_JohtoTrainerBattle_branch_f6501: ; f6501 note A_, 2 note A#, 2 note G_, 2 -Music_JohtoTrainerBattle_branch_f6531: ; f6531 +Music_JohtoTrainerBattle_branch_f6531: callchannel Music_JohtoTrainerBattle_branch_f6681 note E_, 2 callchannel Music_JohtoTrainerBattle_branch_f6692 @@ -1056,7 +1047,7 @@ Music_JohtoTrainerBattle_branch_f6531: ; f6531 note F_, 8 note E_, 8 note D#, 8 -Music_JohtoTrainerBattle_branch_f6591: ; f6591 +Music_JohtoTrainerBattle_branch_f6591: octave 3 note D#, 2 note A#, 2 @@ -1079,13 +1070,13 @@ Music_JohtoTrainerBattle_branch_f6591: ; f6591 note F_, 2 note D#, 2 note G_, 2 -Music_JohtoTrainerBattle_branch_f65ac: ; f65ac +Music_JohtoTrainerBattle_branch_f65ac: note C#, 2 note G#, 2 loopchannel 7, Music_JohtoTrainerBattle_branch_f65ac note B_, 2 note A_, 2 -Music_JohtoTrainerBattle_branch_f65b4: ; f65b4 +Music_JohtoTrainerBattle_branch_f65b4: note D_, 2 note A_, 2 loopchannel 5, Music_JohtoTrainerBattle_branch_f65b4 @@ -1095,17 +1086,17 @@ Music_JohtoTrainerBattle_branch_f65b4: ; f65b4 note F#, 2 note G#, 2 note A_, 2 -Music_JohtoTrainerBattle_branch_f65c0: ; f65c0 +Music_JohtoTrainerBattle_branch_f65c0: note A#, 4 note D#, 4 loopchannel 4, Music_JohtoTrainerBattle_branch_f65c0 -Music_JohtoTrainerBattle_branch_f65c6: ; f65c6 +Music_JohtoTrainerBattle_branch_f65c6: octave 4 note G_, 4 octave 3 note A#, 4 loopchannel 4, Music_JohtoTrainerBattle_branch_f65c6 -Music_JohtoTrainerBattle_branch_f65ce: ; f65ce +Music_JohtoTrainerBattle_branch_f65ce: callchannel Music_JohtoTrainerBattle_branch_f66b4 note D#, 2 note F_, 8 @@ -1179,11 +1170,11 @@ Music_JohtoTrainerBattle_branch_f65ce: ; f65ce note C_, 2 octave 3 note A#, 2 -Music_JohtoTrainerBattle_branch_f661e: ; f661e +Music_JohtoTrainerBattle_branch_f661e: note D#, 2 note A#, 2 loopchannel 8, Music_JohtoTrainerBattle_branch_f661e -Music_JohtoTrainerBattle_branch_f6624: ; f6624 +Music_JohtoTrainerBattle_branch_f6624: note C#, 2 note G#, 2 loopchannel 6, Music_JohtoTrainerBattle_branch_f6624 @@ -1193,11 +1184,11 @@ Music_JohtoTrainerBattle_branch_f6624: ; f6624 octave 3 note A#, 2 note G#, 2 -Music_JohtoTrainerBattle_branch_f6630: ; f6630 +Music_JohtoTrainerBattle_branch_f6630: note D#, 2 note A#, 2 loopchannel 8, Music_JohtoTrainerBattle_branch_f6630 -Music_JohtoTrainerBattle_branch_f6636: ; f6636 +Music_JohtoTrainerBattle_branch_f6636: note C#, 2 note G#, 2 loopchannel 4, Music_JohtoTrainerBattle_branch_f6636 @@ -1256,9 +1247,8 @@ Music_JohtoTrainerBattle_branch_f6636: ; f6636 octave 4 note D_, 2 loopchannel 0, Music_JohtoTrainerBattle_branch_f6531 -; f6676 -Music_JohtoTrainerBattle_branch_f6676: ; f6676 +Music_JohtoTrainerBattle_branch_f6676: octave 4 note C_, 2 octave 3 @@ -1270,9 +1260,8 @@ Music_JohtoTrainerBattle_branch_f6676: ; f6676 note A#, 2 note G_, 2 endchannel -; f6681 -Music_JohtoTrainerBattle_branch_f6681: ; f6681 +Music_JohtoTrainerBattle_branch_f6681: octave 3 note E_, 2 note A_, 2 @@ -1290,9 +1279,8 @@ Music_JohtoTrainerBattle_branch_f6681: ; f6681 note F#, 2 note G_, 2 endchannel -; f6692 -Music_JohtoTrainerBattle_branch_f6692: ; f6692 +Music_JohtoTrainerBattle_branch_f6692: octave 3 note F_, 2 note A#, 2 @@ -1304,32 +1292,28 @@ Music_JohtoTrainerBattle_branch_f6692: ; f6692 octave 4 note D_, 2 endchannel -; f669d -Music_JohtoTrainerBattle_branch_f669d: ; f669d +Music_JohtoTrainerBattle_branch_f669d: octave 3 note E_, 2 note A_, 2 loopchannel 4, Music_JohtoTrainerBattle_branch_f669d endchannel -; f66a5 -Music_JohtoTrainerBattle_branch_f66a5: ; f66a5 +Music_JohtoTrainerBattle_branch_f66a5: note D_, 2 note A_, 2 loopchannel 4, Music_JohtoTrainerBattle_branch_f66a5 endchannel -; f66ac -Music_JohtoTrainerBattle_branch_f66ac: ; f66ac +Music_JohtoTrainerBattle_branch_f66ac: octave 3 note C_, 2 note G_, 2 loopchannel 4, Music_JohtoTrainerBattle_branch_f66ac endchannel -; f66b4 -Music_JohtoTrainerBattle_branch_f66b4: ; f66b4 +Music_JohtoTrainerBattle_branch_f66b4: note A#, 4 note D#, 2 note A#, 2 @@ -1345,4 +1329,3 @@ Music_JohtoTrainerBattle_branch_f66b4: ; f66b4 note G#, 1 note A#, 2 endchannel -; f66c3 diff --git a/audio/music/johtowildbattle.asm b/audio/music/johtowildbattle.asm index bcfde1824ba..3c104e11188 100644 --- a/audio/music/johtowildbattle.asm +++ b/audio/music/johtowildbattle.asm @@ -1,16 +1,15 @@ -Music_JohtoWildBattle: ; f5dc5 +Music_JohtoWildBattle: musicheader 3, 1, Music_JohtoWildBattle_Ch1 musicheader 1, 2, Music_JohtoWildBattle_Ch2 musicheader 1, 3, Music_JohtoWildBattle_Ch3 -; f5dce -Music_JohtoWildBattle_Ch1: ; f5dce +Music_JohtoWildBattle_Ch1: tempo 104 volume $77 dutycycle $3 tone $0002 vibrato $12, $15 -Music_JohtoWildBattleNight_branch_f5ddb: ; f5ddb +Music_JohtoWildBattleNight_branch_f5ddb: notetype $c, $b2 octave 4 note C_, 1 @@ -87,7 +86,7 @@ Music_JohtoWildBattleNight_branch_f5ddb: ; f5ddb note D_, 4 intensity $6f note D#, 8 -Music_JohtoWildBattle_branch_f5e2d: ; f5e2d +Music_JohtoWildBattle_branch_f5e2d: intensity $b6 octave 3 note D_, 6 @@ -200,9 +199,8 @@ Music_JohtoWildBattle_branch_f5e2d: ; f5e2d note F#, 4 note G_, 16 loopchannel 0, Music_JohtoWildBattle_branch_f5e2d -; f5ea2 -Music_JohtoWildBattle_Ch2: ; f5ea2 +Music_JohtoWildBattle_Ch2: dutycycle $3 vibrato $8, $36 tone $0001 @@ -210,7 +208,7 @@ Music_JohtoWildBattle_Ch2: ; f5ea2 notetype $c, $c2 octave 4 note G_, 6 -Music_JohtoWildBattleNight_branch_f5eb2: ; f5eb2 +Music_JohtoWildBattleNight_branch_f5eb2: octave 3 note D_, 6 note G_, 4 @@ -239,7 +237,7 @@ Music_JohtoWildBattleNight_branch_f5eb2: ; f5eb2 note G_, 4 intensity $6f note G#, 8 -Music_JohtoWildBattle_branch_f5ed1: ; f5ed1 +Music_JohtoWildBattle_branch_f5ed1: intensity $c4 octave 3 note G_, 6 @@ -363,10 +361,9 @@ Music_JohtoWildBattle_branch_f5ed1: ; f5ed1 note A#, 4 note B_, 16 loopchannel 0, Music_JohtoWildBattle_branch_f5ed1 -; f5f5d -Music_JohtoWildBattleNight_branch_f5f5d: ; f5f5d -Music_JohtoWildBattle_branch_f5f5d: ; f5f5d +Music_JohtoWildBattleNight_branch_f5f5d: +Music_JohtoWildBattle_branch_f5f5d: notetype $c, $c2 octave 4 note F_, 1 @@ -417,11 +414,10 @@ Music_JohtoWildBattle_branch_f5f5d: ; f5f5d octave 5 note G_, 1 endchannel -; f5f91 -Music_JohtoWildBattle_Ch3: ; f5f91 +Music_JohtoWildBattle_Ch3: notetype $c, $14 -Music_JohtoWildBattleNight_branch_f5f94: ; f5f94 +Music_JohtoWildBattleNight_branch_f5f94: octave 4 note G_, 2 octave 5 @@ -470,7 +466,7 @@ Music_JohtoWildBattleNight_branch_f5f94: ; f5f94 note D#, 2 note G_, 2 note F_, 2 -Music_JohtoWildBattle_branch_f5fc6: ; f5fc6 +Music_JohtoWildBattle_branch_f5fc6: note D_, 2 note G_, 2 loopchannel 6, Music_JohtoWildBattle_branch_f5fc6 @@ -487,20 +483,20 @@ Music_JohtoWildBattle_branch_f5fc6: ; f5fc6 note G_, 2 note F_, 2 note D#, 2 -Music_JohtoWildBattle_branch_f5fdb: ; f5fdb +Music_JohtoWildBattle_branch_f5fdb: note D_, 2 note G_, 2 loopchannel 7, Music_JohtoWildBattle_branch_f5fdb note F#, 4 callchannel Music_JohtoWildBattle_branch_f6055 callchannel Music_JohtoWildBattle_branch_f6055 -Music_JohtoWildBattle_branch_f5fe8: ; f5fe8 +Music_JohtoWildBattle_branch_f5fe8: note D_, 2 note G_, 2 loopchannel 7, Music_JohtoWildBattle_branch_f5fe8 note D_, 2 note A_, 2 -Music_JohtoWildBattle_branch_f5ff0: ; f5ff0 +Music_JohtoWildBattle_branch_f5ff0: note C_, 2 note F_, 2 loopchannel 5, Music_JohtoWildBattle_branch_f5ff0 @@ -518,7 +514,7 @@ Music_JohtoWildBattle_branch_f5ff0: ; f5ff0 note D#, 2 note G#, 2 note G_, 4 -Music_JohtoWildBattle_branch_f6006: ; f6006 +Music_JohtoWildBattle_branch_f6006: note E_, 2 note A_, 2 loopchannel 8, Music_JohtoWildBattle_branch_f6006 @@ -547,11 +543,11 @@ Music_JohtoWildBattle_branch_f6006: ; f6006 note F#, 2 note F_, 2 note D#, 2 -Music_JohtoWildBattle_branch_f6027: ; f6027 +Music_JohtoWildBattle_branch_f6027: note D_, 2 note G_, 2 loopchannel 8, Music_JohtoWildBattle_branch_f6027 -Music_JohtoWildBattle_branch_f602d: ; f602d +Music_JohtoWildBattle_branch_f602d: note C_, 2 note F_, 2 loopchannel 7, Music_JohtoWildBattle_branch_f602d @@ -561,17 +557,17 @@ Music_JohtoWildBattle_branch_f602d: ; f602d note G_, 4 note D_, 4 note G_, 4 -Music_JohtoWildBattle_branch_f6039: ; f6039 +Music_JohtoWildBattle_branch_f6039: note D_, 2 note G_, 2 loopchannel 12, Music_JohtoWildBattle_branch_f6039 -Music_JohtoWildBattle_branch_f603f: ; f603f +Music_JohtoWildBattle_branch_f603f: note C_, 2 note E_, 2 loopchannel 7, Music_JohtoWildBattle_branch_f603f note F_, 2 note F#, 2 -Music_JohtoWildBattle_branch_f6047: ; f6047 +Music_JohtoWildBattle_branch_f6047: note D_, 2 note G_, 2 loopchannel 6, Music_JohtoWildBattle_branch_f6047 @@ -580,11 +576,9 @@ Music_JohtoWildBattle_branch_f6047: ; f6047 note F#, 2 note E_, 2 loopchannel 0, Music_JohtoWildBattle_branch_f5fdb -; f6055 -Music_JohtoWildBattle_branch_f6055: ; f6055 +Music_JohtoWildBattle_branch_f6055: note D#, 2 note G#, 2 loopchannel 4, Music_JohtoWildBattle_branch_f6055 endchannel -; f605c diff --git a/audio/music/johtowildbattlenight.asm b/audio/music/johtowildbattlenight.asm index d176a43f342..b4b1651bd73 100644 --- a/audio/music/johtowildbattlenight.asm +++ b/audio/music/johtowildbattlenight.asm @@ -1,19 +1,17 @@ -Music_JohtoWildBattleNight: ; f605c +Music_JohtoWildBattleNight: musicheader 3, 1, Music_JohtoWildBattleNight_Ch1 musicheader 1, 2, Music_JohtoWildBattleNight_Ch2 musicheader 1, 3, Music_JohtoWildBattleNight_Ch3 -; f6065 -Music_JohtoWildBattleNight_Ch1: ; f6065 +Music_JohtoWildBattleNight_Ch1: tempo 107 volume $77 dutycycle $3 tone $0002 vibrato $10, $25 loopchannel 0, Music_JohtoWildBattleNight_branch_f5ddb -; f6076 -Music_JohtoWildBattleNight_Ch2: ; f6076 +Music_JohtoWildBattleNight_Ch2: dutycycle $3 vibrato $20, $36 tone $0001 @@ -24,9 +22,7 @@ Music_JohtoWildBattleNight_Ch2: ; f6076 tone $0001 dutycycle $2 loopchannel 0, Music_JohtoWildBattleNight_branch_f5eb2 -; f608f -Music_JohtoWildBattleNight_Ch3: ; f608f +Music_JohtoWildBattleNight_Ch3: notetype $c, $11 loopchannel 0, Music_JohtoWildBattleNight_branch_f5f94 -; f6096 diff --git a/audio/music/kantogymbattle.asm b/audio/music/kantogymbattle.asm index 99fdab1a609..7ba65a42217 100644 --- a/audio/music/kantogymbattle.asm +++ b/audio/music/kantogymbattle.asm @@ -1,10 +1,9 @@ -Music_KantoGymBattle: ; ec720 +Music_KantoGymBattle: musicheader 3, 1, Music_KantoGymBattle_Ch1 musicheader 1, 2, Music_KantoGymBattle_Ch2 musicheader 1, 3, Music_KantoGymBattle_Ch3 -; ec729 -Music_KantoGymBattle_Ch1: ; ec729 +Music_KantoGymBattle_Ch1: tempo 101 volume $77 dutycycle $3 @@ -86,7 +85,7 @@ Music_KantoGymBattle_Ch1: ; ec729 note E_, 4 note E_, 4 note E_, 2 -Music_KantoGymBattle_branch_ec78b: ; ec78b +Music_KantoGymBattle_branch_ec78b: callchannel Music_KantoGymBattle_branch_ec832 octave 2 note A#, 2 @@ -229,9 +228,8 @@ Music_KantoGymBattle_branch_ec78b: ; ec78b octave 3 note D_, 4 loopchannel 0, Music_KantoGymBattle_branch_ec78b -; ec832 -Music_KantoGymBattle_branch_ec832: ; ec832 +Music_KantoGymBattle_branch_ec832: intensity $b5 note D#, 2 octave 2 @@ -252,14 +250,13 @@ Music_KantoGymBattle_branch_ec832: ; ec832 note D#, 2 note C#, 2 endchannel -; ec847 -Music_KantoGymBattle_Ch2: ; ec847 +Music_KantoGymBattle_Ch2: dutycycle $3 vibrato $8, $36 tone $0001 notetype $c, $c2 -Music_KantoGymBattle_branch_ec852: ; ec852 +Music_KantoGymBattle_branch_ec852: octave 4 note A#, 1 note G#, 1 @@ -268,7 +265,7 @@ Music_KantoGymBattle_branch_ec852: ; ec852 note D#, 1 loopchannel 8, Music_KantoGymBattle_branch_ec852 octave 3 -Music_KantoGymBattle_branch_ec85d: ; ec85d +Music_KantoGymBattle_branch_ec85d: intensity $c2 note D#, 2 note D#, 2 @@ -316,7 +313,7 @@ Music_KantoGymBattle_branch_ec85d: ; ec85d intensity $c2 octave 4 loopchannel 2, Music_KantoGymBattle_branch_ec85d -Music_KantoGymBattle_branch_ec894: ; ec894 +Music_KantoGymBattle_branch_ec894: callchannel Music_KantoGymBattle_branch_ec907 note E_, 8 note G#, 8 @@ -405,9 +402,8 @@ Music_KantoGymBattle_branch_ec894: ; ec894 octave 3 note A_, 4 loopchannel 0, Music_KantoGymBattle_branch_ec894 -; ec907 -Music_KantoGymBattle_branch_ec907: ; ec907 +Music_KantoGymBattle_branch_ec907: dutycycle $2 intensity $d1 octave 3 @@ -437,21 +433,20 @@ Music_KantoGymBattle_branch_ec907: ; ec907 dutycycle $3 intensity $b0 endchannel -; ec92e -Music_KantoGymBattle_Ch3: ; ec92e +Music_KantoGymBattle_Ch3: notetype $c, $19 octave 2 note E_, 1 note __, 1 -Music_KantoGymBattle_branch_ec934: ; ec934 +Music_KantoGymBattle_branch_ec934: note B_, 3 note __, 1 loopchannel 6, Music_KantoGymBattle_branch_ec934 note B_, 2 note G#, 2 note B_, 2 -Music_KantoGymBattle_branch_ec93d: ; ec93d +Music_KantoGymBattle_branch_ec93d: note D#, 1 note __, 1 note D#, 1 @@ -489,12 +484,12 @@ Music_KantoGymBattle_branch_ec93d: ; ec93d note __, 1 note E_, 2 loopchannel 2, Music_KantoGymBattle_branch_ec93d -Music_KantoGymBattle_branch_ec965: ; ec965 +Music_KantoGymBattle_branch_ec965: octave 2 note D#, 2 note A#, 2 loopchannel 8, Music_KantoGymBattle_branch_ec965 -Music_KantoGymBattle_branch_ec96c: ; ec96c +Music_KantoGymBattle_branch_ec96c: note E_, 2 note B_, 2 loopchannel 4, Music_KantoGymBattle_branch_ec96c @@ -511,13 +506,13 @@ Music_KantoGymBattle_branch_ec96c: ; ec96c note E_, 2 octave 2 note B_, 2 -Music_KantoGymBattle_branch_ec97f: ; ec97f +Music_KantoGymBattle_branch_ec97f: octave 2 note F#, 2 octave 3 note C#, 2 loopchannel 8, Music_KantoGymBattle_branch_ec97f -Music_KantoGymBattle_branch_ec987: ; ec987 +Music_KantoGymBattle_branch_ec987: octave 2 note E_, 2 note B_, 2 @@ -526,7 +521,7 @@ Music_KantoGymBattle_branch_ec987: ; ec987 note E_, 2 octave 2 note B_, 2 -Music_KantoGymBattle_branch_ec992: ; ec992 +Music_KantoGymBattle_branch_ec992: note D#, 1 note __, 1 note D#, 1 @@ -546,7 +541,7 @@ Music_KantoGymBattle_branch_ec992: ; ec992 note __, 1 note E_, 2 loopchannel 2, Music_KantoGymBattle_branch_ec992 -Music_KantoGymBattle_branch_ec9a8: ; ec9a8 +Music_KantoGymBattle_branch_ec9a8: note D#, 2 note A#, 2 loopchannel 7, Music_KantoGymBattle_branch_ec9a8 @@ -563,12 +558,12 @@ Music_KantoGymBattle_branch_ec9a8: ; ec9a8 note B_, 2 octave 3 note E_, 2 -Music_KantoGymBattle_branch_ec9bb: ; ec9bb +Music_KantoGymBattle_branch_ec9bb: octave 2 note E_, 2 note B_, 2 loopchannel 5, Music_KantoGymBattle_branch_ec9bb -Music_KantoGymBattle_branch_ec9c2: ; ec9c2 +Music_KantoGymBattle_branch_ec9c2: octave 2 note F#, 2 octave 3 @@ -588,16 +583,16 @@ Music_KantoGymBattle_branch_ec9c2: ; ec9c2 note F#, 2 note E_, 2 note C#, 2 -Music_KantoGymBattle_branch_ec9d8: ; ec9d8 +Music_KantoGymBattle_branch_ec9d8: octave 2 note D#, 2 note A#, 2 loopchannel 4, Music_KantoGymBattle_branch_ec9d8 -Music_KantoGymBattle_branch_ec9df: ; ec9df +Music_KantoGymBattle_branch_ec9df: note C#, 2 note G#, 2 loopchannel 8, Music_KantoGymBattle_branch_ec9df -Music_KantoGymBattle_branch_ec9e5: ; ec9e5 +Music_KantoGymBattle_branch_ec9e5: note D#, 2 note A#, 2 loopchannel 4, Music_KantoGymBattle_branch_ec9e5 @@ -613,4 +608,3 @@ Music_KantoGymBattle_branch_ec9e5: ; ec9e5 note D#, 2 note F_, 2 loopchannel 0, Music_KantoGymBattle_branch_ec965 -; ec9fa diff --git a/audio/music/kantotrainerbattle.asm b/audio/music/kantotrainerbattle.asm index 10c1e7c0eab..511763c92a2 100644 --- a/audio/music/kantotrainerbattle.asm +++ b/audio/music/kantotrainerbattle.asm @@ -1,12 +1,11 @@ -Music_KantoTrainerBattle: ; ec9fa +Music_KantoTrainerBattle: musicheader 3, 1, Music_KantoTrainerBattle_Ch1 musicheader 1, 2, Music_KantoTrainerBattle_Ch2 musicheader 1, 3, Music_KantoTrainerBattle_Ch3 -; eca03 db $3 -Music_KantoTrainerBattle_Ch1: ; eca04 +Music_KantoTrainerBattle_Ch1: tempo 114 volume $77 pitchoffset 1, B_ @@ -127,7 +126,7 @@ Music_KantoTrainerBattle_Ch1: ; eca04 note D#, 2 note F_, 2 note F#, 2 -Music_KantoTrainerBattle_branch_eca88: ; eca88 +Music_KantoTrainerBattle_branch_eca88: notetype $c, $b7 note D#, 4 note __, 2 @@ -464,9 +463,8 @@ Music_KantoTrainerBattle_branch_eca88: ; eca88 octave 4 note D_, 4 loopchannel 0, Music_KantoTrainerBattle_branch_eca88 -; ecbea -Music_KantoTrainerBattle_Ch2: ; ecbea +Music_KantoTrainerBattle_Ch2: pitchoffset 1, B_ vibrato $6, $36 dutycycle $1 @@ -485,7 +483,7 @@ Music_KantoTrainerBattle_Ch2: ; ecbea note F#, 1 dutycycle $3 intensity $62 -Music_KantoTrainerBattle_branch_ecc04: ; ecc04 +Music_KantoTrainerBattle_branch_ecc04: octave 3 note G_, 1 note G#, 1 @@ -542,7 +540,7 @@ Music_KantoTrainerBattle_branch_ecc04: ; ecc04 octave 3 note D_, 1 note F_, 1 -Music_KantoTrainerBattle_branch_ecc41: ; ecc41 +Music_KantoTrainerBattle_branch_ecc41: notetype $c, $d7 octave 2 note C_, 1 @@ -917,9 +915,8 @@ Music_KantoTrainerBattle_branch_ecc41: ; ecc41 octave 3 note B_, 4 loopchannel 0, Music_KantoTrainerBattle_branch_ecc41 -; ecdd2 -Music_KantoTrainerBattle_Ch3: ; ecdd2 +Music_KantoTrainerBattle_Ch3: pitchoffset 1, B_ vibrato $12, $23 notetype $c, $15 @@ -1050,7 +1047,7 @@ Music_KantoTrainerBattle_Ch3: ; ecdd2 note G_, 2 note A#, 2 note B_, 2 -Music_KantoTrainerBattle_branch_ece5a: ; ece5a +Music_KantoTrainerBattle_branch_ece5a: notetype $c, $14 octave 6 note C_, 4 @@ -1537,4 +1534,3 @@ Music_KantoTrainerBattle_branch_ece5a: ; ece5a octave 5 note G_, 4 loopchannel 0, Music_KantoTrainerBattle_branch_ece5a -; ed06d diff --git a/audio/music/kantowildbattle.asm b/audio/music/kantowildbattle.asm index 7f4f6e17423..c19da00df51 100644 --- a/audio/music/kantowildbattle.asm +++ b/audio/music/kantowildbattle.asm @@ -1,12 +1,11 @@ -Music_KantoWildBattle: ; ed06d +Music_KantoWildBattle: musicheader 3, 1, Music_KantoWildBattle_Ch1 musicheader 1, 2, Music_KantoWildBattle_Ch2 musicheader 1, 3, Music_KantoWildBattle_Ch3 -; ed076 db $3 -Music_KantoWildBattle_Ch1: ; ed077 +Music_KantoWildBattle_Ch1: tempo 112 volume $77 vibrato $12, $23 @@ -25,7 +24,7 @@ Music_KantoWildBattle_Ch1: ; ed077 note G_, 1 note F#, 1 note F_, 1 -Music_KantoWildBattle_branch_ed091: ; ed091 +Music_KantoWildBattle_branch_ed091: notetype $c, $b7 callchannel Music_KantoWildBattle_branch_ed18a octave 4 @@ -208,7 +207,7 @@ Music_KantoWildBattle_branch_ed091: ; ed091 note D#, 1 note __, 5 note C#, 8 -Music_KantoWildBattle_branch_ed15b: ; ed15b +Music_KantoWildBattle_branch_ed15b: intensity $b1 octave 3 note C_, 1 @@ -216,34 +215,33 @@ Music_KantoWildBattle_branch_ed15b: ; ed15b note D_, 1 note C#, 1 loopchannel 8, Music_KantoWildBattle_branch_ed15b -Music_KantoWildBattle_branch_ed166: ; ed166 +Music_KantoWildBattle_branch_ed166: note C#, 1 note F_, 1 note E_, 1 note D#, 1 loopchannel 8, Music_KantoWildBattle_branch_ed166 -Music_KantoWildBattle_branch_ed16e: ; ed16e +Music_KantoWildBattle_branch_ed16e: note C_, 1 note D#, 1 note D_, 1 note C#, 1 loopchannel 16, Music_KantoWildBattle_branch_ed16e -Music_KantoWildBattle_branch_ed176: ; ed176 +Music_KantoWildBattle_branch_ed176: note C#, 1 note E_, 1 note D#, 1 note D_, 1 loopchannel 8, Music_KantoWildBattle_branch_ed176 -Music_KantoWildBattle_branch_ed17e: ; ed17e +Music_KantoWildBattle_branch_ed17e: note C_, 1 note D#, 1 note D_, 1 note C#, 1 loopchannel 8, Music_KantoWildBattle_branch_ed17e loopchannel 0, Music_KantoWildBattle_branch_ed091 -; ed18a -Music_KantoWildBattle_branch_ed18a: ; ed18a +Music_KantoWildBattle_branch_ed18a: octave 4 note C_, 1 note __, 5 @@ -265,9 +263,8 @@ Music_KantoWildBattle_branch_ed18a: ; ed18a note B_, 1 note __, 3 endchannel -; ed19f -Music_KantoWildBattle_Ch2: ; ed19f +Music_KantoWildBattle_Ch2: dutycycle $1 vibrato $12, $23 notetype $c, $b1 @@ -304,7 +301,7 @@ Music_KantoWildBattle_Ch2: ; ed19f note D#, 1 note D_, 1 note C#, 1 -Music_KantoWildBattle_branch_ed1c8: ; ed1c8 +Music_KantoWildBattle_branch_ed1c8: notetype $c, $b7 callchannel Music_KantoWildBattle_branch_ed2c6 octave 2 @@ -493,9 +490,8 @@ endr note C_, 2 note __, 2 loopchannel 0, Music_KantoWildBattle_branch_ed1c8 -; ed2c6 -Music_KantoWildBattle_branch_ed2c6: ; ed2c6 +Music_KantoWildBattle_branch_ed2c6: octave 2 note C_, 1 note __, 2 @@ -561,9 +557,8 @@ Music_KantoWildBattle_branch_ed2c6: ; ed2c6 octave 1 note G_, 2 endchannel -; ed307 -Music_KantoWildBattle_branch_ed307: ; ed307 +Music_KantoWildBattle_branch_ed307: octave 2 note C_, 2 note __, 4 @@ -584,9 +579,8 @@ Music_KantoWildBattle_branch_ed307: ; ed307 octave 2 note C_, 4 endchannel -; ed31b -Music_KantoWildBattle_branch_ed31b: ; ed31b +Music_KantoWildBattle_branch_ed31b: octave 2 note C_, 2 note __, 4 @@ -624,9 +618,8 @@ Music_KantoWildBattle_branch_ed31b: ; ed31b octave 3 note C_, 2 endchannel -; ed340 -Music_KantoWildBattle_branch_ed340: ; ed340 +Music_KantoWildBattle_branch_ed340: octave 3 note G_, 4 octave 2 @@ -647,9 +640,8 @@ Music_KantoWildBattle_branch_ed340: ; ed340 note C_, 2 note __, 2 endchannel -; ed354 -Music_KantoWildBattle_branch_ed354: ; ed354 +Music_KantoWildBattle_branch_ed354: note C_, 2 note __, 2 octave 3 @@ -670,9 +662,8 @@ Music_KantoWildBattle_branch_ed354: ; ed354 note C_, 2 note __, 2 endchannel -; ed368 -Music_KantoWildBattle_Ch3: ; ed368 +Music_KantoWildBattle_Ch3: vibrato $14, $23 notetype $c, $14 octave 3 @@ -723,7 +714,7 @@ Music_KantoWildBattle_Ch3: ; ed368 note G_, 1 octave 4 note G_, 1 -Music_KantoWildBattle_branch_ed39e: ; ed39e +Music_KantoWildBattle_branch_ed39e: notetype $c, $14 octave 5 note G_, 1 @@ -1222,4 +1213,3 @@ Music_KantoWildBattle_branch_ed39e: ; ed39e note G_, 16 note G_, 16 loopchannel 0, Music_KantoWildBattle_branch_ed39e -; ed5c6 diff --git a/audio/music/lakeofrage.asm b/audio/music/lakeofrage.asm index 4bfd8111b93..4f7154fd675 100644 --- a/audio/music/lakeofrage.asm +++ b/audio/music/lakeofrage.asm @@ -1,11 +1,10 @@ -Music_LakeOfRage: ; ee6c5 +Music_LakeOfRage: musicheader 4, 1, Music_LakeOfRage_Ch1 musicheader 1, 2, Music_LakeOfRage_Ch2 musicheader 1, 3, Music_LakeOfRage_Ch3 musicheader 1, 4, Music_LakeOfRage_Ch4 -; ee6d1 -Music_LakeOfRage_Ch1: ; ee6d1 +Music_LakeOfRage_Ch1: tempo 144 volume $77 dutycycle $3 @@ -19,7 +18,7 @@ Music_LakeOfRage_Ch1: ; ee6d1 note D_, 6 note D_, 6 note E_, 4 -Music_LakeOfRage_branch_ee6e9: ; ee6e9 +Music_LakeOfRage_branch_ee6e9: intensity $b5 note F#, 6 note E_, 6 @@ -93,9 +92,8 @@ Music_LakeOfRage_branch_ee6e9: ; ee6e9 intensity $a7 note D_, 6 loopchannel 0, Music_LakeOfRage_branch_ee6e9 -; ee749 -Music_LakeOfRage_Ch2: ; ee749 +Music_LakeOfRage_Ch2: dutycycle $3 vibrato $20, $44 stereopanning $ff @@ -108,7 +106,7 @@ Music_LakeOfRage_Ch2: ; ee749 note A_, 8 intensity $a7 note A_, 8 -Music_LakeOfRage_branch_ee75e: ; ee75e +Music_LakeOfRage_branch_ee75e: notetype $8, $c7 octave 4 note D_, 16 @@ -183,9 +181,8 @@ Music_LakeOfRage_branch_ee75e: ; ee75e notetype $c, $c7 note A_, 16 loopchannel 0, Music_LakeOfRage_branch_ee75e -; ee7c1 -Music_LakeOfRage_Ch3: ; ee7c1 +Music_LakeOfRage_Ch3: stereopanning $f notetype $c, $16 octave 3 @@ -198,7 +195,7 @@ Music_LakeOfRage_Ch3: ; ee7c1 note F#, 4 note __, 2 note E_, 4 -Music_LakeOfRage_branch_ee7d0: ; ee7d0 +Music_LakeOfRage_branch_ee7d0: octave 3 note D_, 4 octave 2 @@ -297,13 +294,12 @@ Music_LakeOfRage_branch_ee7d0: ; ee7d0 octave 2 note A_, 2 loopchannel 0, Music_LakeOfRage_branch_ee7d0 -; ee835 -Music_LakeOfRage_Ch4: ; ee835 +Music_LakeOfRage_Ch4: stereopanning $f0 togglenoise $3 notetype $c -Music_LakeOfRage_branch_ee83b: ; ee83b +Music_LakeOfRage_branch_ee83b: note D_, 2 note D_, 1 note D_, 1 @@ -324,4 +320,3 @@ Music_LakeOfRage_branch_ee83b: ; ee83b note D_, 1 note D_, 1 loopchannel 0, Music_LakeOfRage_branch_ee83b -; ee852 diff --git a/audio/music/lakeofragerocketradio.asm b/audio/music/lakeofragerocketradio.asm index ff7176fca00..512db764fd3 100644 --- a/audio/music/lakeofragerocketradio.asm +++ b/audio/music/lakeofragerocketradio.asm @@ -1,17 +1,16 @@ -Music_LakeOfRageRocketRadio: ; ef5b1 +Music_LakeOfRageRocketRadio: musicheader 3, 1, Music_LakeOfRageRocketRadio_Ch1 musicheader 1, 2, Music_LakeOfRageRocketRadio_Ch2 musicheader 1, 3, Music_LakeOfRageRocketRadio_Ch3 -; ef5ba -Music_LakeOfRageRocketRadio_Ch1: ; ef5ba +Music_LakeOfRageRocketRadio_Ch1: tempo 160 volume $77 dutycycle $1 tone $1118 vibrato $0, $f0 stereopanning $f0 -Music_LakeOfRageRocketRadio_branch_ef5c9: ; ef5c9 +Music_LakeOfRageRocketRadio_branch_ef5c9: notetype $c, $a7 octave 7 note G_, 4 @@ -20,20 +19,17 @@ Music_LakeOfRageRocketRadio_branch_ef5c9: ; ef5c9 note F#, 4 note __, 16 loopchannel 0, Music_LakeOfRageRocketRadio_branch_ef5c9 -; ef5d6 -Music_LakeOfRageRocketRadio_Ch2: ; ef5d6 +Music_LakeOfRageRocketRadio_Ch2: dutycycle $1 vibrato $13, $e8 notetype $c, $a7 note __, 2 stereopanning $f loopchannel 0, Music_LakeOfRageRocketRadio_branch_ef5c9 -; ef5e5 -Music_LakeOfRageRocketRadio_Ch3: ; ef5e5 +Music_LakeOfRageRocketRadio_Ch3: notetype $c, $26 vibrato $10, $44 note __, 4 loopchannel 0, Music_LakeOfRageRocketRadio_branch_ef5c9 -; ef5f0 diff --git a/audio/music/lavendertown.asm b/audio/music/lavendertown.asm index 11608cf9bfc..6384b70185a 100644 --- a/audio/music/lavendertown.asm +++ b/audio/music/lavendertown.asm @@ -1,12 +1,11 @@ -Music_LavenderTown: ; ef72f +Music_LavenderTown: musicheader 3, 1, Music_LavenderTown_Ch1 musicheader 1, 2, Music_LavenderTown_Ch2 musicheader 1, 3, Music_LavenderTown_Ch3 -; ef738 db $3 -Music_LavenderTown_Ch1: ; ef739 +Music_LavenderTown_Ch1: tempo 160 volume $77 stereopanning $f @@ -17,7 +16,7 @@ Music_LavenderTown_Ch1: ; ef739 note __, 16 note __, 16 note __, 16 -Music_LavenderTown_branch_ef74c: ; ef74c +Music_LavenderTown_branch_ef74c: callchannel Music_LavenderTown_branch_ef7fd intensity $93 octave 5 @@ -103,7 +102,7 @@ Music_LavenderTown_branch_ef74c: ; ef74c octave 3 note A_, 2 note F_, 2 -Music_LavenderTown_branch_ef7ca: ; ef7ca +Music_LavenderTown_branch_ef7ca: octave 3 note C_, 2 note E_, 2 @@ -149,9 +148,8 @@ Music_LavenderTown_branch_ef7ca: ; ef7ca note B_, 8 note B_, 8 loopchannel 0, Music_LavenderTown_branch_ef74c -; ef7fd -Music_LavenderTown_branch_ef7fd: ; ef7fd +Music_LavenderTown_branch_ef7fd: intensity $83 octave 5 note C_, 2 @@ -242,9 +240,8 @@ Music_LavenderTown_branch_ef7fd: ; ef7fd intensity $43 note F_, 2 endchannel -; ef87f -Music_LavenderTown_branch_ef87f: ; ef87f +Music_LavenderTown_branch_ef87f: intensity $93 octave 5 note G_, 2 @@ -263,13 +260,12 @@ Music_LavenderTown_branch_ef87f: ; ef87f intensity $43 note G_, 2 endchannel -; ef899 -Music_LavenderTown_Ch2: ; ef899 +Music_LavenderTown_Ch2: dutycycle $1 vibrato $8, $24 stereopanning $ff -Music_LavenderTown_branch_ef8a0: ; ef8a0 +Music_LavenderTown_branch_ef8a0: notetype $c, $a3 octave 5 note C_, 2 @@ -305,7 +301,7 @@ Music_LavenderTown_branch_ef8a0: ; ef8a0 note D_, 2 intensity $63 note D_, 2 -Music_LavenderTown_branch_ef8d7: ; ef8d7 +Music_LavenderTown_branch_ef8d7: intensity $b5 callchannel Music_LavenderTown_branch_ef915 octave 2 @@ -358,9 +354,8 @@ Music_LavenderTown_branch_ef8d7: ; ef8d7 note F_, 1 note G_, 6 loopchannel 0, Music_LavenderTown_branch_ef8d7 -; ef915 -Music_LavenderTown_branch_ef915: ; ef915 +Music_LavenderTown_branch_ef915: octave 2 note C_, 4 note G_, 4 @@ -390,9 +385,8 @@ Music_LavenderTown_branch_ef915: ; ef915 note A_, 4 note C_, 4 endchannel -; ef932 -Music_LavenderTown_Ch3: ; ef932 +Music_LavenderTown_Ch3: vibrato $12, $24 notetype $c, $13 stereopanning $f0 @@ -403,7 +397,7 @@ Music_LavenderTown_Ch3: ; ef932 octave 5 note E_, 4 note F_, 4 -Music_LavenderTown_branch_ef941: ; ef941 +Music_LavenderTown_branch_ef941: intensity $12 octave 5 note G_, 4 @@ -518,4 +512,3 @@ Music_LavenderTown_branch_ef941: ; ef941 note E_, 2 note F_, 2 loopchannel 0, Music_LavenderTown_branch_ef941 -; ef9bc diff --git a/audio/music/lighthouse.asm b/audio/music/lighthouse.asm index 0a0dc063798..9846e7ec667 100644 --- a/audio/music/lighthouse.asm +++ b/audio/music/lighthouse.asm @@ -1,18 +1,17 @@ -Music_Lighthouse: ; ee569 +Music_Lighthouse: musicheader 4, 1, Music_Lighthouse_Ch1 musicheader 1, 2, Music_Lighthouse_Ch2 musicheader 1, 3, Music_Lighthouse_Ch3 musicheader 1, 4, Music_Lighthouse_Ch4 -; ee575 -Music_Lighthouse_Ch1: ; ee575 +Music_Lighthouse_Ch1: tempo 144 volume $77 dutycycle $3 tone $0004 vibrato $8, $45 stereopanning $f -Music_Lighthouse_branch_ee584: ; ee584 +Music_Lighthouse_branch_ee584: notetype $c, $b3 octave 3 note C#, 8 @@ -128,13 +127,12 @@ Music_Lighthouse_branch_ee584: ; ee584 note A_, 2 note G#, 8 loopchannel 0, Music_Lighthouse_branch_ee584 -; ee5fc -Music_Lighthouse_Ch2: ; ee5fc +Music_Lighthouse_Ch2: dutycycle $3 tone $0002 vibrato $10, $45 -Music_Lighthouse_branch_ee604: ; ee604 +Music_Lighthouse_branch_ee604: notetype $c, $c5 octave 3 note G#, 12 @@ -211,12 +209,11 @@ Music_Lighthouse_branch_ee604: ; ee604 note C#, 2 note C_, 8 loopchannel 0, Music_Lighthouse_branch_ee604 -; ee656 -Music_Lighthouse_Ch3: ; ee656 +Music_Lighthouse_Ch3: notetype $c, $19 stereopanning $f0 -Music_Lighthouse_branch_ee65b: ; ee65b +Music_Lighthouse_branch_ee65b: octave 2 note G#, 2 note __, 2 @@ -226,7 +223,7 @@ Music_Lighthouse_branch_ee65b: ; ee65b note __, 2 note G_, 2 note __, 2 -Music_Lighthouse_branch_ee664: ; ee664 +Music_Lighthouse_branch_ee664: note G#, 2 note __, 2 note D#, 2 @@ -255,7 +252,7 @@ Music_Lighthouse_branch_ee664: ; ee664 octave 3 note C_, 2 note __, 2 -Music_Lighthouse_branch_ee683: ; ee683 +Music_Lighthouse_branch_ee683: note C#, 2 note __, 2 octave 2 @@ -277,7 +274,7 @@ Music_Lighthouse_branch_ee683: ; ee683 octave 3 note D#, 2 note F#, 2 -Music_Lighthouse_branch_ee69b: ; ee69b +Music_Lighthouse_branch_ee69b: note E_, 2 note __, 2 octave 2 @@ -290,12 +287,11 @@ Music_Lighthouse_branch_ee69b: ; ee69b note __, 2 loopchannel 8, Music_Lighthouse_branch_ee69b loopchannel 0, Music_Lighthouse_branch_ee65b -; ee6ad -Music_Lighthouse_Ch4: ; ee6ad +Music_Lighthouse_Ch4: togglenoise $0 notetype $c -Music_Lighthouse_branch_ee6b1: ; ee6b1 +Music_Lighthouse_branch_ee6b1: stereopanning $f note G#, 4 note F_, 2 @@ -311,4 +307,3 @@ Music_Lighthouse_branch_ee6b1: ; ee6b1 note G#, 2 note A_, 2 loopchannel 0, Music_Lighthouse_branch_ee6b1 -; ee6c5 diff --git a/audio/music/lookbeauty.asm b/audio/music/lookbeauty.asm index a7ee254bb8b..313f2366354 100644 --- a/audio/music/lookbeauty.asm +++ b/audio/music/lookbeauty.asm @@ -1,11 +1,10 @@ -Music_LookBeauty: ; eee3e +Music_LookBeauty: musicheader 4, 1, Music_LookBeauty_Ch1 musicheader 1, 2, Music_LookBeauty_Ch2 musicheader 1, 3, Music_LookBeauty_Ch3 musicheader 1, 4, Music_LookBeauty_Ch4 -; eee4a -Music_LookBeauty_Ch1: ; eee4a +Music_LookBeauty_Ch1: stereopanning $f vibrato $12, $25 dutycycle $2 @@ -17,7 +16,7 @@ Music_LookBeauty_Ch1: ; eee4a octave 4 note C_, 8 dutycycle $3 -Music_LookBeauty_branch_eee5f: ; eee5f +Music_LookBeauty_branch_eee5f: note __, 4 octave 3 note D_, 1 @@ -76,9 +75,8 @@ Music_LookBeauty_branch_eee5f: ; eee5f octave 4 note C_, 1 loopchannel 0, Music_LookBeauty_branch_eee5f -; eee9c -Music_LookBeauty_Ch2: ; eee9c +Music_LookBeauty_Ch2: stereopanning $f0 vibrato $10, $23 dutycycle $2 @@ -113,7 +111,7 @@ Music_LookBeauty_Ch2: ; eee9c note F#, 1 note __, 1 dutycycle $3 -Music_LookBeauty_branch_eeec5: ; eeec5 +Music_LookBeauty_branch_eeec5: notetype $c, $c7 note G_, 16 note A_, 8 @@ -154,9 +152,8 @@ Music_LookBeauty_branch_eeec5: ; eeec5 note F#, 8 note A_, 8 loopchannel 0, Music_LookBeauty_branch_eeec5 -; eeefa -Music_LookBeauty_Ch3: ; eeefa +Music_LookBeauty_Ch3: stereopanning $ff vibrato $8, $12 notetype $c, $15 @@ -173,7 +170,7 @@ Music_LookBeauty_Ch3: ; eeefa octave 3 note D_, 7 note F#, 1 -Music_LookBeauty_branch_eef0f: ; eef0f +Music_LookBeauty_branch_eef0f: note G_, 4 octave 4 note B_, 1 @@ -295,22 +292,20 @@ Music_LookBeauty_branch_eef0f: ; eef0f octave 3 note D_, 8 loopchannel 0, Music_LookBeauty_branch_eef0f -; eef8b -Music_LookBeauty_Ch4: ; eef8b +Music_LookBeauty_Ch4: togglenoise $3 notetype $c note __, 16 note __, 16 -Music_LookBeauty_branch_eef91: ; eef91 +Music_LookBeauty_branch_eef91: callchannel Music_LookBeauty_branch_eefa1 callchannel Music_LookBeauty_branch_eefa1 callchannel Music_LookBeauty_branch_eefa1 callchannel Music_LookBeauty_branch_eefa1 loopchannel 0, Music_LookBeauty_branch_eef91 -; eefa1 -Music_LookBeauty_branch_eefa1: ; eefa1 +Music_LookBeauty_branch_eefa1: note F#, 2 note G_, 2 note D_, 2 @@ -328,4 +323,3 @@ Music_LookBeauty_branch_eefa1: ; eefa1 note D_, 2 note G_, 2 endchannel -; eefb2 diff --git a/audio/music/lookhiker.asm b/audio/music/lookhiker.asm index 0a86a3026c9..9a394eb7b5e 100644 --- a/audio/music/lookhiker.asm +++ b/audio/music/lookhiker.asm @@ -1,11 +1,10 @@ -Music_LookHiker: ; f7411 +Music_LookHiker: musicheader 4, 1, Music_LookHiker_Ch1 musicheader 1, 2, Music_LookHiker_Ch2 musicheader 1, 3, Music_LookHiker_Ch3 musicheader 1, 4, Music_LookHiker_Ch4 -; f741d -Music_LookHiker_Ch1: ; f741d +Music_LookHiker_Ch1: tempo 132 volume $77 tone $0001 @@ -17,7 +16,7 @@ Music_LookHiker_Ch1: ; f741d note F#, 2 note F_, 2 note F#, 8 -Music_LookHiker_branch_f7433: ; f7433 +Music_LookHiker_branch_f7433: note D_, 2 note D#, 2 note E_, 2 @@ -31,9 +30,8 @@ Music_LookHiker_branch_f7433: ; f7433 note F#, 2 note __, 6 loopchannel 0, Music_LookHiker_branch_f7433 -; f7443 -Music_LookHiker_Ch2: ; f7443 +Music_LookHiker_Ch2: dutycycle $0 notetype $c, $a1 note __, 4 @@ -50,7 +48,7 @@ Music_LookHiker_Ch2: ; f7443 note F#, 1 note D_, 1 intensity $a1 -Music_LookHiker_branch_f7457: ; f7457 +Music_LookHiker_branch_f7457: octave 1 note B_, 1 note B_, 2 @@ -68,9 +66,8 @@ Music_LookHiker_branch_f7457: ; f7457 note F#, 1 note D_, 1 loopchannel 0, Music_LookHiker_branch_f7457 -; f746b -Music_LookHiker_Ch3: ; f746b +Music_LookHiker_Ch3: vibrato $12, $24 stereopanning $f0 notetype $c, $14 @@ -78,7 +75,7 @@ Music_LookHiker_Ch3: ; f746b note B_, 2 note A#, 2 note B_, 8 -Music_LookHiker_branch_f7477: ; f7477 +Music_LookHiker_branch_f7477: octave 5 note D#, 2 note D_, 2 @@ -91,9 +88,8 @@ Music_LookHiker_branch_f7477: ; f7477 note A#, 2 callchannel Music_LookHiker_branch_f748a loopchannel 0, Music_LookHiker_branch_f7477 -; f748a -Music_LookHiker_branch_f748a: ; f748a +Music_LookHiker_branch_f748a: octave 4 note B_, 2 note __, 4 @@ -104,17 +100,15 @@ Music_LookHiker_branch_f748a: ; f748a note B_, 2 note __, 6 endchannel -; f7494 -Music_LookHiker_Ch4: ; f7494 +Music_LookHiker_Ch4: togglenoise $3 notetype $c note F_, 4 note __, 16 -Music_LookHiker_branch_f749a: ; f749a +Music_LookHiker_branch_f749a: note D#, 2 note G_, 2 note D_, 2 note G_, 2 loopchannel 0, Music_LookHiker_branch_f749a -; f74a2 diff --git a/audio/music/lookkimonogirl.asm b/audio/music/lookkimonogirl.asm index 6acbb5ab140..dc1dbee87c1 100644 --- a/audio/music/lookkimonogirl.asm +++ b/audio/music/lookkimonogirl.asm @@ -1,12 +1,11 @@ -Music_LookKimonoGirl: ; f79b8 +Music_LookKimonoGirl: musicheader 3, 1, Music_LookKimonoGirl_Ch1 musicheader 1, 2, Music_LookKimonoGirl_Ch2 musicheader 1, 3, Music_LookKimonoGirl_Ch3 -; f79c1 db $3 -Music_LookKimonoGirl_Ch1: ; f79c2 +Music_LookKimonoGirl_Ch1: tempo 160 volume $77 stereopanning $f @@ -15,7 +14,7 @@ Music_LookKimonoGirl_Ch1: ; f79c2 tone $0001 callchannel Music_LookKimonoGirl_branch_f7aa8 tone 0 -Music_LookKimonoGirl_branch_f79d7: ; f79d7 +Music_LookKimonoGirl_branch_f79d7: notetype $c, $b2 callchannel Music_LookKimonoGirl_branch_f7a13 callchannel Music_LookKimonoGirl_branch_f7a13 @@ -49,9 +48,8 @@ Music_LookKimonoGirl_branch_f79d7: ; f79d7 octave 3 note A_, 1 loopchannel 0, Music_LookKimonoGirl_branch_f79d7 -; f7a13 -Music_LookKimonoGirl_branch_f7a13: ; f7a13 +Music_LookKimonoGirl_branch_f7a13: intensity $b4 octave 2 note F_, 1 @@ -77,9 +75,8 @@ Music_LookKimonoGirl_branch_f7a13: ; f7a13 octave 4 note D_, 1 endchannel -; f7a34 -Music_LookKimonoGirl_branch_f7a34: ; f7a34 +Music_LookKimonoGirl_branch_f7a34: intensity $b4 octave 2 note E_, 1 @@ -105,14 +102,13 @@ Music_LookKimonoGirl_branch_f7a34: ; f7a34 octave 4 note D_, 1 endchannel -; f7a55 -Music_LookKimonoGirl_Ch2: ; f7a55 +Music_LookKimonoGirl_Ch2: dutycycle $0 notetype $6, $a7 stereopanning $f0 callchannel Music_LookKimonoGirl_branch_f7aa8 -Music_LookKimonoGirl_branch_f7a5f: ; f7a5f +Music_LookKimonoGirl_branch_f7a5f: dutycycle $3 notetype $c, $91 octave 5 @@ -156,9 +152,8 @@ Music_LookKimonoGirl_branch_f7a5f: ; f7a5f note D_, 1 callchannel Music_LookKimonoGirl_branch_f7a94 loopchannel 0, Music_LookKimonoGirl_branch_f7a5f -; f7a94 -Music_LookKimonoGirl_branch_f7a94: ; f7a94 +Music_LookKimonoGirl_branch_f7a94: octave 5 note B_, 1 note A_, 1 @@ -179,9 +174,8 @@ Music_LookKimonoGirl_branch_f7a94: ; f7a94 note B_, 1 note E_, 1 endchannel -; f7aa8 -Music_LookKimonoGirl_branch_f7aa8: ; f7aa8 +Music_LookKimonoGirl_branch_f7aa8: octave 4 note E_, 1 octave 5 @@ -215,9 +209,8 @@ Music_LookKimonoGirl_branch_f7aa8: ; f7aa8 note E_, 1 note E_, 1 endchannel -; f7ad4 -Music_LookKimonoGirl_Ch3: ; f7ad4 +Music_LookKimonoGirl_Ch3: stereopanning $ff vibrato $12, $24 notetype $6, $13 @@ -233,7 +226,7 @@ Music_LookKimonoGirl_Ch3: ; f7ad4 octave 5 note D_, 2 note E_, 2 -Music_LookKimonoGirl_branch_f7aec: ; f7aec +Music_LookKimonoGirl_branch_f7aec: octave 5 note D_, 4 note E_, 4 @@ -270,4 +263,3 @@ Music_LookKimonoGirl_branch_f7aec: ; f7aec note D_, 8 note E_, 8 loopchannel 0, Music_LookKimonoGirl_branch_f7aec -; f7b13 diff --git a/audio/music/looklass.asm b/audio/music/looklass.asm index 1aecb3e3404..802716c141f 100644 --- a/audio/music/looklass.asm +++ b/audio/music/looklass.asm @@ -1,11 +1,10 @@ -Music_LookLass: ; ed79b +Music_LookLass: musicheader 4, 1, Music_LookLass_Ch1 musicheader 1, 2, Music_LookLass_Ch2 musicheader 1, 3, Music_LookLass_Ch3 musicheader 1, 4, Music_LookLass_Ch4 -; ed7a7 -Music_LookLass_Ch1: ; ed7a7 +Music_LookLass_Ch1: tempo 132 volume $77 tone $0001 @@ -18,7 +17,7 @@ Music_LookLass_Ch1: ; ed7a7 note B_, 14 stereopanning $f dutycycle $0 -Music_LookLass_branch_ed7bd: ; ed7bd +Music_LookLass_branch_ed7bd: intensity $a2 octave 3 note E_, 4 @@ -29,14 +28,13 @@ Music_LookLass_branch_ed7bd: ; ed7bd intensity $a3 note B_, 2 loopchannel 0, Music_LookLass_branch_ed7bd -; ed7cd -Music_LookLass_Ch2: ; ed7cd +Music_LookLass_Ch2: stereopanning $f0 dutycycle $0 notetype $c, $83 note __, 16 -Music_LookLass_branch_ed7d5: ; ed7d5 +Music_LookLass_branch_ed7d5: intensity $92 octave 2 note B_, 4 @@ -48,9 +46,8 @@ Music_LookLass_branch_ed7d5: ; ed7d5 octave 3 note G#, 2 loopchannel 0, Music_LookLass_branch_ed7d5 -; ed7e6 -Music_LookLass_Ch3: ; ed7e6 +Music_LookLass_Ch3: notetype $c, $10 note __, 8 octave 6 @@ -58,7 +55,7 @@ Music_LookLass_Ch3: ; ed7e6 note D#, 2 note C#, 2 note C_, 2 -Music_LookLass_branch_ed7ef: ; ed7ef +Music_LookLass_branch_ed7ef: octave 5 note B_, 2 note __, 2 @@ -99,13 +96,12 @@ Music_LookLass_branch_ed7ef: ; ed7ef note G#, 2 note A_, 2 loopchannel 0, Music_LookLass_branch_ed7ef -; ed81a -Music_LookLass_Ch4: ; ed81a +Music_LookLass_Ch4: togglenoise $4 notetype $c note C_, 16 -Music_LookLass_branch_ed81f: ; ed81f +Music_LookLass_branch_ed81f: notetype $6 note D_, 8 note C#, 8 @@ -116,4 +112,3 @@ Music_LookLass_branch_ed81f: ; ed81f note C#, 1 note C#, 1 loopchannel 0, Music_LookLass_branch_ed81f -; ed82d diff --git a/audio/music/lookmysticalman.asm b/audio/music/lookmysticalman.asm index 1c0ab67b462..675c937eef9 100644 --- a/audio/music/lookmysticalman.asm +++ b/audio/music/lookmysticalman.asm @@ -1,11 +1,10 @@ -Music_LookMysticalMan: ; 17843b +Music_LookMysticalMan: musicheader 4, 1, Music_LookMysticalMan_Ch1 musicheader 1, 2, Music_LookMysticalMan_Ch2 musicheader 1, 3, Music_LookMysticalMan_Ch3 musicheader 1, 4, Music_LookMysticalMan_Ch4 -; 178447 -Music_LookMysticalMan_Ch1: ; 178447 +Music_LookMysticalMan_Ch1: tempo 136 volume $77 vibrato $a, $34 @@ -13,7 +12,7 @@ Music_LookMysticalMan_Ch1: ; 178447 stereopanning $f notetype $c, $b3 note __, 8 -Music_LookMysticalMan_branch_178458: ; 178458 +Music_LookMysticalMan_branch_178458: dutycycle $3 notetype $6, $96 octave 3 @@ -94,7 +93,7 @@ Music_LookMysticalMan_branch_178458: ; 178458 note A#, 6 dutycycle $2 intensity $72 -Music_LookMysticalMan_branch_1784b4: ; 1784b4 +Music_LookMysticalMan_branch_1784b4: octave 5 note D_, 2 octave 4 @@ -124,7 +123,7 @@ Music_LookMysticalMan_branch_1784b4: ; 1784b4 note D_, 2 note F#, 2 note B_, 2 -Music_LookMysticalMan_branch_1784d4: ; 1784d4 +Music_LookMysticalMan_branch_1784d4: octave 5 note D_, 2 octave 4 @@ -156,9 +155,8 @@ Music_LookMysticalMan_branch_1784d4: ; 1784d4 note F#, 2 note A#, 2 loopchannel 0, Music_LookMysticalMan_branch_178458 -; 1784f9 -Music_LookMysticalMan_branch_1784f9: ; 1784f9 +Music_LookMysticalMan_branch_1784f9: note D_, 16 octave 4 note D_, 2 @@ -192,14 +190,13 @@ Music_LookMysticalMan_branch_1784f9: ; 1784f9 note B_, 2 note A_, 6 endchannel -; 17851a -Music_LookMysticalMan_Ch2: ; 17851a +Music_LookMysticalMan_Ch2: dutycycle $3 vibrato $a, $34 notetype $c, $b3 note __, 8 -Music_LookMysticalMan_branch_178523: ; 178523 +Music_LookMysticalMan_branch_178523: stereopanning $f0 notetype $6, $b8 octave 3 @@ -297,9 +294,8 @@ Music_LookMysticalMan_branch_178523: ; 178523 note A#, 16 note __, 2 loopchannel 0, Music_LookMysticalMan_branch_178523 -; 17859a -Music_LookMysticalMan_branch_17859a: ; 17859a +Music_LookMysticalMan_branch_17859a: note B_, 2 note __, 2 octave 4 @@ -343,9 +339,8 @@ Music_LookMysticalMan_branch_17859a: ; 17859a note F#, 2 note E_, 6 endchannel -; 1785c8 -Music_LookMysticalMan_branch_1785c8: ; 1785c8 +Music_LookMysticalMan_branch_1785c8: note C#, 8 intensity $88 note C_, 1 @@ -361,12 +356,11 @@ Music_LookMysticalMan_branch_1785c8: ; 1785c8 note __, 1 intensity $b8 endchannel -; 1785db -Music_LookMysticalMan_Ch3: ; 1785db +Music_LookMysticalMan_Ch3: notetype $6, $16 note __, 16 -Music_LookMysticalMan_branch_1785df: ; 1785df +Music_LookMysticalMan_branch_1785df: octave 2 note B_, 4 octave 3 @@ -421,7 +415,7 @@ Music_LookMysticalMan_branch_1785df: ; 1785df note A_, 2 octave 3 note E_, 2 -Music_LookMysticalMan_branch_178615: ; 178615 +Music_LookMysticalMan_branch_178615: octave 2 note F#, 4 note A#, 2 @@ -537,9 +531,8 @@ Music_LookMysticalMan_branch_178615: ; 178615 note B_, 8 note A#, 4 loopchannel 0, Music_LookMysticalMan_branch_1785df -; 17868e -Music_LookMysticalMan_Ch4: ; 17868e +Music_LookMysticalMan_Ch4: togglenoise $3 notetype $c note D#, 2 @@ -547,7 +540,7 @@ Music_LookMysticalMan_Ch4: ; 17868e note D_, 2 note D_, 1 note D_, 1 -Music_LookMysticalMan_branch_178697: ; 178697 +Music_LookMysticalMan_branch_178697: callchannel Music_LookMysticalMan_branch_1786d3 callchannel Music_LookMysticalMan_branch_1786d9 callchannel Music_LookMysticalMan_branch_1786d3 @@ -566,7 +559,7 @@ Music_LookMysticalMan_branch_178697: ; 178697 note D_, 2 note D_, 1 note D_, 1 -Music_LookMysticalMan_branch_1786ba: ; 1786ba +Music_LookMysticalMan_branch_1786ba: note D_, 2 note D#, 2 note D_, 3 @@ -586,27 +579,24 @@ Music_LookMysticalMan_branch_1786ba: ; 1786ba note D_, 1 loopchannel 2, Music_LookMysticalMan_branch_1786ba loopchannel 0, Music_LookMysticalMan_branch_178697 -; 1786d3 -Music_LookMysticalMan_branch_1786d3: ; 1786d3 +Music_LookMysticalMan_branch_1786d3: note D#, 4 note D_, 3 note D#, 3 note D#, 2 note D_, 4 endchannel -; 1786d9 -Music_LookMysticalMan_branch_1786d9: ; 1786d9 +Music_LookMysticalMan_branch_1786d9: note D#, 4 note D_, 3 note D_, 3 note D#, 2 note D_, 4 endchannel -; 1786df -Music_LookMysticalMan_branch_1786df: ; 1786df +Music_LookMysticalMan_branch_1786df: note D#, 4 note D_, 2 note D#, 1 @@ -616,4 +606,3 @@ Music_LookMysticalMan_branch_1786df: ; 1786df note D_, 1 note D_, 1 endchannel -; 1786e8 diff --git a/audio/music/lookofficer.asm b/audio/music/lookofficer.asm index a8667afdbec..75e527b756b 100644 --- a/audio/music/lookofficer.asm +++ b/audio/music/lookofficer.asm @@ -1,10 +1,9 @@ -Music_LookOfficer: ; ed82d +Music_LookOfficer: musicheader 3, 1, Music_LookOfficer_Ch1 musicheader 1, 2, Music_LookOfficer_Ch2 musicheader 1, 3, Music_LookOfficer_Ch3 -; ed836 -Music_LookOfficer_Ch1: ; ed836 +Music_LookOfficer_Ch1: tempo 116 volume $77 tone $0001 @@ -21,7 +20,7 @@ Music_LookOfficer_Ch1: ; ed836 intensity $2f octave 3 note B_, 16 -Music_LookOfficer_branch_ed852: ; ed852 +Music_LookOfficer_branch_ed852: intensity $82 note __, 4 note B_, 6 @@ -34,9 +33,8 @@ Music_LookOfficer_branch_ed852: ; ed852 note A#, 16 note A_, 16 loopchannel 0, Music_LookOfficer_branch_ed852 -; ed863 -Music_LookOfficer_Ch2: ; ed863 +Music_LookOfficer_Ch2: vibrato $12, $34 dutycycle $3 notetype $c, $b7 @@ -61,7 +59,7 @@ Music_LookOfficer_Ch2: ; ed863 note B_, 2 octave 2 note D#, 2 -Music_LookOfficer_branch_ed882: ; ed882 +Music_LookOfficer_branch_ed882: note E_, 2 note G#, 2 octave 3 @@ -78,9 +76,8 @@ Music_LookOfficer_branch_ed882: ; ed882 pitchoffset 0, C_ callchannel Music_LookOfficer_branch_ed89e loopchannel 0, Music_LookOfficer_branch_ed882 -; ed89e -Music_LookOfficer_branch_ed89e: ; ed89e +Music_LookOfficer_branch_ed89e: octave 1 note A_, 2 octave 2 @@ -96,9 +93,8 @@ Music_LookOfficer_branch_ed89e: ; ed89e octave 2 note C#, 2 endchannel -; ed8ad -Music_LookOfficer_Ch3: ; ed8ad +Music_LookOfficer_Ch3: vibrato $14, $14 stereopanning $f0 notetype $c, $14 @@ -120,7 +116,7 @@ Music_LookOfficer_Ch3: ; ed8ad note C#, 2 note __, 1 note D#, 2 -Music_LookOfficer_branch_ed8c8: ; ed8c8 +Music_LookOfficer_branch_ed8c8: note E_, 6 note D#, 6 note C#, 4 @@ -139,4 +135,3 @@ Music_LookOfficer_branch_ed8c8: ; ed8c8 note E_, 8 note C#, 8 loopchannel 0, Music_LookOfficer_branch_ed8c8 -; ed8dd diff --git a/audio/music/lookpokemaniac.asm b/audio/music/lookpokemaniac.asm index f60d9ca645e..4c4f8506e06 100644 --- a/audio/music/lookpokemaniac.asm +++ b/audio/music/lookpokemaniac.asm @@ -1,10 +1,9 @@ -Music_LookPokemaniac: ; ebde1 +Music_LookPokemaniac: musicheader 3, 1, Music_LookPokemaniac_Ch1 musicheader 1, 2, Music_LookPokemaniac_Ch2 musicheader 1, 3, Music_LookPokemaniac_Ch3 -; ebdea -Music_LookPokemaniac_Ch1: ; ebdea +Music_LookPokemaniac_Ch1: stereopanning $f tempo 144 volume $77 @@ -12,7 +11,7 @@ Music_LookPokemaniac_Ch1: ; ebdea tone $0002 notetype $c, $b3 note __, 8 -Music_LookPokemaniac_branch_ebdfb: ; ebdfb +Music_LookPokemaniac_branch_ebdfb: note __, 4 octave 3 note A#, 1 @@ -27,9 +26,8 @@ Music_LookPokemaniac_branch_ebdfb: ; ebdfb note __, 3 loopchannel 4, Music_LookPokemaniac_branch_ebdfb loopchannel 0, Music_LookPokemaniac_branch_ebdfb -; ebe12 -Music_LookPokemaniac_Ch2: ; ebe12 +Music_LookPokemaniac_Ch2: stereopanning $ff vibrato $2, $33 tone $0001 @@ -41,7 +39,7 @@ Music_LookPokemaniac_Ch2: ; ebe12 note C_, 1 octave 1 note A_, 4 -Music_LookPokemaniac_branch_ebe24: ; ebe24 +Music_LookPokemaniac_branch_ebe24: octave 2 note C_, 2 note __, 2 @@ -59,7 +57,7 @@ Music_LookPokemaniac_branch_ebe24: ; ebe24 note D#, 1 note __, 3 loopchannel 2, Music_LookPokemaniac_branch_ebe24 -Music_LookPokemaniac_branch_ebe38: ; ebe38 +Music_LookPokemaniac_branch_ebe38: octave 1 note A_, 2 note __, 2 @@ -79,9 +77,8 @@ Music_LookPokemaniac_branch_ebe38: ; ebe38 note __, 3 loopchannel 2, Music_LookPokemaniac_branch_ebe38 loopchannel 0, Music_LookPokemaniac_branch_ebe24 -; ebe51 -Music_LookPokemaniac_Ch3: ; ebe51 +Music_LookPokemaniac_Ch3: stereopanning $f0 vibrato $6, $33 notetype $c, $15 @@ -93,15 +90,14 @@ Music_LookPokemaniac_Ch3: ; ebe51 octave 5 note C_, 4 intensity $10 -Music_LookPokemaniac_branch_ebe62: ; ebe62 +Music_LookPokemaniac_branch_ebe62: callchannel Music_LookPokemaniac_branch_ebe70 intensity $14 callchannel Music_LookPokemaniac_branch_ebe70 intensity $10 loopchannel 0, Music_LookPokemaniac_branch_ebe62 -; ebe70 -Music_LookPokemaniac_branch_ebe70: ; ebe70 +Music_LookPokemaniac_branch_ebe70: note A#, 6 note A_, 2 note G#, 2 @@ -161,4 +157,3 @@ Music_LookPokemaniac_branch_ebe70: ; ebe70 note C_, 1 note __, 1 endchannel -; ebeab diff --git a/audio/music/lookrival.asm b/audio/music/lookrival.asm index e0685294464..5eff9991a5f 100644 --- a/audio/music/lookrival.asm +++ b/audio/music/lookrival.asm @@ -1,11 +1,10 @@ -Music_LookRival: ; f4f79 +Music_LookRival: musicheader 4, 1, Music_LookRival_Ch1 musicheader 1, 2, Music_LookRival_Ch2 musicheader 1, 3, Music_LookRival_Ch3 musicheader 1, 4, Music_LookRival_Ch4 -; f4f85 -Music_LookRival_Ch1: ; f4f85 +Music_LookRival_Ch1: tempo 112 volume $77 dutycycle $1 @@ -34,8 +33,8 @@ Music_LookRival_Ch1: ; f4f85 note G#, 8 intensity $a6 note F#, 8 -Music_AfterTheRivalFight_branch_f4fb1: ; f4fb1 -Music_LookRival_branch_f4fb1: ; f4fb1 +Music_AfterTheRivalFight_branch_f4fb1: +Music_LookRival_branch_f4fb1: intensity $b5 note F_, 4 note D#, 2 @@ -99,7 +98,7 @@ Music_LookRival_branch_f4fb1: ; f4fb1 note G#, 8 note F_, 6 note C_, 2 -Music_LookRival_branch_f4ff7: ; f4ff7 +Music_LookRival_branch_f4ff7: intensity $b2 note F_, 6 intensity $b7 @@ -115,9 +114,8 @@ Music_LookRival_branch_f4ff7: ; f4ff7 note G#, 6 note F#, 4 loopchannel 0, Music_LookRival_branch_f4fb1 -; f5010 -Music_LookRival_Ch2: ; f5010 +Music_LookRival_Ch2: dutycycle $3 vibrato $8, $36 stereopanning $f0 @@ -138,8 +136,8 @@ Music_LookRival_Ch2: ; f5010 note D#, 10 intensity $b7 note D#, 16 -Music_AfterTheRivalFight_branch_f502e: ; f502e -Music_LookRival_branch_f502e: ; f502e +Music_AfterTheRivalFight_branch_f502e: +Music_LookRival_branch_f502e: intensity $c7 note C_, 12 intensity $c4 @@ -192,7 +190,7 @@ Music_LookRival_branch_f502e: ; f502e note D#, 1 note D_, 1 note D#, 2 -Music_LookRival_branch_f5070: ; f5070 +Music_LookRival_branch_f5070: intensity $c2 note C_, 6 intensity $c7 @@ -205,9 +203,8 @@ Music_LookRival_branch_f5070: ; f5070 intensity $c7 note D#, 10 loopchannel 0, Music_LookRival_branch_f502e -; f5086 -Music_LookRival_Ch3: ; f5086 +Music_LookRival_Ch3: notetype $c, $28 note __, 2 octave 4 @@ -229,8 +226,8 @@ Music_LookRival_Ch3: ; f5086 note C_, 2 note D#, 2 note F#, 2 -Music_AfterTheRivalFight_branch_f509d: ; f509d -Music_LookRival_branch_f509d: ; f509d +Music_AfterTheRivalFight_branch_f509d: +Music_LookRival_branch_f509d: callchannel Music_LookRival_branch_f50ef loopchannel 3, Music_LookRival_branch_f509d note F_, 4 @@ -293,9 +290,8 @@ Music_LookRival_branch_f509d: ; f509d note F#, 2 note E_, 2 loopchannel 0, Music_LookRival_branch_f509d -; f50ef -Music_LookRival_branch_f50ef: ; f50ef +Music_LookRival_branch_f50ef: note F_, 2 note C_, 2 note D_, 2 @@ -304,9 +300,8 @@ Music_LookRival_branch_f50ef: ; f50ef note D_, 2 note D#, 2 endchannel -; f50f7 -Music_LookRival_branch_f50f7: ; f50f7 +Music_LookRival_branch_f50f7: note A#, 2 note F_, 2 note G_, 2 @@ -315,9 +310,8 @@ Music_LookRival_branch_f50f7: ; f50f7 note G_, 2 note G#, 2 endchannel -; f50ff -Music_LookRival_branch_f50ff: ; f50ff +Music_LookRival_branch_f50ff: note A#, 4 note F_, 2 note G#, 4 @@ -325,9 +319,8 @@ Music_LookRival_branch_f50ff: ; f50ff note G_, 2 note G#, 2 endchannel -; f5106 -Music_LookRival_Ch4: ; f5106 +Music_LookRival_Ch4: stereopanning $f0 togglenoise $3 notetype $c @@ -343,8 +336,8 @@ Music_LookRival_Ch4: ; f5106 note D_, 2 note D_, 2 note D_, 2 -Music_AfterTheRivalFight_branch_f5118: ; f5118 -Music_LookRival_branch_f5118: ; f5118 +Music_AfterTheRivalFight_branch_f5118: +Music_LookRival_branch_f5118: note D#, 4 note D_, 2 note D#, 4 @@ -357,4 +350,3 @@ Music_LookRival_branch_f5118: ; f5118 note D_, 2 note D_, 2 loopchannel 0, Music_LookRival_branch_f5118 -; f5127 diff --git a/audio/music/lookrocket.asm b/audio/music/lookrocket.asm index 518a9b7e049..bd0c0e43456 100644 --- a/audio/music/lookrocket.asm +++ b/audio/music/lookrocket.asm @@ -1,11 +1,10 @@ -Music_LookRocket: ; f74a2 +Music_LookRocket: musicheader 4, 1, Music_LookRocket_Ch1 musicheader 1, 2, Music_LookRocket_Ch2 musicheader 1, 3, Music_LookRocket_Ch3 musicheader 1, 4, Music_LookRocket_Ch4 -; f74ae -Music_LookRocket_Ch1: ; f74ae +Music_LookRocket_Ch1: tempo 123 volume $77 pitchoffset 0, D_ @@ -18,7 +17,7 @@ Music_LookRocket_Ch1: ; f74ae note D_, 1 callchannel Music_LookRocket_branch_f74e6 dutycycle $1 -Music_LookRocket_branch_f74c7: ; f74c7 +Music_LookRocket_branch_f74c7: intensity $a8 callchannel Music_LookRocket_branch_f74f7 callchannel Music_LookRocket_branch_f758a @@ -33,10 +32,9 @@ Music_LookRocket_branch_f74c7: ; f74c7 callchannel Music_LookRocket_branch_f750c note __, 16 loopchannel 0, Music_LookRocket_branch_f74c7 -; f74e6 -Music_LookRocket_branch_f74e6: ; f74e6 -Music_RocketTheme_branch_f74e6: ; f74e6 +Music_LookRocket_branch_f74e6: +Music_RocketTheme_branch_f74e6: note D#, 1 note __, 1 note D_, 1 @@ -54,10 +52,9 @@ Music_RocketTheme_branch_f74e6: ; f74e6 note F_, 1 note G#, 1 endchannel -; f74f7 -Music_LookRocket_branch_f74f7: ; f74f7 -Music_RocketTheme_branch_f74f7: ; f74f7 +Music_LookRocket_branch_f74f7: +Music_RocketTheme_branch_f74f7: note __, 2 octave 3 note D#, 1 @@ -79,10 +76,9 @@ Music_RocketTheme_branch_f74f7: ; f74f7 note F#, 1 note __, 1 endchannel -; f750c -Music_LookRocket_branch_f750c: ; f750c -Music_RocketTheme_branch_f750c: ; f750c +Music_LookRocket_branch_f750c: +Music_RocketTheme_branch_f750c: note __, 2 octave 2 note B_, 1 @@ -91,9 +87,8 @@ Music_RocketTheme_branch_f750c: ; f750c note C_, 1 note __, 5 endchannel -; f7514 -Music_LookRocket_Ch2: ; f7514 +Music_LookRocket_Ch2: pitchoffset 0, D_ vibrato $4, $64 dutycycle $3 @@ -103,7 +98,7 @@ Music_LookRocket_Ch2: ; f7514 note C_, 1 note D_, 1 callchannel Music_LookRocket_branch_f7547 -Music_LookRocket_branch_f7526: ; f7526 +Music_LookRocket_branch_f7526: intensity $b7 callchannel Music_LookRocket_branch_f758a octave 5 @@ -118,10 +113,9 @@ Music_LookRocket_branch_f7526: ; f7526 callchannel Music_LookRocket_branch_f7568 callchannel Music_LookRocket_branch_f756f loopchannel 0, Music_LookRocket_branch_f7526 -; f7547 -Music_LookRocket_branch_f7547: ; f7547 -Music_RocketTheme_branch_f7547: ; f7547 +Music_LookRocket_branch_f7547: +Music_RocketTheme_branch_f7547: note D#, 1 note __, 1 note D_, 1 @@ -134,10 +128,9 @@ Music_RocketTheme_branch_f7547: ; f7547 note B_, 6 dutycycle $0 endchannel -; f7554 -Music_LookRocket_branch_f7554: ; f7554 -Music_RocketTheme_branch_f7554: ; f7554 +Music_LookRocket_branch_f7554: +Music_RocketTheme_branch_f7554: note __, 2 octave 4 note D#, 1 @@ -158,10 +151,9 @@ Music_RocketTheme_branch_f7554: ; f7554 note D#, 1 note __, 1 endchannel -; f7568 -Music_LookRocket_branch_f7568: ; f7568 -Music_RocketTheme_branch_f7568: ; f7568 +Music_LookRocket_branch_f7568: +Music_RocketTheme_branch_f7568: note __, 2 octave 3 note F_, 1 @@ -169,10 +161,9 @@ Music_RocketTheme_branch_f7568: ; f7568 note F#, 1 note __, 5 endchannel -; f756f -Music_LookRocket_branch_f756f: ; f756f -Music_RocketTheme_branch_f756f: ; f756f +Music_LookRocket_branch_f756f: +Music_RocketTheme_branch_f756f: intensity $63 note G#, 1 note F_, 1 @@ -196,10 +187,9 @@ Music_RocketTheme_branch_f756f: ; f756f note F_, 1 note D_, 1 endchannel -; f758a -Music_LookRocket_branch_f758a: ; f758a -Music_RocketTheme_branch_f758a: ; f758a +Music_LookRocket_branch_f758a: +Music_RocketTheme_branch_f758a: octave 3 note __, 2 note G_, 1 @@ -213,16 +203,15 @@ Music_RocketTheme_branch_f758a: ; f758a note A_, 1 note __, 1 endchannel -; f7597 -Music_LookRocket_Ch3: ; f7597 +Music_LookRocket_Ch3: pitchoffset 0, D_ vibrato $4, $22 notetype $c, $14 stereopanning $f0 note __, 2 callchannel Music_LookRocket_branch_f75bf -Music_LookRocket_branch_f75a5: ; f75a5 +Music_LookRocket_branch_f75a5: callchannel Music_LookRocket_branch_f75fe callchannel Music_LookRocket_branch_f75fe intensity $24 @@ -232,10 +221,9 @@ Music_LookRocket_branch_f75a5: ; f75a5 callchannel Music_LookRocket_branch_f7623 callchannel Music_LookRocket_branch_f75e1 loopchannel 0, Music_LookRocket_branch_f75a5 -; f75bf -Music_LookRocket_branch_f75bf: ; f75bf -Music_RocketTheme_branch_f75bf: ; f75bf +Music_LookRocket_branch_f75bf: +Music_RocketTheme_branch_f75bf: octave 3 note F_, 1 note __, 1 @@ -249,10 +237,9 @@ Music_RocketTheme_branch_f75bf: ; f75bf octave 3 note D_, 6 endchannel -; f75cc -Music_LookRocket_branch_f75cc: ; f75cc -Music_RocketTheme_branch_f75cc: ; f75cc +Music_LookRocket_branch_f75cc: +Music_RocketTheme_branch_f75cc: octave 2 note G#, 1 note __, 1 @@ -274,10 +261,9 @@ Music_RocketTheme_branch_f75cc: ; f75cc note F#, 1 note __, 1 endchannel -; f75e1 -Music_LookRocket_branch_f75e1: ; f75e1 -Music_RocketTheme_branch_f75e1: ; f75e1 +Music_LookRocket_branch_f75e1: +Music_RocketTheme_branch_f75e1: intensity $24 octave 2 note G#, 1 @@ -305,10 +291,9 @@ Music_RocketTheme_branch_f75e1: ; f75e1 note G#, 1 note __, 1 endchannel -; f75fe -Music_LookRocket_branch_f75fe: ; f75fe -Music_RocketTheme_branch_f75fe: ; f75fe +Music_LookRocket_branch_f75fe: +Music_RocketTheme_branch_f75fe: note C_, 1 note __, 1 octave 4 @@ -346,10 +331,9 @@ Music_RocketTheme_branch_f75fe: ; f75fe note A_, 1 note __, 1 endchannel -; f7623 -Music_LookRocket_branch_f7623: ; f7623 -Music_RocketTheme_branch_f7623: ; f7623 +Music_LookRocket_branch_f7623: +Music_RocketTheme_branch_f7623: octave 2 note G#, 1 note __, 1 @@ -371,14 +355,13 @@ Music_RocketTheme_branch_f7623: ; f7623 note D#, 1 note C_, 1 endchannel -; f7638 -Music_LookRocket_Ch4: ; f7638 +Music_LookRocket_Ch4: togglenoise $3 notetype $c note __, 2 callchannel Music_LookRocket_branch_f765c -Music_LookRocket_branch_f7640: ; f7640 +Music_LookRocket_branch_f7640: callchannel Music_LookRocket_branch_f7664 callchannel Music_LookRocket_branch_f7664 callchannel Music_LookRocket_branch_f7664 @@ -388,10 +371,9 @@ Music_LookRocket_branch_f7640: ; f7640 callchannel Music_LookRocket_branch_f7664 callchannel Music_LookRocket_branch_f765c loopchannel 0, Music_LookRocket_branch_f7640 -; f765c -Music_LookRocket_branch_f765c: ; f765c -Music_RocketTheme_branch_f765c: ; f765c +Music_LookRocket_branch_f765c: +Music_RocketTheme_branch_f765c: note C_, 8 note D_, 2 note D#, 2 @@ -400,10 +382,9 @@ Music_RocketTheme_branch_f765c: ; f765c note D_, 1 note D_, 1 endchannel -; f7664 -Music_LookRocket_branch_f7664: ; f7664 -Music_RocketTheme_branch_f7664: ; f7664 +Music_LookRocket_branch_f7664: +Music_RocketTheme_branch_f7664: note D#, 2 note F#, 2 note D_, 2 @@ -413,4 +394,3 @@ Music_RocketTheme_branch_f7664: ; f7664 note D_, 2 note F#, 2 endchannel -; f766d diff --git a/audio/music/looksage.asm b/audio/music/looksage.asm index 28fa594558e..e1b51c397ff 100644 --- a/audio/music/looksage.asm +++ b/audio/music/looksage.asm @@ -1,9 +1,8 @@ -Music_LookSage: ; ee35e +Music_LookSage: musicheader 2, 1, Music_LookSage_Ch1 musicheader 1, 3, Music_LookSage_Ch3 -; ee364 -Music_LookSage_Ch1: ; ee364 +Music_LookSage_Ch1: tempo 144 stereopanning $f volume $77 @@ -29,7 +28,7 @@ Music_LookSage_Ch1: ; ee364 note F_, 2 intensity $93 note F_, 2 -Music_LookSage_branch_ee38e: ; ee38e +Music_LookSage_branch_ee38e: intensity $b3 note D_, 2 intensity $93 @@ -101,9 +100,8 @@ Music_LookSage_branch_ee38e: ; ee38e note B_, 2 callchannel Music_LookSage_branch_ee3fa loopchannel 0, Music_LookSage_branch_ee38e -; ee3fa -Music_LookSage_branch_ee3fa: ; ee3fa +Music_LookSage_branch_ee3fa: intensity $b3 octave 2 note E_, 2 @@ -122,9 +120,8 @@ Music_LookSage_branch_ee3fa: ; ee3fa intensity $93 note A_, 2 endchannel -; ee414 -Music_LookSage_Ch3: ; ee414 +Music_LookSage_Ch3: stereopanning $f0 vibrato $16, $23 notetype $c, $10 @@ -144,7 +141,7 @@ Music_LookSage_Ch3: ; ee414 note E_, 14 note G_, 1 note G#, 1 -Music_LookSage_branch_ee430: ; ee430 +Music_LookSage_branch_ee430: note A_, 12 note B_, 4 note D_, 9 @@ -179,4 +176,3 @@ Music_LookSage_branch_ee430: ; ee430 note G_, 1 note G#, 1 loopchannel 0, Music_LookSage_branch_ee430 -; ee45f diff --git a/audio/music/lookyoungster.asm b/audio/music/lookyoungster.asm index bcc5d150370..e835d5fe9e3 100644 --- a/audio/music/lookyoungster.asm +++ b/audio/music/lookyoungster.asm @@ -1,10 +1,9 @@ -Music_LookYoungster: ; f66c3 +Music_LookYoungster: musicheader 3, 1, Music_LookYoungster_Ch1 musicheader 1, 2, Music_LookYoungster_Ch2 musicheader 1, 3, Music_LookYoungster_Ch3 -; f66cc -Music_LookYoungster_Ch1: ; f66cc +Music_LookYoungster_Ch1: tempo 118 volume $77 stereopanning $f @@ -25,7 +24,7 @@ Music_LookYoungster_Ch1: ; f66cc note __, 2 note C_, 6 intensity $b3 -Music_LookYoungster_branch_f66ea: ; f66ea +Music_LookYoungster_branch_f66ea: note __, 2 octave 3 note G_, 1 @@ -59,11 +58,10 @@ Music_LookYoungster_branch_f66ea: ; f66ea note __, 1 note __, 16 loopchannel 0, Music_LookYoungster_branch_f66ea -; f670e db $ff -Music_LookYoungster_Ch2: ; f670f +Music_LookYoungster_Ch2: stereopanning $f0 vibrato $12, $26 dutycycle $1 @@ -84,7 +82,7 @@ Music_LookYoungster_Ch2: ; f670f note F_, 4 note __, 2 note F#, 6 -Music_LookYoungster_branch_f672f: ; f672f +Music_LookYoungster_branch_f672f: dutycycle $3 intensity $b3 note __, 2 @@ -158,11 +156,10 @@ Music_LookYoungster_branch_f672f: ; f672f note C_, 1 note __, 1 loopchannel 0, Music_LookYoungster_branch_f672f -; f6783 db $ff -Music_LookYoungster_Ch3: ; f6784 +Music_LookYoungster_Ch3: stereopanning $ff vibrato $2, $24 notetype $c, $25 @@ -198,7 +195,7 @@ Music_LookYoungster_Ch3: ; f6784 note __, 2 note G#, 6 intensity $25 -Music_LookYoungster_branch_f67ae: ; f67ae +Music_LookYoungster_branch_f67ae: octave 2 note G_, 1 note __, 1 @@ -294,6 +291,5 @@ Music_LookYoungster_branch_f67ae: ; f67ae note G#, 1 note __, 1 loopchannel 0, Music_LookYoungster_branch_f67ae -; f6810 db $ff diff --git a/audio/music/magnettrain.asm b/audio/music/magnettrain.asm index 0b73cf89466..1452d606f56 100644 --- a/audio/music/magnettrain.asm +++ b/audio/music/magnettrain.asm @@ -1,11 +1,10 @@ -Music_MagnetTrain: ; ef5f0 +Music_MagnetTrain: musicheader 4, 1, Music_MagnetTrain_Ch1 musicheader 1, 2, Music_MagnetTrain_Ch2 musicheader 1, 3, Music_MagnetTrain_Ch3 musicheader 1, 4, Music_MagnetTrain_Ch4 -; ef5fc -Music_MagnetTrain_Ch1: ; ef5fc +Music_MagnetTrain_Ch1: tempo 110 volume $77 stereopanning $f @@ -68,9 +67,8 @@ Music_MagnetTrain_Ch1: ; ef5fc notetype $c, $b7 note D_, 16 endchannel -; ef648 -Music_MagnetTrain_Ch2: ; ef648 +Music_MagnetTrain_Ch2: vibrato $14, $23 dutycycle $1 notetype $c, $d2 @@ -107,9 +105,8 @@ Music_MagnetTrain_Ch2: ; ef648 notetype $c, $d7 note A_, 16 endchannel -; ef67d -Music_MagnetTrain_Ch3: ; ef67d +Music_MagnetTrain_Ch3: stereopanning $ff vibrato $10, $23 notetype $c, $15 @@ -224,9 +221,8 @@ Music_MagnetTrain_Ch3: ; ef67d octave 2 note D_, 16 endchannel -; ef6f4 -Music_MagnetTrain_Ch4: ; ef6f4 +Music_MagnetTrain_Ch4: togglenoise $3 notetype $c note B_, 12 @@ -248,11 +244,10 @@ Music_MagnetTrain_Ch4: ; ef6f4 notetype $c note B_, 16 endchannel -; ef711 ; unused -Music_MagnetTrain_branch_ef711: ; ef711 +Music_MagnetTrain_branch_ef711: note G#, 1 note G_, 1 note G_, 1 @@ -266,10 +261,9 @@ Music_MagnetTrain_branch_ef711: ; ef711 note G_, 1 note G_, 1 endchannel -; ef71e -Music_MagnetTrain_branch_ef71e: ; ef71e +Music_MagnetTrain_branch_ef71e: note G#, 2 note G_, 2 note G_, 2 @@ -287,4 +281,3 @@ Music_MagnetTrain_branch_ef71e: ; ef71e note G_, 2 note G_, 2 endchannel -; ef72f diff --git a/audio/music/mainmenu.asm b/audio/music/mainmenu.asm index 30c389ed300..b787a5ea0dd 100644 --- a/audio/music/mainmenu.asm +++ b/audio/music/mainmenu.asm @@ -1,11 +1,10 @@ -Music_MainMenu: ; f78fd +Music_MainMenu: musicheader 4, 1, Music_MainMenu_Ch1 musicheader 1, 2, Music_MainMenu_Ch2 musicheader 1, 3, Music_MainMenu_Ch3 musicheader 1, 4, Music_MainMenu_Ch4 -; f7909 -Music_MainMenu_Ch1: ; f7909 +Music_MainMenu_Ch1: tempo 160 volume $77 dutycycle $3 @@ -15,7 +14,7 @@ Music_MainMenu_Ch1: ; f7909 notetype $c, $f octave 3 note D_, 8 -Music_MainMenu_branch_f791d: ; f791d +Music_MainMenu_branch_f791d: notetype $c, $92 octave 3 note C#, 6 @@ -41,15 +40,14 @@ Music_MainMenu_branch_f791d: ; f791d octave 3 note C_, 4 loopchannel 0, Music_MainMenu_branch_f791d -; f7940 -Music_MainMenu_Ch2: ; f7940 +Music_MainMenu_Ch2: dutycycle $3 stereopanning $f notetype $c, $f octave 3 note G_, 8 -Music_MainMenu_branch_f7949: ; f7949 +Music_MainMenu_branch_f7949: notetype $c, $a2 note F#, 6 note F#, 1 @@ -72,13 +70,12 @@ Music_MainMenu_branch_f7949: ; f7949 notetype $c, $a4 note F_, 4 loopchannel 0, Music_MainMenu_branch_f7949 -; f7969 -Music_MainMenu_Ch3: ; f7969 +Music_MainMenu_Ch3: stereopanning $f0 notetype $c, $25 note __, 8 -Music_MainMenu_branch_f796f: ; f796f +Music_MainMenu_branch_f796f: octave 2 note F#, 1 note __, 5 @@ -112,9 +109,8 @@ Music_MainMenu_branch_f796f: ; f796f note F_, 1 note __, 3 loopchannel 0, Music_MainMenu_branch_f796f -; f7996 -Music_MainMenu_Ch4: ; f7996 +Music_MainMenu_Ch4: stereopanning $f togglenoise $3 notetype $c @@ -127,7 +123,7 @@ Music_MainMenu_Ch4: ; f7996 note D_, 1 note D_, 1 note D_, 1 -Music_MainMenu_branch_f79a5: ; f79a5 +Music_MainMenu_branch_f79a5: note D_, 6 note D_, 1 note D_, 1 @@ -144,4 +140,3 @@ Music_MainMenu_branch_f79a5: ; f79a5 note D_, 1 note D_, 1 loopchannel 0, Music_MainMenu_branch_f79a5 -; f79b8 diff --git a/audio/music/mobileadapter.asm b/audio/music/mobileadapter.asm index c94c66ad236..26c64cff802 100644 --- a/audio/music/mobileadapter.asm +++ b/audio/music/mobileadapter.asm @@ -1,11 +1,10 @@ -Music_MobileAdapter: ; 1fc87 +Music_MobileAdapter: musicheader 4, 1, Music_MobileAdapter_Ch1 musicheader 1, 2, Music_MobileAdapter_Ch2 musicheader 1, 3, Music_MobileAdapter_Ch3 musicheader 1, 4, Music_MobileAdapter_Ch4 -; 1fc93 -Music_MobileAdapter_Ch1: ; 1fc93 +Music_MobileAdapter_Ch1: tempo 132 volume $77 tone $0001 @@ -23,7 +22,7 @@ Music_MobileAdapter_Ch1: ; 1fc93 note D_, 1 note __, 1 note C#, 4 -Music_MobileAdapter_branch_1fcad: ; 1fcad +Music_MobileAdapter_branch_1fcad: callchannel Music_MobileAdapter_branch_1fd39 note D_, 1 note C#, 1 @@ -147,9 +146,8 @@ Music_MobileAdapter_branch_1fcad: ; 1fcad intensity $77 callchannel Music_MobileAdapter_branch_1ff09 loopchannel 0, Music_MobileAdapter_branch_1fcad -; 1fd39 -Music_MobileAdapter_branch_1fd39: ; 1fd39 +Music_MobileAdapter_branch_1fd39: intensity $94 octave 4 note F#, 1 @@ -190,9 +188,8 @@ Music_MobileAdapter_branch_1fd39: ; 1fd39 octave 4 note C#, 1 endchannel -; 1fd63 -Music_MobileAdapter_Ch2: ; 1fd63 +Music_MobileAdapter_Ch2: notetype $c, $c1 vibrato $10, $23 dutycycle $2 @@ -216,7 +213,7 @@ Music_MobileAdapter_Ch2: ; 1fd63 octave 4 note D_, 1 note F#, 1 -Music_MobileAdapter_branch_1fd80: ; 1fd80 +Music_MobileAdapter_branch_1fd80: callchannel Music_MobileAdapter_branch_1fdfe note A_, 4 note G_, 4 @@ -324,9 +321,8 @@ Music_MobileAdapter_branch_1fd80: ; 1fd80 note D_, 1 note F#, 1 loopchannel 0, Music_MobileAdapter_branch_1fd80 -; 1fdfe -Music_MobileAdapter_branch_1fdfe: ; 1fdfe +Music_MobileAdapter_branch_1fdfe: note A_, 1 note __, 1 note A_, 1 @@ -351,9 +347,8 @@ Music_MobileAdapter_branch_1fdfe: ; 1fdfe octave 4 note B_, 2 endchannel -; 1fe16 -Music_MobileAdapter_branch_1fe16: ; 1fe16 +Music_MobileAdapter_branch_1fe16: octave 5 note F#, 1 note D_, 1 @@ -393,9 +388,8 @@ Music_MobileAdapter_branch_1fe16: ; 1fe16 octave 5 note C#, 4 endchannel -; 1fe3d -Music_MobileAdapter_Ch3: ; 1fe3d +Music_MobileAdapter_Ch3: notetype $c, $14 note __, 2 octave 3 @@ -412,7 +406,7 @@ Music_MobileAdapter_Ch3: ; 1fe3d note E_, 1 note __, 1 note A_, 4 -Music_MobileAdapter_branch_1fe4f: ; 1fe4f +Music_MobileAdapter_branch_1fe4f: callchannel Music_MobileAdapter_branch_1fecf callchannel Music_MobileAdapter_branch_1fee3 callchannel Music_MobileAdapter_branch_1feee @@ -516,16 +510,15 @@ Music_MobileAdapter_branch_1fe4f: ; 1fe4f note D_, 4 callchannel Music_MobileAdapter_branch_1ff09 loopchannel 0, Music_MobileAdapter_branch_1fe4f -; 1fecf -Music_MobileAdapter_branch_1fecf: ; 1fecf +Music_MobileAdapter_branch_1fecf: octave 3 note D_, 1 note __, 1 note A_, 1 note __, 1 loopchannel 4, Music_MobileAdapter_branch_1fecf -Music_MobileAdapter_branch_1fed8: ; 1fed8 +Music_MobileAdapter_branch_1fed8: octave 2 note G_, 1 note __, 1 @@ -534,9 +527,8 @@ Music_MobileAdapter_branch_1fed8: ; 1fed8 note __, 1 loopchannel 4, Music_MobileAdapter_branch_1fed8 endchannel -; 1fee3 -Music_MobileAdapter_branch_1fee3: ; 1fee3 +Music_MobileAdapter_branch_1fee3: octave 2 note A_, 1 note __, 1 @@ -545,9 +537,8 @@ Music_MobileAdapter_branch_1fee3: ; 1fee3 note __, 1 loopchannel 4, Music_MobileAdapter_branch_1fee3 endchannel -; 1feee -Music_MobileAdapter_branch_1feee: ; 1feee +Music_MobileAdapter_branch_1feee: note D_, 1 note __, 1 note A_, 1 @@ -557,9 +548,8 @@ Music_MobileAdapter_branch_1feee: ; 1feee note A_, 1 note __, 1 endchannel -; 1fef7 -Music_MobileAdapter_branch_1fef7: ; 1fef7 +Music_MobileAdapter_branch_1fef7: octave 2 note A_, 1 note __, 1 @@ -578,9 +568,8 @@ Music_MobileAdapter_branch_1fef7: ; 1fef7 octave 2 note A_, 4 endchannel -; 1ff09 -Music_MobileAdapter_branch_1ff09: ; 1ff09 +Music_MobileAdapter_branch_1ff09: octave 2 note A_, 1 note __, 1 @@ -613,9 +602,8 @@ Music_MobileAdapter_branch_1ff09: ; 1ff09 note __, 6 loopchannel 2, Music_MobileAdapter_branch_1ff09 endchannel -; 1ff2c -Music_MobileAdapter_Ch4: ; 1ff2c +Music_MobileAdapter_Ch4: togglenoise $3 stereopanning $f0 notetype $c @@ -625,10 +613,10 @@ Music_MobileAdapter_Ch4: ; 1ff2c note D_, 2 note D_, 1 note D_, 1 -Music_MobileAdapter_branch_1ff38: ; 1ff38 +Music_MobileAdapter_branch_1ff38: callchannel Music_MobileAdapter_branch_1ff60 callchannel Music_MobileAdapter_branch_1ff60 -Music_MobileAdapter_branch_1ff3e: ; 1ff3e +Music_MobileAdapter_branch_1ff3e: note __, 4 note D_, 8 note D_, 8 @@ -637,7 +625,7 @@ Music_MobileAdapter_branch_1ff3e: ; 1ff3e note D_, 3 note D_, 4 loopchannel 2, Music_MobileAdapter_branch_1ff3e -Music_MobileAdapter_branch_1ff49: ; 1ff49 +Music_MobileAdapter_branch_1ff49: note __, 4 note D_, 4 loopchannel 11, Music_MobileAdapter_branch_1ff49 @@ -655,9 +643,8 @@ Music_MobileAdapter_branch_1ff49: ; 1ff49 note D_, 1 note D_, 1 loopchannel 0, Music_MobileAdapter_branch_1ff38 -; 1ff60 -Music_MobileAdapter_branch_1ff60: ; 1ff60 +Music_MobileAdapter_branch_1ff60: note __, 4 note D_, 4 loopchannel 7, Music_MobileAdapter_branch_1ff60 @@ -667,4 +654,3 @@ Music_MobileAdapter_branch_1ff60: ; 1ff60 note D_, 1 note D_, 1 endchannel -; 1ff6c diff --git a/audio/music/mobileadaptermenu.asm b/audio/music/mobileadaptermenu.asm index 8e9e8aee503..1573076fb89 100644 --- a/audio/music/mobileadaptermenu.asm +++ b/audio/music/mobileadaptermenu.asm @@ -1,10 +1,9 @@ -Music_MobileAdapterMenu: ; 17801f +Music_MobileAdapterMenu: musicheader 3, 1, Music_MobileAdapterMenu_Ch1 musicheader 1, 2, Music_MobileAdapterMenu_Ch2 musicheader 1, 3, Music_MobileAdapterMenu_Ch3 -; 178028 -Music_MobileAdapterMenu_Ch1: ; 178028 +Music_MobileAdapterMenu_Ch1: tempo 168 volume $77 tone $0001 @@ -12,7 +11,7 @@ Music_MobileAdapterMenu_Ch1: ; 178028 dutycycle $2 notetype $c, $66 note __, 2 -Music_MobileAdapterMenu_branch_178038: ; 178038 +Music_MobileAdapterMenu_branch_178038: callchannel Music_MobileAdapterMenu_branch_178057 callchannel Music_MobileAdapterMenu_branch_178076 octave 3 @@ -33,9 +32,8 @@ Music_MobileAdapterMenu_branch_178038: ; 178038 note D#, 8 callchannel Music_MobileAdapterMenu_branch_178057 loopchannel 0, Music_MobileAdapterMenu_branch_178038 -; 178057 -Music_MobileAdapterMenu_branch_178057: ; 178057 +Music_MobileAdapterMenu_branch_178057: octave 3 note G#, 7 octave 4 @@ -67,9 +65,8 @@ Music_MobileAdapterMenu_branch_178057: ; 178057 note A_, 1 note G#, 8 endchannel -; 178076 -Music_MobileAdapterMenu_branch_178076: ; 178076 +Music_MobileAdapterMenu_branch_178076: note E_, 1 note __, 1 note A_, 1 @@ -84,16 +81,15 @@ Music_MobileAdapterMenu_branch_178076: ; 178076 note __, 1 note C#, 4 endchannel -; 178084 -Music_MobileAdapterMenu_Ch2: ; 178084 +Music_MobileAdapterMenu_Ch2: stereopanning $f0 notetype $c, $84 dutycycle $2 octave 4 note E_, 1 note G#, 1 -Music_MobileAdapterMenu_branch_17808e: ; 17808e +Music_MobileAdapterMenu_branch_17808e: callchannel Music_MobileAdapterMenu_branch_1780ae note E_, 8 callchannel Music_MobileAdapterMenu_branch_1780d7 @@ -115,9 +111,8 @@ Music_MobileAdapterMenu_branch_17808e: ; 17808e note E_, 1 note G#, 1 loopchannel 0, Music_MobileAdapterMenu_branch_17808e -; 1780ae -Music_MobileAdapterMenu_branch_1780ae: ; 1780ae +Music_MobileAdapterMenu_branch_1780ae: octave 4 note B_, 1 note __, 1 @@ -159,9 +154,8 @@ Music_MobileAdapterMenu_branch_1780ae: ; 1780ae note C#, 3 note D#, 1 endchannel -; 1780d7 -Music_MobileAdapterMenu_branch_1780d7: ; 1780d7 +Music_MobileAdapterMenu_branch_1780d7: note A_, 1 note __, 1 note A_, 1 @@ -173,13 +167,12 @@ Music_MobileAdapterMenu_branch_1780d7: ; 1780d7 note __, 1 note E_, 4 endchannel -; 1780e2 -Music_MobileAdapterMenu_Ch3: ; 1780e2 +Music_MobileAdapterMenu_Ch3: vibrato $8, $34 notetype $c, $25 note __, 2 -Music_MobileAdapterMenu_branch_1780e9: ; 1780e9 +Music_MobileAdapterMenu_branch_1780e9: callchannel Music_MobileAdapterMenu_branch_178119 octave 2 note B_, 1 @@ -217,9 +210,8 @@ Music_MobileAdapterMenu_branch_1780e9: ; 1780e9 callchannel Music_MobileAdapterMenu_branch_178119 note __, 2 loopchannel 0, Music_MobileAdapterMenu_branch_1780e9 -; 178119 -Music_MobileAdapterMenu_branch_178119: ; 178119 +Music_MobileAdapterMenu_branch_178119: octave 3 note E_, 2 note __, 2 @@ -263,9 +255,8 @@ Music_MobileAdapterMenu_branch_178119: ; 178119 note E_, 3 intensity $25 endchannel -; 178146 -Music_MobileAdapterMenu_branch_178146: ; 178146 +Music_MobileAdapterMenu_branch_178146: note A_, 2 note __, 2 octave 3 @@ -279,4 +270,3 @@ Music_MobileAdapterMenu_branch_178146: ; 178146 octave 3 note A_, 4 endchannel -; 178153 diff --git a/audio/music/mobilecenter.asm b/audio/music/mobilecenter.asm index 8a78ea5fa56..0f9d3b9abca 100644 --- a/audio/music/mobilecenter.asm +++ b/audio/music/mobilecenter.asm @@ -1,11 +1,10 @@ -Music_MobileCenter: ; 17961d +Music_MobileCenter: musicheader 4, 1, Music_MobileCenter_Ch1 musicheader 1, 2, Music_MobileCenter_Ch2 musicheader 1, 3, Music_MobileCenter_Ch3 musicheader 1, 4, Music_MobileCenter_Ch4 -; 179629 -Music_MobileCenter_Ch1: ; 179629 +Music_MobileCenter_Ch1: tempo 160 volume $77 dutycycle $1 @@ -20,7 +19,7 @@ Music_MobileCenter_Ch1: ; 179629 note G_, 2 note A_, 2 note B_, 4 -Music_MobileCenter_branch_179642: ; 179642 +Music_MobileCenter_branch_179642: octave 3 note E_, 2 note C_, 2 @@ -156,9 +155,8 @@ Music_MobileCenter_branch_179642: ; 179642 note E_, 2 note F_, 2 loopchannel 0, Music_MobileCenter_branch_179642 -; 1796cc -Music_MobileCenter_Ch2: ; 1796cc +Music_MobileCenter_Ch2: notetype $c, $c2 dutycycle $3 note __, 10 @@ -166,7 +164,7 @@ Music_MobileCenter_Ch2: ; 1796cc note G_, 2 note A_, 2 note B_, 2 -Music_MobileCenter_branch_1796d6: ; 1796d6 +Music_MobileCenter_branch_1796d6: octave 2 note C_, 2 note E_, 2 @@ -325,9 +323,8 @@ Music_MobileCenter_branch_1796d6: ; 1796d6 note E_, 2 note D_, 2 loopchannel 0, Music_MobileCenter_branch_1796d6 -; 179777 -Music_MobileCenter_Ch3: ; 179777 +Music_MobileCenter_Ch3: notetype $c, $24 vibrato $10, $34 octave 4 @@ -339,7 +336,7 @@ Music_MobileCenter_Ch3: ; 179777 note C_, 2 note D_, 4 notetype $c, $25 -Music_MobileCenter_branch_179788: ; 179788 +Music_MobileCenter_branch_179788: note C_, 2 octave 4 note G_, 2 @@ -452,9 +449,8 @@ Music_MobileCenter_branch_179788: ; 179788 note C_, 8 vibrato $10, $34 loopchannel 0, Music_MobileCenter_branch_179788 -; 179807 -Music_MobileCenter_Ch4: ; 179807 +Music_MobileCenter_Ch4: togglenoise $3 stereopanning $f notetype $c @@ -464,7 +460,7 @@ Music_MobileCenter_Ch4: ; 179807 note C#, 1 note C#, 1 note C#, 1 -Music_MobileCenter_branch_179813: ; 179813 +Music_MobileCenter_branch_179813: note A_, 2 note C#, 2 note C#, 2 @@ -485,4 +481,3 @@ Music_MobileCenter_branch_179813: ; 179813 note C#, 1 note C#, 1 loopchannel 0, Music_MobileCenter_branch_179813 -; 17982d diff --git a/audio/music/mom.asm b/audio/music/mom.asm index 7b65709f890..a9bdef9cae6 100644 --- a/audio/music/mom.asm +++ b/audio/music/mom.asm @@ -1,10 +1,9 @@ -Music_Mom: ; f6bf2 +Music_Mom: musicheader 3, 2, Music_Mom_Ch2 musicheader 1, 3, Music_Mom_Ch3 musicheader 1, 4, Music_Mom_Ch4 -; f6bfb -Music_Mom_Ch2: ; f6bfb +Music_Mom_Ch2: tempo 144 volume $77 stereopanning $f @@ -17,7 +16,7 @@ Music_Mom_Ch2: ; f6bfb note G#, 1 note A_, 1 note B_, 8 -Music_Mom_branch_f6c0e: ; f6c0e +Music_Mom_branch_f6c0e: notetype $c, $b1 note __, 4 octave 3 @@ -31,9 +30,8 @@ Music_Mom_branch_f6c0e: ; f6c0e note A#, 2 note B_, 2 loopchannel 0, Music_Mom_branch_f6c0e -; f6c20 -Music_Mom_Ch3: ; f6c20 +Music_Mom_Ch3: stereopanning $f0 notetype $6, $25 octave 3 @@ -44,7 +42,7 @@ Music_Mom_Ch3: ; f6c20 note G#, 1 note E_, 8 intensity $23 -Music_Mom_branch_f6c2e: ; f6c2e +Music_Mom_branch_f6c2e: octave 2 note A_, 2 note __, 6 @@ -77,13 +75,12 @@ Music_Mom_branch_f6c2e: ; f6c2e note D_, 2 note __, 2 loopchannel 0, Music_Mom_branch_f6c2e -; f6c51 -Music_Mom_Ch4: ; f6c51 +Music_Mom_Ch4: togglenoise $3 notetype $c note __, 6 -Music_Mom_branch_f6c56: ; f6c56 +Music_Mom_branch_f6c56: note D#, 1 note __, 1 note F#, 2 @@ -109,4 +106,3 @@ Music_Mom_branch_f6c56: ; f6c56 note D#, 1 note __, 1 loopchannel 0, Music_Mom_branch_f6c56 -; f6c72 diff --git a/audio/music/mtmoon.asm b/audio/music/mtmoon.asm index 5b2db6ede62..474335f4398 100644 --- a/audio/music/mtmoon.asm +++ b/audio/music/mtmoon.asm @@ -1,11 +1,10 @@ -Music_MtMoon: ; edb29 +Music_MtMoon: musicheader 4, 1, Music_MtMoon_Ch1 musicheader 1, 2, Music_MtMoon_Ch2 musicheader 1, 3, Music_MtMoon_Ch3 musicheader 1, 4, Music_MtMoon_Ch4 -; edb35 -Music_MtMoon_Ch1: ; edb35 +Music_MtMoon_Ch1: tempo 208 volume $77 dutycycle $2 @@ -15,14 +14,13 @@ Music_MtMoon_Ch1: ; edb35 notetype $c, $45 note __, 2 loopchannel 0, Music_MtMoon_branch_edb56 -; edb4c -Music_MtMoon_Ch2: ; edb4c +Music_MtMoon_Ch2: vibrato $b, $15 dutycycle $2 notetype $c, $84 stereopanning $f -Music_MtMoon_branch_edb56: ; edb56 +Music_MtMoon_branch_edb56: octave 4 note D#, 6 note C#, 6 @@ -72,12 +70,11 @@ Music_MtMoon_branch_edb56: ; edb56 note F#, 6 note E_, 4 loopchannel 0, Music_MtMoon_branch_edb56 -; edb8a -Music_MtMoon_Ch3: ; edb8a -Music_MtMoon_branch_edb8a: ; edb8a +Music_MtMoon_Ch3: +Music_MtMoon_branch_edb8a: notetype $c, $28 -Music_MtMoon_branch_edb8d: ; edb8d +Music_MtMoon_branch_edb8d: octave 2 note B_, 2 octave 3 @@ -105,7 +102,7 @@ Music_MtMoon_branch_edb8d: ; edb8d note G_, 2 note D#, 2 note E_, 2 -Music_MtMoon_branch_edbab: ; edbab +Music_MtMoon_branch_edbab: note E_, 2 note G#, 2 octave 4 @@ -120,12 +117,11 @@ Music_MtMoon_branch_edbab: ; edbab note G#, 2 loopchannel 4, Music_MtMoon_branch_edbab loopchannel 0, Music_MtMoon_branch_edb8a -; edbbf -Music_MtMoon_Ch4: ; edbbf +Music_MtMoon_Ch4: togglenoise $5 notetype $c -Music_MtMoon_branch_edbc3: ; edbc3 +Music_MtMoon_branch_edbc3: stereopanning $f note A#, 4 note A#, 8 @@ -140,4 +136,3 @@ Music_MtMoon_branch_edbc3: ; edbc3 stereopanning $f0 note A#, 8 loopchannel 0, Music_MtMoon_branch_edbc3 -; edbd8 diff --git a/audio/music/mtmoonsquare.asm b/audio/music/mtmoonsquare.asm index 43984784ee8..57d1b0ddf02 100644 --- a/audio/music/mtmoonsquare.asm +++ b/audio/music/mtmoonsquare.asm @@ -1,17 +1,16 @@ -Music_MtMoonSquare: ; f4815 +Music_MtMoonSquare: musicheader 2, 1, Music_MtMoonSquare_Ch1 musicheader 1, 2, Music_MtMoonSquare_Ch2 -; f481b -Music_MtMoonSquare_Ch1: ; f481b +Music_MtMoonSquare_Ch1: tempo 112 volume $77 dutycycle $2 tone $0001 note __, 1 -Music_MtMoonSquare_branch_f4826: ; f4826 +Music_MtMoonSquare_branch_f4826: notetype $c, $44 -Music_MtMoonSquare_branch_f4829: ; f4829 +Music_MtMoonSquare_branch_f4829: octave 4 note D_, 2 note E_, 2 @@ -21,7 +20,7 @@ Music_MtMoonSquare_branch_f4829: ; f4829 octave 5 note D_, 4 loopchannel 2, Music_MtMoonSquare_branch_f4829 -Music_MtMoonSquare_branch_f4835: ; f4835 +Music_MtMoonSquare_branch_f4835: octave 4 note E_, 2 note F#, 2 @@ -31,7 +30,7 @@ Music_MtMoonSquare_branch_f4835: ; f4835 octave 5 note E_, 4 loopchannel 2, Music_MtMoonSquare_branch_f4835 -Music_MtMoonSquare_branch_f4841: ; f4841 +Music_MtMoonSquare_branch_f4841: octave 4 note C#, 2 note D_, 2 @@ -41,7 +40,7 @@ Music_MtMoonSquare_branch_f4841: ; f4841 octave 5 note C#, 4 loopchannel 2, Music_MtMoonSquare_branch_f4841 -Music_MtMoonSquare_branch_f484d: ; f484d +Music_MtMoonSquare_branch_f484d: octave 4 note D_, 2 note E_, 2 @@ -52,14 +51,13 @@ Music_MtMoonSquare_branch_f484d: ; f484d note D_, 4 loopchannel 2, Music_MtMoonSquare_branch_f484d loopchannel 0, Music_MtMoonSquare_branch_f4826 -; f485d -Music_MtMoonSquare_Ch2: ; f485d +Music_MtMoonSquare_Ch2: dutycycle $2 vibrato $18, $24 -Music_MtMoonSquare_branch_f4862: ; f4862 +Music_MtMoonSquare_branch_f4862: notetype $c, $82 -Music_MtMoonSquare_branch_f4865: ; f4865 +Music_MtMoonSquare_branch_f4865: octave 4 note D_, 2 note E_, 2 @@ -71,7 +69,7 @@ Music_MtMoonSquare_branch_f4865: ; f4865 notetype $c, $62 loopchannel 2, Music_MtMoonSquare_branch_f4865 notetype $c, $82 -Music_MtMoonSquare_branch_f4877: ; f4877 +Music_MtMoonSquare_branch_f4877: octave 4 note E_, 2 note F#, 2 @@ -83,7 +81,7 @@ Music_MtMoonSquare_branch_f4877: ; f4877 notetype $c, $62 loopchannel 2, Music_MtMoonSquare_branch_f4877 notetype $c, $82 -Music_MtMoonSquare_branch_f4889: ; f4889 +Music_MtMoonSquare_branch_f4889: octave 4 note C#, 2 note D_, 2 @@ -95,7 +93,7 @@ Music_MtMoonSquare_branch_f4889: ; f4889 notetype $c, $62 loopchannel 2, Music_MtMoonSquare_branch_f4889 notetype $c, $82 -Music_MtMoonSquare_branch_f489b: ; f489b +Music_MtMoonSquare_branch_f489b: octave 4 note D_, 2 note E_, 2 @@ -107,4 +105,3 @@ Music_MtMoonSquare_branch_f489b: ; f489b notetype $c, $62 loopchannel 2, Music_MtMoonSquare_branch_f489b loopchannel 0, Music_MtMoonSquare_branch_f4862 -; f48ae diff --git a/audio/music/nationalpark.asm b/audio/music/nationalpark.asm index 3f845c56997..109086386c6 100644 --- a/audio/music/nationalpark.asm +++ b/audio/music/nationalpark.asm @@ -1,11 +1,10 @@ -Music_NationalPark: ; f54e8 +Music_NationalPark: musicheader 4, 1, Music_NationalPark_Ch1 musicheader 1, 2, Music_NationalPark_Ch2 musicheader 1, 3, Music_NationalPark_Ch3 musicheader 1, 4, Music_NationalPark_Ch4 -; f54f4 -Music_NationalPark_Ch1: ; f54f4 +Music_NationalPark_Ch1: tempo 192 volume $77 stereopanning $f @@ -13,7 +12,7 @@ Music_NationalPark_Ch1: ; f54f4 dutycycle $1 notetype $c, $77 note __, 2 -Music_NationalPark_branch_f5504: ; f5504 +Music_NationalPark_branch_f5504: callchannel Music_NationalPark_branch_f554a callchannel Music_NationalPark_branch_f554a notetype $6, $67 @@ -62,9 +61,8 @@ Music_NationalPark_branch_f5504: ; f5504 notetype $c, $77 note __, 4 loopchannel 0, Music_NationalPark_branch_f5504 -; f554a -Music_NationalPark_branch_f554a: ; f554a +Music_NationalPark_branch_f554a: octave 2 note G#, 6 octave 3 @@ -270,9 +268,8 @@ Music_NationalPark_branch_f554a: ; f554a octave 3 note A#, 2 endchannel -; f563a -Music_NationalPark_branch_f563a: ; f563a +Music_NationalPark_branch_f563a: note __, 16 note __, 3 octave 4 @@ -297,15 +294,14 @@ Music_NationalPark_branch_f563a: ; f563a note A_, 2 note __, 4 endchannel -; f5652 -Music_NationalPark_Ch2: ; f5652 +Music_NationalPark_Ch2: vibrato $14, $24 dutycycle $1 notetype $c, $a7 note __, 2 stereopanning $f0 -Music_NationalPark_branch_f565d: ; f565d +Music_NationalPark_branch_f565d: notetype $c, $a7 callchannel Music_NationalPark_branch_f56b8 octave 3 @@ -373,9 +369,8 @@ Music_NationalPark_branch_f565d: ; f565d note D#, 2 note D_, 2 loopchannel 0, Music_NationalPark_branch_f565d -; f56b8 -Music_NationalPark_branch_f56b8: ; f56b8 +Music_NationalPark_branch_f56b8: octave 2 note C#, 6 note G#, 2 @@ -437,9 +432,8 @@ Music_NationalPark_branch_f56b8: ; f56b8 octave 2 note F_, 2 endchannel -; f56f5 -Music_NationalPark_branch_f56f5: ; f56f5 +Music_NationalPark_branch_f56f5: octave 4 note E_, 1 note F_, 5 @@ -482,16 +476,15 @@ Music_NationalPark_branch_f56f5: ; f56f5 note D_, 2 note C#, 2 endchannel -; f5723 -Music_NationalPark_Ch3: ; f5723 +Music_NationalPark_Ch3: vibrato $16, $24 notetype $c, $11 octave 4 note G#, 1 note A#, 1 stereopanning $ff -Music_NationalPark_branch_f572e: ; f572e +Music_NationalPark_branch_f572e: callchannel Music_NationalPark_branch_f5756 octave 5 note A#, 14 @@ -519,9 +512,8 @@ Music_NationalPark_branch_f572e: ; f572e note G#, 1 note A#, 1 loopchannel 0, Music_NationalPark_branch_f572e -; f5756 -Music_NationalPark_branch_f5756: ; f5756 +Music_NationalPark_branch_f5756: octave 5 note C_, 16 note C#, 14 @@ -579,9 +571,8 @@ Music_NationalPark_branch_f5756: ; f5756 octave 6 note C_, 2 endchannel -; f578f -Music_NationalPark_branch_f578f: ; f578f +Music_NationalPark_branch_f578f: octave 2 note F#, 3 octave 3 @@ -623,13 +614,12 @@ Music_NationalPark_branch_f578f: ; f578f note F_, 1 note __, 1 endchannel -; f57b8 -Music_NationalPark_Ch4: ; f57b8 +Music_NationalPark_Ch4: togglenoise $3 notetype $c note __, 2 -Music_NationalPark_branch_f57bd: ; f57bd +Music_NationalPark_branch_f57bd: note __, 16 loopchannel 23, Music_NationalPark_branch_f57bd note __, 8 @@ -638,7 +628,7 @@ Music_NationalPark_branch_f57bd: ; f57bd note A#, 1 note D_, 1 note B_, 2 -Music_NationalPark_branch_f57c8: ; f57c8 +Music_NationalPark_branch_f57c8: note A#, 2 note G_, 1 note G_, 1 @@ -665,4 +655,3 @@ Music_NationalPark_branch_f57c8: ; f57c8 note A#, 1 note D#, 1 loopchannel 0, Music_NationalPark_branch_f57bd -; f57e8 diff --git a/audio/music/newbarktown.asm b/audio/music/newbarktown.asm index bf481f7c300..0e3b92d391e 100644 --- a/audio/music/newbarktown.asm +++ b/audio/music/newbarktown.asm @@ -1,19 +1,18 @@ -Music_NewBarkTown: ; eb2d3 +Music_NewBarkTown: musicheader 3, 1, Music_NewBarkTown_Ch1 musicheader 1, 2, Music_NewBarkTown_Ch2 musicheader 1, 3, Music_NewBarkTown_Ch3 -; eb2dc db $3 -Music_NewBarkTown_Ch1: ; eb2dd +Music_NewBarkTown_Ch1: tempo 187 volume $77 stereopanning $f vibrato $12, $23 notetype $c, $87 note __, 4 -Music_NewBarkTown_branch_eb2eb: ; eb2eb +Music_NewBarkTown_branch_eb2eb: dutycycle $0 callchannel Music_NewBarkTown_branch_eb349 octave 3 @@ -85,9 +84,8 @@ Music_NewBarkTown_branch_eb2eb: ; eb2eb note B_, 2 intensity $87 loopchannel 0, Music_NewBarkTown_branch_eb2eb -; eb349 -Music_NewBarkTown_branch_eb349: ; eb349 +Music_NewBarkTown_branch_eb349: octave 3 note F#, 1 note __, 1 @@ -139,9 +137,8 @@ Music_NewBarkTown_branch_eb349: ; eb349 note B_, 1 note __, 1 endchannel -; eb37c -Music_NewBarkTown_branch_eb37c: ; eb37c +Music_NewBarkTown_branch_eb37c: octave 2 note G_, 2 note B_, 2 @@ -159,14 +156,13 @@ Music_NewBarkTown_branch_eb37c: ; eb37c note A_, 4 note E_, 2 endchannel -; eb38d -Music_NewBarkTown_Ch2: ; eb38d +Music_NewBarkTown_Ch2: stereopanning $ff vibrato $12, $23 notetype $6, $a7 note __, 8 -Music_NewBarkTown_branch_eb396: ; eb396 +Music_NewBarkTown_branch_eb396: dutycycle $2 notetype $6, $a7 callchannel Music_NewBarkTown_branch_eb3bf @@ -190,9 +186,8 @@ Music_NewBarkTown_branch_eb396: ; eb396 note D_, 4 note E_, 16 loopchannel 0, Music_NewBarkTown_branch_eb396 -; eb3bf -Music_NewBarkTown_branch_eb3bf: ; eb3bf +Music_NewBarkTown_branch_eb3bf: octave 2 note D_, 4 note __, 8 @@ -244,9 +239,8 @@ Music_NewBarkTown_branch_eb3bf: ; eb3bf octave 2 note C#, 4 endchannel -; eb3f2 -Music_NewBarkTown_branch_eb3f2: ; eb3f2 +Music_NewBarkTown_branch_eb3f2: notetype $6, $97 dutycycle $2 octave 4 @@ -256,15 +250,14 @@ Music_NewBarkTown_branch_eb3f2: ; eb3f2 notetype $c, $97 note E_, 16 endchannel -; eb400 -Music_NewBarkTown_Ch3: ; eb400 +Music_NewBarkTown_Ch3: stereopanning $f0 notetype $c, $10 octave 5 note D_, 2 note E_, 2 -Music_NewBarkTown_branch_eb408: ; eb408 +Music_NewBarkTown_branch_eb408: vibrato $16, $23 note F#, 4 note A_, 4 @@ -329,4 +322,3 @@ Music_NewBarkTown_branch_eb408: ; eb408 note D_, 1 note E_, 1 loopchannel 0, Music_NewBarkTown_branch_eb408 -; eb453 diff --git a/audio/music/nothing.asm b/audio/music/nothing.asm index 7240c5361df..59641387681 100644 --- a/audio/music/nothing.asm +++ b/audio/music/nothing.asm @@ -1,13 +1,11 @@ -Music_Nothing: ; e91a3 +Music_Nothing: musicheader 4, 1, Music_Nothing_Ch1 musicheader 1, 2, Music_Nothing_Ch2 musicheader 1, 3, Music_Nothing_Ch3 musicheader 1, 4, Music_Nothing_Ch4 -; e91af -Music_Nothing_Ch1: ; e91af -Music_Nothing_Ch2: ; e91af -Music_Nothing_Ch3: ; e91af -Music_Nothing_Ch4: ; e91af +Music_Nothing_Ch1: +Music_Nothing_Ch2: +Music_Nothing_Ch3: +Music_Nothing_Ch4: endchannel -; e91b0 diff --git a/audio/music/pallettown.asm b/audio/music/pallettown.asm index a64fd6b09ef..68585e47326 100644 --- a/audio/music/pallettown.asm +++ b/audio/music/pallettown.asm @@ -1,16 +1,15 @@ -Music_PalletTown: ; f4b0c +Music_PalletTown: musicheader 3, 1, Music_PalletTown_Ch1 musicheader 1, 2, Music_PalletTown_Ch2 musicheader 1, 3, Music_PalletTown_Ch3 -; f4b15 -Music_PalletTown_Ch1: ; f4b15 +Music_PalletTown_Ch1: tempo 188 volume $77 vibrato $12, $24 tone $0001 stereopanning $f -Music_PalletTown_branch_f4b22: ; f4b22 +Music_PalletTown_branch_f4b22: dutycycle $2 notetype $c, $78 octave 3 @@ -60,7 +59,7 @@ Music_PalletTown_branch_f4b22: ; f4b22 note B_, 8 intensity $77 note B_, 8 -Music_PalletTown_branch_f4b59: ; f4b59 +Music_PalletTown_branch_f4b59: dutycycle $3 intensity $92 note G_, 2 @@ -118,13 +117,12 @@ Music_PalletTown_branch_f4b59: ; f4b59 intensity $1f note F#, 8 loopchannel 0, Music_PalletTown_branch_f4b22 -; f4ba1 -Music_PalletTown_Ch2: ; f4ba1 +Music_PalletTown_Ch2: vibrato $12, $44 dutycycle $2 stereopanning $f0 -Music_PalletTown_branch_f4ba8: ; f4ba8 +Music_PalletTown_branch_f4ba8: notetype $c, $88 octave 1 note G_, 2 @@ -184,7 +182,7 @@ Music_PalletTown_branch_f4ba8: ; f4ba8 octave 3 note C_, 2 note D_, 2 -Music_PalletTown_branch_f4be5: ; f4be5 +Music_PalletTown_branch_f4be5: intensity $a2 octave 3 note E_, 2 @@ -244,11 +242,10 @@ Music_PalletTown_branch_f4be5: ; f4be5 note B_, 2 note A_, 2 loopchannel 0, Music_PalletTown_branch_f4ba8 -; f4c2a -Music_PalletTown_Ch3: ; f4c2a +Music_PalletTown_Ch3: vibrato $14, $24 -Music_PalletTown_branch_f4c2d: ; f4c2d +Music_PalletTown_branch_f4c2d: notetype $c, $10 octave 6 note D_, 2 @@ -358,4 +355,3 @@ Music_PalletTown_branch_f4c2d: ; f4c2d note B_, 8 note A_, 8 loopchannel 0, Music_PalletTown_branch_f4c2d -; f4c9f diff --git a/audio/music/pokeflutechannel.asm b/audio/music/pokeflutechannel.asm index 3239d782a19..e324c55957a 100644 --- a/audio/music/pokeflutechannel.asm +++ b/audio/music/pokeflutechannel.asm @@ -1,10 +1,9 @@ -Music_PokeFluteChannel: ; f7b13 +Music_PokeFluteChannel: musicheader 3, 1, Music_PokeFluteChannel_Ch1 musicheader 1, 2, Music_PokeFluteChannel_Ch2 musicheader 1, 3, Music_PokeFluteChannel_Ch3 -; f7b1c -Music_PokeFluteChannel_Ch1: ; f7b1c +Music_PokeFluteChannel_Ch1: tempo 240 volume $77 stereopanning $f0 @@ -30,7 +29,7 @@ Music_PokeFluteChannel_Ch1: ; f7b1c octave 2 note G_, 4 note A_, 8 -Music_PokeFluteChannel_branch_f7b40: ; f7b40 +Music_PokeFluteChannel_branch_f7b40: octave 3 note E_, 2 note G_, 2 @@ -68,9 +67,8 @@ Music_PokeFluteChannel_branch_f7b40: ; f7b40 note G_, 4 note A_, 8 loopchannel 0, Music_PokeFluteChannel_branch_f7b40 -; f7b68 -Music_PokeFluteChannel_Ch2: ; f7b68 +Music_PokeFluteChannel_Ch2: stereopanning $f dutycycle $3 tone $0001 @@ -107,7 +105,7 @@ Music_PokeFluteChannel_Ch2: ; f7b68 octave 2 note E_, 2 note G_, 2 -Music_PokeFluteChannel_branch_f7b94: ; f7b94 +Music_PokeFluteChannel_branch_f7b94: octave 3 note C_, 2 note E_, 2 @@ -170,14 +168,13 @@ Music_PokeFluteChannel_branch_f7b94: ; f7b94 note E_, 2 note G_, 2 loopchannel 0, Music_PokeFluteChannel_branch_f7b94 -; f7bd5 -Music_PokeFluteChannel_Ch3: ; f7bd5 +Music_PokeFluteChannel_Ch3: vibrato $10, $14 notetype $c, $10 callchannel Music_PokeFluteChannel_branch_f7c05 callchannel Music_PokeFluteChannel_branch_f7c05 -Music_PokeFluteChannel_branch_f7be1: ; f7be1 +Music_PokeFluteChannel_branch_f7be1: note __, 4 octave 4 note C_, 2 @@ -209,9 +206,8 @@ Music_PokeFluteChannel_branch_f7be1: ; f7be1 note __, 4 callchannel Music_PokeFluteChannel_branch_f7c05 loopchannel 0, Music_PokeFluteChannel_branch_f7be1 -; f7c05 -Music_PokeFluteChannel_branch_f7c05: ; f7c05 +Music_PokeFluteChannel_branch_f7c05: octave 5 note E_, 2 note F_, 2 @@ -229,4 +225,3 @@ Music_PokeFluteChannel_branch_f7c05: ; f7c05 note F_, 2 note G_, 4 endchannel -; f7c16 diff --git a/audio/music/pokemoncenter.asm b/audio/music/pokemoncenter.asm index 32e1a59f43f..01865045bde 100644 --- a/audio/music/pokemoncenter.asm +++ b/audio/music/pokemoncenter.asm @@ -1,17 +1,16 @@ -Music_PokemonCenter: ; ed5c6 +Music_PokemonCenter: musicheader 4, 1, Music_PokemonCenter_Ch1 musicheader 1, 2, Music_PokemonCenter_Ch2 musicheader 1, 3, Music_PokemonCenter_Ch3 musicheader 1, 4, Music_PokemonCenter_Ch4 -; ed5d2 -Music_PokemonCenter_Ch1: ; ed5d2 +Music_PokemonCenter_Ch1: tempo 152 volume $77 dutycycle $2 vibrato $a, $14 tone $0001 -Music_PokemonCenter_branch_ed5df: ; ed5df +Music_PokemonCenter_branch_ed5df: stereopanning $f notetype $c, $83 octave 3 @@ -149,11 +148,10 @@ Music_PokemonCenter_branch_ed5df: ; ed5df note F#, 2 note G_, 2 loopchannel 0, Music_PokemonCenter_branch_ed5df -; ed671 -Music_PokemonCenter_Ch2: ; ed671 +Music_PokemonCenter_Ch2: vibrato $10, $25 -Music_PokemonCenter_branch_ed674: ; ed674 +Music_PokemonCenter_branch_ed674: stereopanning $ff callchannel Music_PokemonCenter_branch_ed6d1 stereopanning $f @@ -218,9 +216,8 @@ Music_PokemonCenter_branch_ed674: ; ed674 note E_, 2 note D_, 8 loopchannel 0, Music_PokemonCenter_branch_ed674 -; ed6d1 -Music_PokemonCenter_branch_ed6d1: ; ed6d1 +Music_PokemonCenter_branch_ed6d1: dutycycle $2 notetype $c, $c2 octave 4 @@ -236,9 +233,8 @@ Music_PokemonCenter_branch_ed6d1: ; ed6d1 note E_, 2 note C#, 6 endchannel -; ed6e4 -Music_PokemonCenter_branch_ed6e4: ; ed6e4 +Music_PokemonCenter_branch_ed6e4: notetype $c, $c2 octave 4 note C#, 2 @@ -251,11 +247,10 @@ Music_PokemonCenter_branch_ed6e4: ; ed6e4 note E_, 4 note C#, 2 endchannel -; ed6f3 -Music_PokemonCenter_Ch3: ; ed6f3 +Music_PokemonCenter_Ch3: notetype $c, $28 -Music_PokemonCenter_branch_ed6f6: ; ed6f6 +Music_PokemonCenter_branch_ed6f6: stereopanning $f0 octave 3 note D_, 1 @@ -360,9 +355,8 @@ Music_PokemonCenter_branch_ed6f6: ; ed6f6 note E_, 1 note __, 1 loopchannel 0, Music_PokemonCenter_branch_ed6f6 -; ed76f -Music_PokemonCenter_branch_ed76f: ; ed76f +Music_PokemonCenter_branch_ed76f: note E_, 1 note __, 5 note A_, 1 @@ -372,9 +366,8 @@ Music_PokemonCenter_branch_ed76f: ; ed76f note A_, 1 note __, 1 endchannel -; ed778 -Music_PokemonCenter_branch_ed778: ; ed778 +Music_PokemonCenter_branch_ed778: note E_, 1 note __, 5 note A_, 1 @@ -386,9 +379,8 @@ Music_PokemonCenter_branch_ed778: ; ed778 note A_, 1 note __, 1 endchannel -; ed783 -Music_PokemonCenter_branch_ed783: ; ed783 +Music_PokemonCenter_branch_ed783: note F#, 1 note __, 5 note A_, 1 @@ -398,17 +390,15 @@ Music_PokemonCenter_branch_ed783: ; ed783 note A_, 1 note __, 1 endchannel -; ed78c -Music_PokemonCenter_Ch4: ; ed78c +Music_PokemonCenter_Ch4: togglenoise $3 notetype $c stereopanning $ff -Music_PokemonCenter_branch_ed792: ; ed792 +Music_PokemonCenter_branch_ed792: note G_, 6 note G_, 4 note G_, 2 note G_, 2 note G_, 2 loopchannel 0, Music_PokemonCenter_branch_ed792 -; ed79b diff --git a/audio/music/pokemonchannel.asm b/audio/music/pokemonchannel.asm index b06cc069442..34d64262921 100644 --- a/audio/music/pokemonchannel.asm +++ b/audio/music/pokemonchannel.asm @@ -1,11 +1,10 @@ -Music_PokemonChannel: ; ee45f +Music_PokemonChannel: musicheader 4, 1, Music_PokemonChannel_Ch1 musicheader 1, 2, Music_PokemonChannel_Ch2 musicheader 1, 3, Music_PokemonChannel_Ch3 musicheader 1, 4, Music_PokemonChannel_Ch4 -; ee46b -Music_PokemonChannel_Ch1: ; ee46b +Music_PokemonChannel_Ch1: tempo 128 volume $77 vibrato $8, $38 @@ -74,9 +73,8 @@ Music_PokemonChannel_Ch1: ; ee46b note D_, 2 note __, 6 endchannel -; ee4be -Music_PokemonChannel_Ch2: ; ee4be +Music_PokemonChannel_Ch2: dutycycle $1 vibrato $8, $38 stereopanning $ff @@ -145,9 +143,8 @@ Music_PokemonChannel_Ch2: ; ee4be note G_, 2 note __, 6 endchannel -; ee50e -Music_PokemonChannel_Ch3: ; ee50e +Music_PokemonChannel_Ch3: vibrato $8, $38 notetype $c, $25 stereopanning $f0 @@ -202,12 +199,11 @@ Music_PokemonChannel_Ch3: ; ee50e note G_, 1 note __, 3 endchannel -; ee549 -Music_PokemonChannel_Ch4: ; ee549 +Music_PokemonChannel_Ch4: togglenoise $3 notetype $c -Music_PokemonChannel_branch_ee54d: ; ee54d +Music_PokemonChannel_branch_ee54d: note A#, 3 note A#, 1 note D_, 2 @@ -233,4 +229,3 @@ Music_PokemonChannel_branch_ee54d: ; ee54d note A#, 4 note A#, 4 endchannel -; ee569 diff --git a/audio/music/pokemonlullaby.asm b/audio/music/pokemonlullaby.asm index 5db53d732b5..86116a9a981 100644 --- a/audio/music/pokemonlullaby.asm +++ b/audio/music/pokemonlullaby.asm @@ -1,15 +1,14 @@ -Music_PokemonLullaby: ; f6d79 +Music_PokemonLullaby: musicheader 3, 1, Music_PokemonLullaby_Ch1 musicheader 1, 2, Music_PokemonLullaby_Ch2 musicheader 1, 3, Music_PokemonLullaby_Ch3 -; f6d82 -Music_PokemonLullaby_Ch1: ; f6d82 +Music_PokemonLullaby_Ch1: tempo 224 volume $77 dutycycle $3 tone $0001 -Music_PokemonLullaby_branch_f6d8c: ; f6d8c +Music_PokemonLullaby_branch_f6d8c: notetype $c, $a7 octave 3 note G_, 16 @@ -53,13 +52,12 @@ Music_PokemonLullaby_branch_f6d8c: ; f6d8c octave 3 note B_, 8 loopchannel 0, Music_PokemonLullaby_branch_f6d8c -; f6dc4 -Music_PokemonLullaby_Ch2: ; f6dc4 +Music_PokemonLullaby_Ch2: vibrato $10, $14 dutycycle $0 notetype $c, $b4 -Music_PokemonLullaby_branch_f6dcc: ; f6dcc +Music_PokemonLullaby_branch_f6dcc: note __, 16 note __, 10 octave 4 @@ -104,11 +102,10 @@ Music_PokemonLullaby_branch_f6dcc: ; f6dcc note E_, 16 note __, 14 loopchannel 0, Music_PokemonLullaby_branch_f6dcc -; f6e03 -Music_PokemonLullaby_Ch3: ; f6e03 +Music_PokemonLullaby_Ch3: notetype $c, $11 -Music_PokemonLullaby_branch_f6e06: ; f6e06 +Music_PokemonLullaby_branch_f6e06: stereopanning $f0 octave 4 note C_, 2 @@ -133,4 +130,3 @@ Music_PokemonLullaby_branch_f6e06: ; f6e06 note B_, 2 note A_, 2 loopchannel 0, Music_PokemonLullaby_branch_f6e06 -; f6e23 diff --git a/audio/music/pokemonmarch.asm b/audio/music/pokemonmarch.asm index 0c776a49927..346e042b175 100644 --- a/audio/music/pokemonmarch.asm +++ b/audio/music/pokemonmarch.asm @@ -1,11 +1,10 @@ -Music_PokemonMarch: ; f6e23 +Music_PokemonMarch: musicheader 4, 1, Music_PokemonMarch_Ch1 musicheader 1, 2, Music_PokemonMarch_Ch2 musicheader 1, 3, Music_PokemonMarch_Ch3 musicheader 1, 4, Music_PokemonMarch_Ch4 -; f6e2f -Music_PokemonMarch_Ch1: ; f6e2f +Music_PokemonMarch_Ch1: tempo 144 volume $77 stereopanning $f0 @@ -21,7 +20,7 @@ Music_PokemonMarch_Ch1: ; f6e2f intensity $a2 note D_, 4 notetype $8, $a2 -Music_PokemonMarch_branch_f6e4c: ; f6e4c +Music_PokemonMarch_branch_f6e4c: callchannel Music_PokemonMarch_branch_f6eae note D#, 2 note C_, 2 @@ -97,9 +96,8 @@ Music_PokemonMarch_branch_f6e4c: ; f6e4c note G_, 4 note A#, 2 loopchannel 0, Music_PokemonMarch_branch_f6e4c -; f6eae -Music_PokemonMarch_branch_f6eae: ; f6eae +Music_PokemonMarch_branch_f6eae: note __, 4 octave 3 note D#, 1 @@ -110,9 +108,8 @@ Music_PokemonMarch_branch_f6eae: ; f6eae note D#, 2 note __, 2 endchannel -; f6eb8 -Music_PokemonMarch_branch_f6eb8: ; f6eb8 +Music_PokemonMarch_branch_f6eb8: note __, 4 note F_, 1 note E_, 1 @@ -122,9 +119,8 @@ Music_PokemonMarch_branch_f6eb8: ; f6eb8 note F_, 2 note __, 2 endchannel -; f6ec1 -Music_PokemonMarch_Ch2: ; f6ec1 +Music_PokemonMarch_Ch2: dutycycle $2 vibrato $10, $22 notetype $c, $b2 @@ -133,7 +129,7 @@ Music_PokemonMarch_Ch2: ; f6ec1 note G_, 4 note G_, 4 note G_, 4 -Music_PokemonMarch_branch_f6ece: ; f6ece +Music_PokemonMarch_branch_f6ece: notetype $c, $b7 octave 3 note G#, 12 @@ -234,14 +230,13 @@ Music_PokemonMarch_branch_f6ece: ; f6ece note G_, 1 note __, 5 loopchannel 0, Music_PokemonMarch_branch_f6ece -; f6f4d -Music_PokemonMarch_Ch3: ; f6f4d +Music_PokemonMarch_Ch3: stereopanning $f notetype $c, $16 note __, 16 notetype $8, $16 -Music_PokemonMarch_branch_f6f56: ; f6f56 +Music_PokemonMarch_branch_f6f56: callchannel Music_PokemonMarch_branch_f6fe8 note __, 2 octave 4 @@ -273,7 +268,7 @@ Music_PokemonMarch_branch_f6f56: ; f6f56 note D#, 2 note G_, 2 note G#, 2 -Music_PokemonMarch_branch_f6f7b: ; f6f7b +Music_PokemonMarch_branch_f6f7b: octave 3 note A#, 2 note __, 2 @@ -377,9 +372,8 @@ Music_PokemonMarch_branch_f6f7b: ; f6f7b note __, 2 note G#, 2 loopchannel 0, Music_PokemonMarch_branch_f6f56 -; f6fe8 -Music_PokemonMarch_branch_f6fe8: ; f6fe8 +Music_PokemonMarch_branch_f6fe8: octave 3 note G#, 2 note __, 2 @@ -398,14 +392,13 @@ Music_PokemonMarch_branch_f6fe8: ; f6fe8 octave 3 note G_, 2 endchannel -; f6ffa -Music_PokemonMarch_Ch4: ; f6ffa +Music_PokemonMarch_Ch4: stereopanning $f0 togglenoise $5 notetype $8 callchannel Music_PokemonMarch_branch_f704c -Music_PokemonMarch_branch_f7003: ; f7003 +Music_PokemonMarch_branch_f7003: callchannel Music_PokemonMarch_branch_f7042 note C_, 4 note C_, 2 @@ -441,9 +434,8 @@ Music_PokemonMarch_branch_f7003: ; f7003 notetype $8 callchannel Music_PokemonMarch_branch_f704c loopchannel 0, Music_PokemonMarch_branch_f7003 -; f7042 -Music_PokemonMarch_branch_f7042: ; f7042 +Music_PokemonMarch_branch_f7042: note C_, 4 note C_, 2 note C_, 4 @@ -454,9 +446,8 @@ Music_PokemonMarch_branch_f7042: ; f7042 note C#, 2 note C#, 2 endchannel -; f704c -Music_PokemonMarch_branch_f704c: ; f704c +Music_PokemonMarch_branch_f704c: note C_, 4 note C_, 2 note C_, 4 @@ -466,4 +457,3 @@ Music_PokemonMarch_branch_f704c: ; f704c note D_, 2 note C#, 2 endchannel -; f7055 diff --git a/audio/music/postcredits.asm b/audio/music/postcredits.asm index d998d621224..0997828f880 100644 --- a/audio/music/postcredits.asm +++ b/audio/music/postcredits.asm @@ -1,18 +1,17 @@ -Music_PostCredits: ; cfd9e +Music_PostCredits: musicheader 2, 1, Music_PostCredits_Ch1 musicheader 1, 2, Music_PostCredits_Ch2 -; cfda4 db $2 -Music_PostCredits_Ch1: ; cfda5 +Music_PostCredits_Ch1: tempo 271 volume $77 pitchoffset 0, D# dutycycle $2 notetype $c, $93 note __, 8 -Music_PostCredits_branch_cfdb2: ; cfdb2 +Music_PostCredits_branch_cfdb2: octave 3 note C_, 2 note E_, 2 @@ -130,9 +129,8 @@ Music_PostCredits_branch_cfdb2: ; cfdb2 octave 2 note G_, 2 loopchannel 0, Music_PostCredits_branch_cfdb2 -; cfe48 -Music_PostCredits_Ch2: ; cfe48 +Music_PostCredits_Ch2: pitchoffset 0, D# dutycycle $2 notetype $c, $a3 @@ -144,7 +142,7 @@ Music_PostCredits_Ch2: ; cfe48 note F_, 2 intensity $73 note F_, 2 -Music_PostCredits_branch_cfe5a: ; cfe5a +Music_PostCredits_branch_cfe5a: intensity $a3 note G_, 2 intensity $73 @@ -264,4 +262,3 @@ Music_PostCredits_branch_cfe5a: ; cfe5a note E_, 2 note F_, 2 loopchannel 0, Music_PostCredits_branch_cfe5a -; cff04 diff --git a/audio/music/printer.asm b/audio/music/printer.asm index ffda482a0d8..886f6b76604 100644 --- a/audio/music/printer.asm +++ b/audio/music/printer.asm @@ -1,8 +1,7 @@ -Music_Printer: ; f07fd +Music_Printer: musicheader 1, 3, Music_Printer_Ch3 -; f0800 -Music_Printer_Ch3: ; f0800 +Music_Printer_Ch3: tempo 256 notetype $c, $20 octave 4 @@ -34,7 +33,7 @@ Music_Printer_Ch3: ; f0800 note __, 1 note F#, 1 note __, 1 -Music_Printer_branch_f0823: ; f0823 +Music_Printer_branch_f0823: note E_, 1 note __, 1 note B_, 1 @@ -318,4 +317,3 @@ Music_Printer_branch_f0823: ; f0823 note D#, 1 note __, 1 loopchannel 0, Music_Printer_branch_f0823 -; f0941 diff --git a/audio/music/profoak.asm b/audio/music/profoak.asm index c2459235007..5e34e2c65ee 100644 --- a/audio/music/profoak.asm +++ b/audio/music/profoak.asm @@ -1,10 +1,9 @@ -Music_ProfOak: ; f4dea +Music_ProfOak: musicheader 3, 1, Music_ProfOak_Ch1 musicheader 1, 2, Music_ProfOak_Ch2 musicheader 1, 3, Music_ProfOak_Ch3 -; f4df3 -Music_ProfOak_Ch1: ; f4df3 +Music_ProfOak_Ch1: tempo 118 volume $77 vibrato $12, $34 @@ -22,14 +21,14 @@ Music_ProfOak_Ch1: ; f4df3 note G#, 8 intensity $97 note G#, 8 -Music_ProfOak_branch_f4e10: ; f4e10 +Music_ProfOak_branch_f4e10: intensity $91 callchannel Music_ProfOak_branch_f4e42 callchannel Music_ProfOak_branch_f4e42 callchannel Music_ProfOak_branch_f4e4d callchannel Music_ProfOak_branch_f4e4d loopchannel 2, Music_ProfOak_branch_f4e10 -Music_ProfOak_branch_f4e22: ; f4e22 +Music_ProfOak_branch_f4e22: callchannel Music_ProfOak_branch_f4e58 callchannel Music_ProfOak_branch_f4e58 callchannel Music_ProfOak_branch_f4e6c @@ -41,9 +40,8 @@ Music_ProfOak_branch_f4e22: ; f4e22 callchannel Music_ProfOak_branch_f4e6c callchannel Music_ProfOak_branch_f4e6c loopchannel 0, Music_ProfOak_branch_f4e22 -; f4e42 -Music_ProfOak_branch_f4e42: ; f4e42 +Music_ProfOak_branch_f4e42: octave 2 note B_, 2 octave 3 @@ -55,9 +53,8 @@ Music_ProfOak_branch_f4e42: ; f4e42 note G#, 2 note E_, 2 endchannel -; f4e4d -Music_ProfOak_branch_f4e4d: ; f4e4d +Music_ProfOak_branch_f4e4d: octave 2 note B_, 2 octave 3 @@ -69,9 +66,8 @@ Music_ProfOak_branch_f4e4d: ; f4e4d note F#, 2 note D#, 2 endchannel -; f4e58 -Music_ProfOak_branch_f4e58: ; f4e58 +Music_ProfOak_branch_f4e58: octave 2 note A_, 2 octave 3 @@ -88,9 +84,8 @@ Music_ProfOak_branch_f4e58: ; f4e58 note E_, 2 intensity $91 endchannel -; f4e6c -Music_ProfOak_branch_f4e6c: ; f4e6c +Music_ProfOak_branch_f4e6c: octave 2 note B_, 1 octave 3 @@ -105,9 +100,8 @@ Music_ProfOak_branch_f4e6c: ; f4e6c note B_, 4 intensity $91 endchannel -; f4e7e -Music_ProfOak_Ch2: ; f4e7e +Music_ProfOak_Ch2: vibrato $12, $34 dutycycle $3 notetype $c, $a8 @@ -121,7 +115,7 @@ Music_ProfOak_Ch2: ; f4e7e intensity $a7 note B_, 10 dutycycle $2 -Music_ProfOak_branch_f4e92: ; f4e92 +Music_ProfOak_branch_f4e92: intensity $b2 octave 3 note B_, 2 @@ -159,7 +153,7 @@ Music_ProfOak_branch_f4e92: ; f4e92 loopchannel 2, Music_ProfOak_branch_f4e92 note __, 6 intensity $b4 -Music_ProfOak_branch_f4ebf: ; f4ebf +Music_ProfOak_branch_f4ebf: note C#, 6 octave 3 note A_, 1 @@ -208,9 +202,8 @@ Music_ProfOak_branch_f4ebf: ; f4ebf note E_, 1 note G#, 16 loopchannel 0, Music_ProfOak_branch_f4ebf -; f4ef5 -Music_ProfOak_Ch3: ; f4ef5 +Music_ProfOak_Ch3: stereopanning $f notetype $c, $14 note __, 4 @@ -230,13 +223,13 @@ Music_ProfOak_Ch3: ; f4ef5 note __, 1 note E_, 2 callchannel Music_ProfOak_branch_f4f3d -Music_ProfOak_branch_f4f0d: ; f4f0d +Music_ProfOak_branch_f4f0d: callchannel Music_ProfOak_branch_f4f3d callchannel Music_ProfOak_branch_f4f3d callchannel Music_ProfOak_branch_f4f4c callchannel Music_ProfOak_branch_f4f4c loopchannel 2, Music_ProfOak_branch_f4f0d -Music_ProfOak_branch_f4f1d: ; f4f1d +Music_ProfOak_branch_f4f1d: callchannel Music_ProfOak_branch_f4f5a callchannel Music_ProfOak_branch_f4f5a callchannel Music_ProfOak_branch_f4f69 @@ -248,9 +241,8 @@ Music_ProfOak_branch_f4f1d: ; f4f1d callchannel Music_ProfOak_branch_f4f69 callchannel Music_ProfOak_branch_f4f69 loopchannel 0, Music_ProfOak_branch_f4f1d -; f4f3d -Music_ProfOak_branch_f4f3d: ; f4f3d +Music_ProfOak_branch_f4f3d: note E_, 2 note __, 2 octave 4 @@ -266,9 +258,8 @@ Music_ProfOak_branch_f4f3d: ; f4f3d note __, 1 note E_, 2 endchannel -; f4f4c -Music_ProfOak_branch_f4f4c: ; f4f4c +Music_ProfOak_branch_f4f4c: octave 2 note B_, 2 note __, 2 @@ -283,9 +274,8 @@ Music_ProfOak_branch_f4f4c: ; f4f4c note __, 1 note D#, 2 endchannel -; f4f5a -Music_ProfOak_branch_f4f5a: ; f4f5a +Music_ProfOak_branch_f4f5a: octave 2 note A_, 2 note __, 2 @@ -301,9 +291,8 @@ Music_ProfOak_branch_f4f5a: ; f4f5a note __, 1 note C#, 2 endchannel -; f4f69 -Music_ProfOak_branch_f4f69: ; f4f69 +Music_ProfOak_branch_f4f69: octave 2 note G#, 2 note __, 2 @@ -320,4 +309,3 @@ Music_ProfOak_branch_f4f69: ; f4f69 octave 2 note B_, 2 endchannel -; f4f79 diff --git a/audio/music/profoakspokemontalk.asm b/audio/music/profoakspokemontalk.asm index 8907e761403..bd2994660cb 100644 --- a/audio/music/profoakspokemontalk.asm +++ b/audio/music/profoakspokemontalk.asm @@ -1,12 +1,11 @@ -Music_ProfOaksPokemonTalk: ; f4c9f +Music_ProfOaksPokemonTalk: musicheader 3, 1, Music_ProfOaksPokemonTalk_Ch1 musicheader 1, 2, Music_ProfOaksPokemonTalk_Ch2 musicheader 1, 3, Music_ProfOaksPokemonTalk_Ch3 -; f4ca8 db $3 -Music_ProfOaksPokemonTalk_Ch1: ; f4ca9 +Music_ProfOaksPokemonTalk_Ch1: tempo 164 volume $77 stereopanning $f @@ -24,7 +23,7 @@ Music_ProfOaksPokemonTalk_Ch1: ; f4ca9 note D#, 1 note E_, 1 note F#, 1 -Music_ProfOaksPokemonTalk_branch_f4cc3: ; f4cc3 +Music_ProfOaksPokemonTalk_branch_f4cc3: note D#, 6 note C#, 1 octave 3 @@ -132,9 +131,8 @@ Music_ProfOaksPokemonTalk_branch_f4cc3: ; f4cc3 note F#, 1 note __, 1 loopchannel 0, Music_ProfOaksPokemonTalk_branch_f4cc3 -; f4d31 -Music_ProfOaksPokemonTalk_Ch2: ; f4d31 +Music_ProfOaksPokemonTalk_Ch2: vibrato $8, $24 dutycycle $3 notetype $c, $a7 @@ -157,7 +155,7 @@ Music_ProfOaksPokemonTalk_Ch2: ; f4d31 note F#, 1 note G#, 1 note A#, 1 -Music_ProfOaksPokemonTalk_branch_f4d4d: ; f4d4d +Music_ProfOaksPokemonTalk_branch_f4d4d: note B_, 6 note A#, 1 note G#, 1 @@ -208,9 +206,8 @@ Music_ProfOaksPokemonTalk_branch_f4d4d: ; f4d4d note A#, 1 note __, 1 loopchannel 0, Music_ProfOaksPokemonTalk_branch_f4d4d -; f4d82 -Music_ProfOaksPokemonTalk_Ch3: ; f4d82 +Music_ProfOaksPokemonTalk_Ch3: vibrato $6, $38 notetype $c, $25 stereopanning $f0 @@ -225,7 +222,7 @@ Music_ProfOaksPokemonTalk_Ch3: ; f4d82 note C#, 1 octave 2 note A#, 1 -Music_ProfOaksPokemonTalk_branch_f4d95: ; f4d95 +Music_ProfOaksPokemonTalk_branch_f4d95: note B_, 6 octave 3 note D#, 1 @@ -308,4 +305,3 @@ Music_ProfOaksPokemonTalk_branch_f4d95: ; f4d95 note A#, 1 note __, 1 loopchannel 0, Music_ProfOaksPokemonTalk_branch_f4d95 -; f4dea diff --git a/audio/music/rivalbattle.asm b/audio/music/rivalbattle.asm index 8dc4616a647..4ba8840baa3 100644 --- a/audio/music/rivalbattle.asm +++ b/audio/music/rivalbattle.asm @@ -1,10 +1,9 @@ -Music_RivalBattle: ; e974f +Music_RivalBattle: musicheader 3, 1, Music_RivalBattle_Ch1 musicheader 1, 2, Music_RivalBattle_Ch2 musicheader 1, 3, Music_RivalBattle_Ch3 -; e9758 -Music_RivalBattle_Ch1: ; e9758 +Music_RivalBattle_Ch1: tempo 102 volume $77 dutycycle $3 @@ -23,7 +22,7 @@ Music_RivalBattle_Ch1: ; e9758 intensity $b7 note C#, 6 note E_, 4 -Music_RivalBattle_branch_e9777: ; e9777 +Music_RivalBattle_branch_e9777: intensity $b2 octave 2 note A#, 6 @@ -40,7 +39,7 @@ Music_RivalBattle_branch_e9777: ; e9777 note C#, 4 intensity $b7 note C#, 10 -Music_RivalBattle_branch_e978f: ; e978f +Music_RivalBattle_branch_e978f: intensity $b2 octave 3 note G#, 6 @@ -56,7 +55,7 @@ Music_RivalBattle_branch_e978f: ; e978f note B_, 4 intensity $4d note B_, 10 -Music_RivalBattle_branch_e97a6: ; e97a6 +Music_RivalBattle_branch_e97a6: intensity $b7 note A#, 6 note F#, 6 @@ -179,7 +178,7 @@ Music_RivalBattle_branch_e97a6: ; e97a6 note E_, 2 note D#, 2 note C#, 2 -Music_RivalBattle_branch_e9837: ; e9837 +Music_RivalBattle_branch_e9837: octave 3 note A#, 2 note E_, 2 @@ -285,9 +284,8 @@ Music_RivalBattle_branch_e9837: ; e9837 octave 3 note C#, 10 loopchannel 0, Music_RivalBattle_branch_e97a6 -; e98af -Music_RivalBattle_Ch2: ; e98af +Music_RivalBattle_Ch2: dutycycle $3 vibrato $8, $36 tone $0001 @@ -337,7 +335,7 @@ Music_RivalBattle_Ch2: ; e98af note F#, 6 intensity $c2 note G#, 4 -Music_RivalBattle_branch_e98ea: ; e98ea +Music_RivalBattle_branch_e98ea: intensity $c2 note D#, 6 intensity $c7 @@ -354,7 +352,7 @@ Music_RivalBattle_branch_e98ea: ; e98ea note B_, 1 octave 4 note C_, 1 -Music_RivalBattle_branch_e9903: ; e9903 +Music_RivalBattle_branch_e9903: intensity $c2 note C#, 6 intensity $c7 @@ -369,7 +367,7 @@ Music_RivalBattle_branch_e9903: ; e9903 note E_, 4 intensity $b7 note E_, 6 -Music_RivalBattle_branch_e991a: ; e991a +Music_RivalBattle_branch_e991a: callchannel Music_RivalBattle_branch_e99e0 intensity $b0 note G#, 8 @@ -474,7 +472,7 @@ Music_RivalBattle_branch_e991a: ; e991a note G#, 8 intensity $c7 note F_, 8 -Music_RivalBattle_branch_e99a6: ; e99a6 +Music_RivalBattle_branch_e99a6: intensity $c2 octave 3 note A#, 6 @@ -493,7 +491,7 @@ Music_RivalBattle_branch_e99a6: ; e99a6 note C#, 6 intensity $9a note C#, 4 -Music_RivalBattle_branch_e99c1: ; e99c1 +Music_RivalBattle_branch_e99c1: intensity $c2 octave 3 note G#, 6 @@ -513,9 +511,8 @@ Music_RivalBattle_branch_e99c1: ; e99c1 octave 4 note D_, 4 loopchannel 0, Music_RivalBattle_branch_e991a -; e99e0 -Music_RivalBattle_branch_e99e0: ; e99e0 +Music_RivalBattle_branch_e99e0: intensity $c7 note D#, 10 intensity $c4 @@ -536,9 +533,8 @@ Music_RivalBattle_branch_e99e0: ; e99e0 intensity $b7 note F_, 8 endchannel -; e99fb -Music_RivalBattle_Ch3: ; e99fb +Music_RivalBattle_Ch3: notetype $c, $19 octave 3 note F#, 2 @@ -554,7 +550,7 @@ Music_RivalBattle_Ch3: ; e99fb octave 3 note C#, 2 note D_, 2 -Music_RivalBattle_branch_e9a0c: ; e9a0c +Music_RivalBattle_branch_e9a0c: note D#, 2 note C#, 2 note D#, 2 @@ -563,7 +559,7 @@ Music_RivalBattle_branch_e9a0c: ; e9a0c note D#, 2 note C#, 2 loopchannel 4, Music_RivalBattle_branch_e9a0c -Music_RivalBattle_branch_e9a17: ; e9a17 +Music_RivalBattle_branch_e9a17: octave 3 note C#, 2 octave 2 @@ -586,7 +582,7 @@ Music_RivalBattle_branch_e9a17: ; e9a17 note C_, 2 note C#, 2 note D_, 2 -Music_RivalBattle_branch_e9a30: ; e9a30 +Music_RivalBattle_branch_e9a30: callchannel Music_RivalBattle_branch_e9b47 octave 2 note A#, 2 @@ -633,14 +629,14 @@ Music_RivalBattle_branch_e9a30: ; e9a30 octave 3 note F_, 2 callchannel Music_RivalBattle_branch_e9b50 -Music_RivalBattle_branch_e9a66: ; e9a66 +Music_RivalBattle_branch_e9a66: note C#, 2 note G#, 2 loopchannel 4, Music_RivalBattle_branch_e9a66 callchannel Music_RivalBattle_branch_e9b5c note G#, 2 note F#, 2 -Music_RivalBattle_branch_e9a71: ; e9a71 +Music_RivalBattle_branch_e9a71: octave 2 note A#, 2 octave 3 @@ -698,29 +694,29 @@ Music_RivalBattle_branch_e9a71: ; e9a71 note F#, 2 note G_, 2 note G#, 2 -Music_RivalBattle_branch_e9ab3: ; e9ab3 +Music_RivalBattle_branch_e9ab3: note D#, 2 note A#, 2 loopchannel 4, Music_RivalBattle_branch_e9ab3 -Music_RivalBattle_branch_e9ab9: ; e9ab9 +Music_RivalBattle_branch_e9ab9: note D#, 2 note A_, 2 loopchannel 4, Music_RivalBattle_branch_e9ab9 -Music_RivalBattle_branch_e9abf: ; e9abf +Music_RivalBattle_branch_e9abf: note D#, 2 note G#, 2 loopchannel 4, Music_RivalBattle_branch_e9abf -Music_RivalBattle_branch_e9ac5: ; e9ac5 +Music_RivalBattle_branch_e9ac5: note D#, 2 note G_, 2 loopchannel 12, Music_RivalBattle_branch_e9ac5 -Music_RivalBattle_branch_e9acb: ; e9acb +Music_RivalBattle_branch_e9acb: octave 2 note B_, 2 octave 3 note D#, 2 loopchannel 4, Music_RivalBattle_branch_e9acb -Music_RivalBattle_branch_e9ad3: ; e9ad3 +Music_RivalBattle_branch_e9ad3: octave 2 note B_, 2 octave 3 @@ -779,7 +775,7 @@ Music_RivalBattle_branch_e9ad3: ; e9ad3 note C#, 8 note D#, 8 note F_, 8 -Music_RivalBattle_branch_e9b10: ; e9b10 +Music_RivalBattle_branch_e9b10: octave 2 note A#, 2 octave 3 @@ -787,7 +783,7 @@ Music_RivalBattle_branch_e9b10: ; e9b10 loopchannel 7, Music_RivalBattle_branch_e9b10 note E_, 2 note D#, 2 -Music_RivalBattle_branch_e9b1a: ; e9b1a +Music_RivalBattle_branch_e9b1a: octave 2 note A#, 2 octave 3 @@ -799,7 +795,7 @@ Music_RivalBattle_branch_e9b1a: ; e9b1a note F#, 2 note F_, 2 note E_, 2 -Music_RivalBattle_branch_e9b28: ; e9b28 +Music_RivalBattle_branch_e9b28: octave 2 note G#, 2 octave 3 @@ -807,7 +803,7 @@ Music_RivalBattle_branch_e9b28: ; e9b28 loopchannel 7, Music_RivalBattle_branch_e9b28 note D_, 2 note C#, 2 -Music_RivalBattle_branch_e9b32: ; e9b32 +Music_RivalBattle_branch_e9b32: octave 2 note G#, 2 octave 3 @@ -823,18 +819,16 @@ Music_RivalBattle_branch_e9b32: ; e9b32 note D#, 2 note D_, 2 loopchannel 0, Music_RivalBattle_branch_e9a30 -; e9b47 -Music_RivalBattle_branch_e9b47: ; e9b47 +Music_RivalBattle_branch_e9b47: octave 2 note A#, 2 octave 3 note D#, 2 loopchannel 4, Music_RivalBattle_branch_e9b47 endchannel -; e9b50 -Music_RivalBattle_branch_e9b50: ; e9b50 +Music_RivalBattle_branch_e9b50: note C#, 2 note G#, 2 octave 4 @@ -847,18 +841,16 @@ Music_RivalBattle_branch_e9b50: ; e9b50 note C#, 2 note G#, 2 endchannel -; e9b5c -Music_RivalBattle_branch_e9b5c: ; e9b5c +Music_RivalBattle_branch_e9b5c: octave 2 note B_, 2 octave 3 note F#, 2 loopchannel 7, Music_RivalBattle_branch_e9b5c endchannel -; e9b65 -Music_RivalBattle_branch_e9b65: ; e9b65 +Music_RivalBattle_branch_e9b65: octave 3 note D#, 2 note A#, 2 @@ -866,4 +858,3 @@ Music_RivalBattle_branch_e9b65: ; e9b65 note D#, 2 loopchannel 2, Music_RivalBattle_branch_e9b65 endchannel -; e9b6f diff --git a/audio/music/rocketbattle.asm b/audio/music/rocketbattle.asm index b7f27fa4e50..30c90b08c21 100644 --- a/audio/music/rocketbattle.asm +++ b/audio/music/rocketbattle.asm @@ -1,10 +1,9 @@ -Music_RocketBattle: ; e9b6f +Music_RocketBattle: musicheader 3, 1, Music_RocketBattle_Ch1 musicheader 1, 2, Music_RocketBattle_Ch2 musicheader 1, 3, Music_RocketBattle_Ch3 -; e9b78 -Music_RocketBattle_Ch1: ; e9b78 +Music_RocketBattle_Ch1: tempo 101 volume $77 dutycycle $3 @@ -48,7 +47,7 @@ Music_RocketBattle_Ch1: ; e9b78 note C_, 1 octave 2 note B_, 1 -Music_RocketBattle_branch_e9bad: ; e9bad +Music_RocketBattle_branch_e9bad: intensity $b2 octave 3 note C_, 6 @@ -62,7 +61,7 @@ Music_RocketBattle_branch_e9bad: ; e9bad note C_, 6 intensity $b7 note D_, 4 -Music_RocketBattle_branch_e9bc1: ; e9bc1 +Music_RocketBattle_branch_e9bc1: intensity $b2 octave 4 note E_, 6 @@ -116,7 +115,7 @@ Music_RocketBattle_branch_e9bc1: ; e9bc1 note D#, 2 note D_, 2 note F_, 2 -Music_RocketBattle_branch_e9c02: ; e9c02 +Music_RocketBattle_branch_e9c02: octave 4 note E_, 2 octave 3 @@ -291,7 +290,7 @@ Music_RocketBattle_branch_e9c02: ; e9c02 intensity $b7 note A#, 2 note G_, 4 -Music_RocketBattle_branch_e9cc5: ; e9cc5 +Music_RocketBattle_branch_e9cc5: intensity $b2 note F_, 6 note F_, 4 @@ -389,9 +388,8 @@ Music_RocketBattle_branch_e9cc5: ; e9cc5 note D_, 2 note F_, 2 loopchannel 0, Music_RocketBattle_branch_e9c02 -; e9d3e -Music_RocketBattle_Ch2: ; e9d3e +Music_RocketBattle_Ch2: dutycycle $3 vibrato $8, $36 tone $0001 @@ -438,7 +436,7 @@ Music_RocketBattle_Ch2: ; e9d3e note G#, 1 note A_, 1 note G#, 1 -Music_RocketBattle_branch_e9d7b: ; e9d7b +Music_RocketBattle_branch_e9d7b: intensity $c2 octave 3 note A_, 6 @@ -454,7 +452,7 @@ Music_RocketBattle_branch_e9d7b: ; e9d7b note A_, 6 intensity $4a note G#, 4 -Music_RocketBattle_branch_e9d91: ; e9d91 +Music_RocketBattle_branch_e9d91: intensity $c2 octave 4 note A_, 6 @@ -476,7 +474,7 @@ Music_RocketBattle_branch_e9d91: ; e9d91 note F_, 16 intensity $b7 note F_, 16 -Music_RocketBattle_branch_e9db1: ; e9db1 +Music_RocketBattle_branch_e9db1: callchannel Music_RocketBattle_branch_e9ea0 intensity $b0 note F_, 8 @@ -605,7 +603,7 @@ Music_RocketBattle_branch_e9db1: ; e9db1 note G_, 1 note G#, 1 note A_, 8 -Music_RocketBattle_branch_e9e5a: ; e9e5a +Music_RocketBattle_branch_e9e5a: intensity $c2 octave 3 note A#, 6 @@ -657,9 +655,8 @@ Music_RocketBattle_branch_e9e5a: ; e9e5a intensity $c7 note A#, 8 loopchannel 0, Music_RocketBattle_branch_e9db1 -; e9ea0 -Music_RocketBattle_branch_e9ea0: ; e9ea0 +Music_RocketBattle_branch_e9ea0: intensity $c6 octave 4 note A_, 6 @@ -669,9 +666,8 @@ Music_RocketBattle_branch_e9ea0: ; e9ea0 note G#, 6 note E_, 4 endchannel -; e9eaa -Music_RocketBattle_Ch3: ; e9eaa +Music_RocketBattle_Ch3: notetype $c, $19 octave 3 note A_, 2 @@ -704,7 +700,7 @@ Music_RocketBattle_Ch3: ; e9eaa octave 2 note B_, 2 note A#, 2 -Music_RocketBattle_branch_e9ecc: ; e9ecc +Music_RocketBattle_branch_e9ecc: callchannel Music_RocketBattle_branch_e9fe6 loopchannel 3, Music_RocketBattle_branch_e9ecc octave 2 @@ -719,7 +715,7 @@ Music_RocketBattle_branch_e9ecc: ; e9ecc note F_, 2 note E_, 2 note D_, 2 -Music_RocketBattle_branch_e9edf: ; e9edf +Music_RocketBattle_branch_e9edf: callchannel Music_RocketBattle_branch_e9fe6 loopchannel 3, Music_RocketBattle_branch_e9edf octave 2 @@ -740,7 +736,7 @@ Music_RocketBattle_branch_e9edf: ; e9edf octave 3 note F_, 2 callchannel Music_RocketBattle_branch_ea01d -Music_RocketBattle_branch_e9efe: ; e9efe +Music_RocketBattle_branch_e9efe: callchannel Music_RocketBattle_branch_e9ff3 callchannel Music_RocketBattle_branch_ea010 octave 3 @@ -774,7 +770,7 @@ Music_RocketBattle_branch_e9efe: ; e9efe note A_, 2 octave 3 note E_, 2 -Music_RocketBattle_branch_e9f25: ; e9f25 +Music_RocketBattle_branch_e9f25: octave 2 note A#, 2 octave 3 @@ -807,7 +803,7 @@ Music_RocketBattle_branch_e9f25: ; e9f25 note D_, 2 callchannel Music_RocketBattle_branch_ea02a callchannel Music_RocketBattle_branch_ea02a -Music_RocketBattle_branch_e9f4e: ; e9f4e +Music_RocketBattle_branch_e9f4e: octave 2 note A_, 2 octave 3 @@ -833,7 +829,7 @@ Music_RocketBattle_branch_e9f4e: ; e9f4e note A_, 2 note G_, 2 note F_, 2 -Music_RocketBattle_branch_e9f6a: ; e9f6a +Music_RocketBattle_branch_e9f6a: octave 2 note A#, 2 octave 3 @@ -849,7 +845,7 @@ Music_RocketBattle_branch_e9f6a: ; e9f6a note D_, 2 note C#, 2 note D_, 2 -Music_RocketBattle_branch_e9f7c: ; e9f7c +Music_RocketBattle_branch_e9f7c: octave 2 note A_, 2 octave 3 @@ -863,7 +859,7 @@ Music_RocketBattle_branch_e9f7c: ; e9f7c note C_, 2 octave 2 note A#, 2 -Music_RocketBattle_branch_e9f8c: ; e9f8c +Music_RocketBattle_branch_e9f8c: octave 2 note A_, 2 octave 3 @@ -879,7 +875,7 @@ Music_RocketBattle_branch_e9f8c: ; e9f8c note A_, 2 note G_, 2 note A#, 2 -Music_RocketBattle_branch_e9f9e: ; e9f9e +Music_RocketBattle_branch_e9f9e: octave 2 note A#, 2 octave 3 @@ -887,7 +883,7 @@ Music_RocketBattle_branch_e9f9e: ; e9f9e loopchannel 7, Music_RocketBattle_branch_e9f9e note E_, 2 note F_, 2 -Music_RocketBattle_branch_e9fa8: ; e9fa8 +Music_RocketBattle_branch_e9fa8: octave 2 note A#, 2 octave 3 @@ -932,9 +928,8 @@ Music_RocketBattle_branch_e9fa8: ; e9fa8 note F_, 2 callchannel Music_RocketBattle_branch_ea01d loopchannel 0, Music_RocketBattle_branch_e9efe -; e9fe6 -Music_RocketBattle_branch_e9fe6: ; e9fe6 +Music_RocketBattle_branch_e9fe6: octave 2 note A_, 2 octave 3 @@ -948,9 +943,8 @@ Music_RocketBattle_branch_e9fe6: ; e9fe6 note G_, 2 note F_, 2 endchannel -; e9ff3 -Music_RocketBattle_branch_e9ff3: ; e9ff3 +Music_RocketBattle_branch_e9ff3: octave 2 note A_, 2 octave 3 @@ -980,9 +974,8 @@ Music_RocketBattle_branch_e9ff3: ; e9ff3 note D#, 2 note D_, 2 endchannel -; ea010 -Music_RocketBattle_branch_ea010: ; ea010 +Music_RocketBattle_branch_ea010: octave 2 note A#, 2 octave 3 @@ -996,9 +989,8 @@ Music_RocketBattle_branch_ea010: ; ea010 octave 2 note A#, 2 endchannel -; ea01d -Music_RocketBattle_branch_ea01d: ; ea01d +Music_RocketBattle_branch_ea01d: octave 2 note A#, 2 octave 3 @@ -1012,18 +1004,16 @@ Music_RocketBattle_branch_ea01d: ; ea01d octave 3 note F_, 2 endchannel -; ea02a -Music_RocketBattle_branch_ea02a: ; ea02a +Music_RocketBattle_branch_ea02a: octave 2 note A_, 2 octave 3 note E_, 2 loopchannel 4, Music_RocketBattle_branch_ea02a endchannel -; ea033 -Music_RocketBattle_branch_ea033: ; ea033 +Music_RocketBattle_branch_ea033: octave 2 note A_, 2 octave 3 @@ -1037,4 +1027,3 @@ Music_RocketBattle_branch_ea033: ; ea033 octave 2 note A_, 2 endchannel -; ea040 diff --git a/audio/music/rockethideout.asm b/audio/music/rockethideout.asm index f38ce422b07..6c3a116ac26 100644 --- a/audio/music/rockethideout.asm +++ b/audio/music/rockethideout.asm @@ -1,11 +1,10 @@ -Music_RocketHideout: ; eeb75 +Music_RocketHideout: musicheader 4, 1, Music_RocketHideout_Ch1 musicheader 1, 2, Music_RocketHideout_Ch2 musicheader 1, 3, Music_RocketHideout_Ch3 musicheader 1, 4, Music_RocketHideout_Ch4 -; eeb81 -Music_RocketHideout_Ch1: ; eeb81 +Music_RocketHideout_Ch1: tempo 144 volume $77 dutycycle $3 @@ -13,10 +12,10 @@ Music_RocketHideout_Ch1: ; eeb81 vibrato $10, $44 notetype $c, $b3 stereopanning $f0 -Music_RocketHideout_branch_eeb93: ; eeb93 +Music_RocketHideout_branch_eeb93: note __, 16 loopchannel 4, Music_RocketHideout_branch_eeb93 -Music_RocketHideout_branch_eeb98: ; eeb98 +Music_RocketHideout_branch_eeb98: octave 2 note D#, 2 note __, 2 @@ -114,19 +113,18 @@ Music_RocketHideout_branch_eeb98: ; eeb98 note __, 16 note A_, 16 intensity $b3 -Music_RocketHideout_branch_eebfe: ; eebfe +Music_RocketHideout_branch_eebfe: note __, 16 loopchannel 4, Music_RocketHideout_branch_eebfe loopchannel 0, Music_RocketHideout_branch_eeb93 -; eec07 -Music_RocketHideout_Ch2: ; eec07 +Music_RocketHideout_Ch2: dutycycle $3 tone $0002 vibrato $0, $f0 notetype $c, $c4 stereopanning $f -Music_RocketHideout_branch_eec14: ; eec14 +Music_RocketHideout_branch_eec14: octave 2 note D#, 2 note __, 2 @@ -221,11 +219,10 @@ Music_RocketHideout_branch_eec14: ; eec14 note G_, 2 note __, 8 loopchannel 0, Music_RocketHideout_branch_eec14 -; eec79 -Music_RocketHideout_Ch3: ; eec79 +Music_RocketHideout_Ch3: notetype $c, $19 -Music_RocketHideout_branch_eec7c: ; eec7c +Music_RocketHideout_branch_eec7c: octave 2 note D#, 2 note __, 2 @@ -237,7 +234,7 @@ Music_RocketHideout_branch_eec7c: ; eec7c note A_, 2 note __, 8 loopchannel 6, Music_RocketHideout_branch_eec7c -Music_RocketHideout_branch_eec8a: ; eec8a +Music_RocketHideout_branch_eec8a: note F_, 2 note __, 2 octave 3 @@ -252,7 +249,7 @@ Music_RocketHideout_branch_eec8a: ; eec8a note B_, 2 note __, 8 loopchannel 2, Music_RocketHideout_branch_eec8a -Music_RocketHideout_branch_eec9b: ; eec9b +Music_RocketHideout_branch_eec9b: note C#, 2 note __, 2 note G#, 4 @@ -261,7 +258,7 @@ Music_RocketHideout_branch_eec9b: ; eec9b octave 3 note C#, 16 loopchannel 2, Music_RocketHideout_branch_eec9b -Music_RocketHideout_branch_eeca6: ; eeca6 +Music_RocketHideout_branch_eeca6: octave 2 note C#, 2 note __, 2 @@ -274,9 +271,8 @@ Music_RocketHideout_branch_eeca6: ; eeca6 note __, 8 loopchannel 2, Music_RocketHideout_branch_eeca6 loopchannel 0, Music_RocketHideout_branch_eec7c -; eecb8 -Music_RocketHideout_Ch4: ; eecb8 +Music_RocketHideout_Ch4: togglenoise $0 notetype $c stereopanning $f @@ -287,7 +283,7 @@ Music_RocketHideout_Ch4: ; eecb8 note D#, 1 note D#, 1 callchannel Music_RocketHideout_branch_eecdb -Music_RocketHideout_branch_eecc7: ; eecc7 +Music_RocketHideout_branch_eecc7: callchannel Music_RocketHideout_branch_eecdb note E_, 4 callchannel Music_RocketHideout_branch_eecdb @@ -297,9 +293,8 @@ Music_RocketHideout_branch_eecc7: ; eecc7 callchannel Music_RocketHideout_branch_eecdb note F#, 4 loopchannel 0, Music_RocketHideout_branch_eecc7 -; eecdb -Music_RocketHideout_branch_eecdb: ; eecdb +Music_RocketHideout_branch_eecdb: stereopanning $f0 note D#, 1 note D#, 1 @@ -310,4 +305,3 @@ Music_RocketHideout_branch_eecdb: ; eecdb stereopanning $f0 note A_, 4 endchannel -; eece8 diff --git a/audio/music/rockettheme.asm b/audio/music/rockettheme.asm index 90b4869d7bd..6f13d8b6841 100644 --- a/audio/music/rockettheme.asm +++ b/audio/music/rockettheme.asm @@ -1,11 +1,10 @@ -Music_RocketTheme: ; f766d +Music_RocketTheme: musicheader 4, 1, Music_RocketTheme_Ch1 musicheader 1, 2, Music_RocketTheme_Ch2 musicheader 1, 3, Music_RocketTheme_Ch3 musicheader 1, 4, Music_RocketTheme_Ch4 -; f7679 -Music_RocketTheme_Ch1: ; f7679 +Music_RocketTheme_Ch1: tempo 128 volume $77 dutycycle $3 @@ -15,7 +14,7 @@ Music_RocketTheme_Ch1: ; f7679 octave 4 note C_, 1 note D_, 1 -Music_RocketTheme_branch_f768b: ; f768b +Music_RocketTheme_branch_f768b: dutycycle $3 notetype $c, $a8 callchannel Music_RocketTheme_branch_f74e6 @@ -87,7 +86,7 @@ Music_RocketTheme_branch_f768b: ; f768b note E_, 2 note D#, 2 note D_, 2 -Music_RocketTheme_branch_f76ef: ; f76ef +Music_RocketTheme_branch_f76ef: note __, 4 note F_, 2 note __, 14 @@ -103,19 +102,19 @@ Music_RocketTheme_branch_f76ef: ; f76ef note __, 2 note D#, 2 note C_, 2 -Music_RocketTheme_branch_f7701: ; f7701 +Music_RocketTheme_branch_f7701: note F#, 2 note A_, 2 loopchannel 4, Music_RocketTheme_branch_f7701 -Music_RocketTheme_branch_f7707: ; f7707 +Music_RocketTheme_branch_f7707: note G_, 2 note A#, 2 loopchannel 4, Music_RocketTheme_branch_f7707 -Music_RocketTheme_branch_f770d: ; f770d +Music_RocketTheme_branch_f770d: note G#, 2 note B_, 2 loopchannel 4, Music_RocketTheme_branch_f770d -Music_RocketTheme_branch_f7713: ; f7713 +Music_RocketTheme_branch_f7713: octave 3 note A_, 2 octave 4 @@ -128,9 +127,8 @@ Music_RocketTheme_branch_f7713: ; f7713 note C_, 1 note D_, 1 loopchannel 0, Music_RocketTheme_branch_f768b -; f7727 -Music_RocketTheme_branch_f7727: ; f7727 +Music_RocketTheme_branch_f7727: note __, 7 note B_, 1 octave 4 @@ -154,9 +152,8 @@ Music_RocketTheme_branch_f7727: ; f7727 note A#, 2 note __, 10 endchannel -; f773e -Music_RocketTheme_Ch2: ; f773e +Music_RocketTheme_Ch2: stereopanning $ff vibrato $4, $64 dutycycle $3 @@ -164,7 +161,7 @@ Music_RocketTheme_Ch2: ; f773e octave 5 note C_, 1 note D_, 1 -Music_RocketTheme_branch_f774b: ; f774b +Music_RocketTheme_branch_f774b: notetype $c, $b7 callchannel Music_RocketTheme_branch_f7547 intensity $b7 @@ -291,9 +288,8 @@ Music_RocketTheme_branch_f774b: ; f774b note C_, 2 note D_, 2 loopchannel 0, Music_RocketTheme_branch_f774b -; f7800 -Music_RocketTheme_branch_f7800: ; f7800 +Music_RocketTheme_branch_f7800: notetype $6, $b7 note __, 7 octave 4 @@ -320,9 +316,8 @@ Music_RocketTheme_branch_f7800: ; f7800 note D#, 2 note __, 2 endchannel -; f781c -Music_RocketTheme_branch_f781c: ; f781c +Music_RocketTheme_branch_f781c: octave 3 note B_, 1 octave 4 @@ -333,14 +328,13 @@ Music_RocketTheme_branch_f781c: ; f781c note F_, 8 note C_, 4 endchannel -; f7826 -Music_RocketTheme_Ch3: ; f7826 +Music_RocketTheme_Ch3: stereopanning $f0 vibrato $4, $22 notetype $c, $14 note __, 2 -Music_RocketTheme_branch_f782f: ; f782f +Music_RocketTheme_branch_f782f: notetype $c, $14 callchannel Music_RocketTheme_branch_f75bf callchannel Music_RocketTheme_branch_f75fe @@ -447,13 +441,12 @@ Music_RocketTheme_branch_f782f: ; f782f note G#, 1 note __, 1 loopchannel 0, Music_RocketTheme_branch_f782f -; f78be -Music_RocketTheme_Ch4: ; f78be +Music_RocketTheme_Ch4: togglenoise $3 notetype $c note __, 2 -Music_RocketTheme_branch_f78c3: ; f78c3 +Music_RocketTheme_branch_f78c3: callchannel Music_RocketTheme_branch_f765c callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 @@ -463,7 +456,7 @@ Music_RocketTheme_branch_f78c3: ; f78c3 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f7664 callchannel Music_RocketTheme_branch_f765c -Music_RocketTheme_branch_f78de: ; f78de +Music_RocketTheme_branch_f78de: note A#, 2 note F#, 2 note D_, 2 @@ -479,4 +472,3 @@ Music_RocketTheme_branch_f78de: ; f78de callchannel Music_RocketTheme_branch_f765c callchannel Music_RocketTheme_branch_f765c loopchannel 0, Music_RocketTheme_branch_f78c3 -; f78fd diff --git a/audio/music/route1.asm b/audio/music/route1.asm index 1bcbd35a6fe..8a537b9fd95 100644 --- a/audio/music/route1.asm +++ b/audio/music/route1.asm @@ -1,12 +1,11 @@ -Music_Route1: ; ec000 +Music_Route1: musicheader 3, 1, Music_Route1_Ch1 musicheader 1, 2, Music_Route1_Ch2 musicheader 1, 3, Music_Route1_Ch3 -; ec009 db $3 -Music_Route1_Ch1: ; ec00a +Music_Route1_Ch1: stereopanning $f tempo 184 volume $77 @@ -60,7 +59,7 @@ Music_Route1_Ch1: ; ec00a note D_, 2 intensity $83 note __, 2 -Music_Route1_branch_ec04a: ; ec04a +Music_Route1_branch_ec04a: intensity $83 note __, 2 octave 4 @@ -203,9 +202,8 @@ Music_Route1_branch_ec04a: ; ec04a note D_, 2 note __, 2 loopchannel 0, Music_Route1_branch_ec04a -; ec0eb -Music_Route1_Ch2: ; ec0eb +Music_Route1_Ch2: stereopanning $f0 vibrato $12, $22 dutycycle $2 @@ -232,7 +230,7 @@ Music_Route1_Ch2: ; ec0eb note D_, 1 note E_, 1 dutycycle $2 -Music_Route1_branch_ec112: ; ec112 +Music_Route1_branch_ec112: intensity $82 callchannel Music_Route1_branch_ec188 intensity $81 @@ -323,9 +321,8 @@ Music_Route1_branch_ec112: ; ec112 note D_, 1 note E_, 1 loopchannel 0, Music_Route1_branch_ec112 -; ec188 -Music_Route1_branch_ec188: ; ec188 +Music_Route1_branch_ec188: note F#, 2 note F#, 2 note F#, 2 @@ -342,9 +339,8 @@ Music_Route1_branch_ec188: ; ec188 note F#, 1 note E_, 2 endchannel -; ec198 -Music_Route1_branch_ec198: ; ec198 +Music_Route1_branch_ec198: note A_, 2 note A_, 2 note F#, 2 @@ -363,9 +359,8 @@ Music_Route1_branch_ec198: ; ec198 note F#, 1 note E_, 2 endchannel -; ec1aa -Music_Route1_branch_ec1aa: ; ec1aa +Music_Route1_branch_ec1aa: note A_, 2 note A_, 2 note F#, 2 @@ -380,9 +375,8 @@ Music_Route1_branch_ec1aa: ; ec1aa octave 5 note D_, 2 endchannel -; ec1b8 -Music_Route1_Ch3: ; ec1b8 +Music_Route1_Ch3: stereopanning $ff vibrato $10, $23 notetype $c, $25 @@ -462,7 +456,7 @@ Music_Route1_Ch3: ; ec1b8 note __, 1 note A_, 1 note __, 3 -Music_Route1_branch_ec20c: ; ec20c +Music_Route1_branch_ec20c: octave 3 note D_, 1 note __, 1 @@ -650,4 +644,3 @@ Music_Route1_branch_ec20c: ; ec20c note A_, 1 note __, 3 loopchannel 0, Music_Route1_branch_ec20c -; ec2ca diff --git a/audio/music/route12.asm b/audio/music/route12.asm index c7584096e87..d94d88c2f7d 100644 --- a/audio/music/route12.asm +++ b/audio/music/route12.asm @@ -1,11 +1,10 @@ -Music_Route12: ; ec506 +Music_Route12: musicheader 4, 1, Music_Route12_Ch1 musicheader 1, 2, Music_Route12_Ch2 musicheader 1, 3, Music_Route12_Ch3 musicheader 1, 4, Music_Route12_Ch4 -; ec512 -Music_Route12_Ch1: ; ec512 +Music_Route12_Ch1: tempo 148 volume $77 vibrato $12, $34 @@ -29,7 +28,7 @@ Music_Route12_Ch1: ; ec512 note E_, 1 intensity $97 note D#, 12 -Music_Route12_branch_ec535: ; ec535 +Music_Route12_branch_ec535: dutycycle $2 intensity $96 callchannel Music_Route12_branch_ec5b1 @@ -115,7 +114,7 @@ Music_Route12_branch_ec535: ; ec535 note F#, 8 note D#, 4 note F#, 4 -Music_Route12_branch_ec59b: ; ec59b +Music_Route12_branch_ec59b: intensity $97 note G#, 1 note A_, 1 @@ -131,9 +130,8 @@ Music_Route12_branch_ec59b: ; ec59b note G#, 4 loopchannel 2, Music_Route12_branch_ec59b loopchannel 0, Music_Route12_branch_ec535 -; ec5b1 -Music_Route12_branch_ec5b1: ; ec5b1 +Music_Route12_branch_ec5b1: octave 3 note G#, 1 note __, 1 @@ -148,9 +146,8 @@ Music_Route12_branch_ec5b1: ; ec5b1 note E_, 4 note G#, 4 endchannel -; ec5bf -Music_Route12_branch_ec5bf: ; ec5bf +Music_Route12_branch_ec5bf: note A_, 1 note __, 1 note F#, 1 @@ -162,9 +159,8 @@ Music_Route12_branch_ec5bf: ; ec5bf note A_, 4 note F#, 4 endchannel -; ec5ca -Music_Route12_Ch2: ; ec5ca +Music_Route12_Ch2: dutycycle $3 vibrato $12, $34 notetype $c, $b8 @@ -186,7 +182,7 @@ Music_Route12_Ch2: ; ec5ca note B_, 1 octave 4 note D#, 1 -Music_Route12_branch_ec5e5: ; ec5e5 +Music_Route12_branch_ec5e5: dutycycle $3 intensity $b7 callchannel Music_Route12_branch_ec647 @@ -264,9 +260,8 @@ Music_Route12_branch_ec5e5: ; ec5e5 intensity $a4 note E_, 6 loopchannel 0, Music_Route12_branch_ec5e5 -; ec647 -Music_Route12_branch_ec647: ; ec647 +Music_Route12_branch_ec647: octave 4 note E_, 6 intensity $b1 @@ -281,9 +276,8 @@ Music_Route12_branch_ec647: ; ec647 note G#, 4 note F#, 4 endchannel -; ec657 -Music_Route12_Ch3: ; ec657 +Music_Route12_Ch3: vibrato $12, $54 notetype $c, $16 octave 3 @@ -301,7 +295,7 @@ Music_Route12_Ch3: ; ec657 note F#, 2 note __, 2 note D#, 4 -Music_Route12_branch_ec66c: ; ec66c +Music_Route12_branch_ec66c: callchannel Music_Route12_branch_ec6b4 note F#, 1 note __, 1 @@ -353,7 +347,7 @@ Music_Route12_branch_ec66c: ; ec66c note E_, 8 note F#, 4 note D#, 4 -Music_Route12_branch_ec6a3: ; ec6a3 +Music_Route12_branch_ec6a3: note E_, 1 note __, 1 note E_, 1 @@ -365,9 +359,8 @@ Music_Route12_branch_ec6a3: ; ec6a3 note __, 1 loopchannel 2, Music_Route12_branch_ec6a3 loopchannel 0, Music_Route12_branch_ec66c -; ec6b4 -Music_Route12_branch_ec6b4: ; ec6b4 +Music_Route12_branch_ec6b4: octave 3 note E_, 1 note __, 1 @@ -394,9 +387,8 @@ Music_Route12_branch_ec6b4: ; ec6b4 note G#, 4 note E_, 4 endchannel -; ec6ce -Music_Route12_Ch4: ; ec6ce +Music_Route12_Ch4: togglenoise $4 stereopanning $f0 notetype $c @@ -410,7 +402,7 @@ Music_Route12_Ch4: ; ec6ce note D_, 4 notetype $6 callchannel Music_Route12_branch_ec717 -Music_Route12_branch_ec6e1: ; ec6e1 +Music_Route12_branch_ec6e1: note D_, 4 note D_, 8 note C#, 2 @@ -418,7 +410,7 @@ Music_Route12_branch_ec6e1: ; ec6e1 note D_, 8 callchannel Music_Route12_branch_ec717 loopchannel 8, Music_Route12_branch_ec6e1 -Music_Route12_branch_ec6ed: ; ec6ed +Music_Route12_branch_ec6ed: notetype $c note B_, 10 note D_, 1 @@ -436,7 +428,7 @@ Music_Route12_branch_ec6ed: ; ec6ed callchannel Music_Route12_branch_ec717 callchannel Music_Route12_branch_ec717 note B_, 16 -Music_Route12_branch_ec707: ; ec707 +Music_Route12_branch_ec707: note D_, 4 note D_, 8 note C#, 2 @@ -445,9 +437,8 @@ Music_Route12_branch_ec707: ; ec707 callchannel Music_Route12_branch_ec717 loopchannel 2, Music_Route12_branch_ec707 loopchannel 0, Music_Route12_branch_ec6e1 -; ec717 -Music_Route12_branch_ec717: ; ec717 +Music_Route12_branch_ec717: note C#, 1 note C#, 1 note C#, 1 @@ -457,4 +448,3 @@ Music_Route12_branch_ec717: ; ec717 note C#, 1 note C#, 1 endchannel -; ec720 diff --git a/audio/music/route2.asm b/audio/music/route2.asm index eca547e9bb0..b5ff1feba42 100644 --- a/audio/music/route2.asm +++ b/audio/music/route2.asm @@ -1,11 +1,10 @@ -Music_Route2: ; ed8dd +Music_Route2: musicheader 4, 1, Music_Route2_Ch1 musicheader 1, 2, Music_Route2_Ch2 musicheader 1, 3, Music_Route2_Ch3 musicheader 1, 4, Music_Route2_Ch4 -; ed8e9 -Music_Route2_Ch1: ; ed8e9 +Music_Route2_Ch1: tempo 151 volume $77 stereopanning $f @@ -14,7 +13,7 @@ Music_Route2_Ch1: ; ed8e9 note __, 16 note __, 16 callchannel Music_Route2_branch_ed931 -Music_Route2_branch_ed8fb: ; ed8fb +Music_Route2_branch_ed8fb: intensity $b1 octave 3 note B_, 4 @@ -55,9 +54,8 @@ Music_Route2_branch_ed8fb: ; ed8fb note B_, 2 note G_, 2 loopchannel 0, Music_Route2_branch_ed8fb -; ed931 -Music_Route2_branch_ed931: ; ed931 +Music_Route2_branch_ed931: octave 4 note C_, 4 note C_, 4 @@ -71,9 +69,8 @@ Music_Route2_branch_ed931: ; ed931 note B_, 4 intensity $b1 endchannel -; ed940 -Music_Route2_branch_ed940: ; ed940 +Music_Route2_branch_ed940: octave 2 note B_, 2 octave 3 @@ -121,9 +118,8 @@ Music_Route2_branch_ed940: ; ed940 note G_, 2 intensity $b1 endchannel -; ed971 -Music_Route2_branch_ed971: ; ed971 +Music_Route2_branch_ed971: note B_, 2 note G_, 2 note B_, 2 @@ -161,14 +157,13 @@ Music_Route2_branch_ed971: ; ed971 octave 3 note A_, 2 endchannel -; ed996 -Music_Route2_Ch2: ; ed996 +Music_Route2_Ch2: stereopanning $ff vibrato $8, $24 notetype $c, $b2 callchannel Music_Route2_branch_ed9ba -Music_Route2_branch_ed9a1: ; ed9a1 +Music_Route2_branch_ed9a1: intensity $b2 callchannel Music_Route2_branch_ed9ba dutycycle $2 @@ -178,9 +173,8 @@ Music_Route2_branch_ed9a1: ; ed9a1 callchannel Music_Route2_branch_eda02 callchannel Music_Route2_branch_eda02 loopchannel 0, Music_Route2_branch_ed9a1 -; ed9ba -Music_Route2_branch_ed9ba: ; ed9ba +Music_Route2_branch_ed9ba: octave 4 note E_, 4 note E_, 4 @@ -213,9 +207,8 @@ Music_Route2_branch_ed9ba: ; ed9ba note G_, 4 intensity $b2 endchannel -; ed9dc -Music_Route2_branch_ed9dc: ; ed9dc +Music_Route2_branch_ed9dc: octave 2 note C_, 4 note __, 2 @@ -254,9 +247,8 @@ Music_Route2_branch_ed9dc: ; ed9dc note F_, 4 note D_, 4 endchannel -; eda02 -Music_Route2_branch_eda02: ; eda02 +Music_Route2_branch_eda02: octave 2 note E_, 4 note __, 2 @@ -299,9 +291,8 @@ Music_Route2_branch_eda02: ; eda02 note G_, 1 note __, 1 endchannel -; eda2c -Music_Route2_Ch3: ; eda2c +Music_Route2_Ch3: stereopanning $f0 vibrato $16, $15 notetype $c, $14 @@ -326,7 +317,7 @@ Music_Route2_Ch3: ; eda2c callchannel Music_Route2_branch_eda9e octave 3 note D_, 4 -Music_Route2_branch_eda4b: ; eda4b +Music_Route2_branch_eda4b: notetype $c, $15 octave 3 note C_, 4 @@ -391,9 +382,8 @@ Music_Route2_branch_eda4b: ; eda4b note G_, 16 note G_, 15 loopchannel 0, Music_Route2_branch_eda4b -; eda9e -Music_Route2_branch_eda9e: ; eda9e +Music_Route2_branch_eda9e: octave 3 note F_, 4 note __, 2 @@ -411,9 +401,8 @@ Music_Route2_branch_eda9e: ; eda9e note __, 1 note F_, 4 endchannel -; edaaf -Music_Route2_branch_edaaf: ; edaaf +Music_Route2_branch_edaaf: octave 6 note E_, 10 note D_, 2 @@ -440,9 +429,8 @@ Music_Route2_branch_edaaf: ; edaaf note C_, 4 note D_, 4 endchannel -; edacb -Music_Route2_branch_edacb: ; edacb +Music_Route2_branch_edacb: octave 5 note B_, 16 note __, 4 @@ -460,12 +448,11 @@ Music_Route2_branch_edacb: ; edacb note E_, 4 note F_, 16 endchannel -; edadc -Music_Route2_Ch4: ; edadc +Music_Route2_Ch4: togglenoise $5 notetype $c -Music_Route2_branch_edae0: ; edae0 +Music_Route2_branch_edae0: note A_, 4 note A_, 4 note A_, 2 @@ -478,7 +465,7 @@ Music_Route2_branch_edae0: ; edae0 note A_, 2 note A_, 2 note D#, 4 -Music_Route2_branch_edaef: ; edaef +Music_Route2_branch_edaef: note A_, 4 note A_, 4 note A_, 2 @@ -486,7 +473,7 @@ Music_Route2_branch_edaef: ; edaef note B_, 2 note A_, 2 loopchannel 4, Music_Route2_branch_edaef -Music_Route2_branch_edaf9: ; edaf9 +Music_Route2_branch_edaf9: note B_, 4 note A_, 2 note B_, 2 @@ -500,7 +487,7 @@ Music_Route2_branch_edaf9: ; edaf9 note A_, 2 note A_, 2 note D#, 4 -Music_Route2_branch_edb09: ; edb09 +Music_Route2_branch_edb09: note B_, 4 note C_, 4 note B_, 2 @@ -512,7 +499,7 @@ Music_Route2_branch_edb09: ; edb09 note C#, 2 note C_, 2 note C#, 4 -Music_Route2_branch_edb17: ; edb17 +Music_Route2_branch_edb17: note B_, 4 note C_, 4 note B_, 2 @@ -525,4 +512,3 @@ Music_Route2_branch_edb17: ; edb17 note D_, 2 note D#, 4 loopchannel 0, Music_Route2_branch_edaef -; edb29 diff --git a/audio/music/route26.asm b/audio/music/route26.asm index 85f2e0f0207..fb1a7a8e02b 100644 --- a/audio/music/route26.asm +++ b/audio/music/route26.asm @@ -1,11 +1,10 @@ -Music_Route26: ; eefb2 +Music_Route26: musicheader 4, 1, Music_Route26_Ch1 musicheader 1, 2, Music_Route26_Ch2 musicheader 1, 3, Music_Route26_Ch3 musicheader 1, 4, Music_Route26_Ch4 -; eefbe -Music_Route26_Ch1: ; eefbe +Music_Route26_Ch1: stereopanning $f vibrato $12, $23 tempo 151 @@ -27,7 +26,7 @@ Music_Route26_Ch1: ; eefbe octave 3 note G#, 2 note F#, 2 -Music_Route26_branch_eefe0: ; eefe0 +Music_Route26_branch_eefe0: dutycycle $0 notetype $c, $a7 octave 3 @@ -194,9 +193,8 @@ Music_Route26_branch_eefe0: ; eefe0 note B_, 4 note __, 4 loopchannel 0, Music_Route26_branch_eefe0 -; ef09d -Music_Route26_Ch2: ; ef09d +Music_Route26_Ch2: stereopanning $f0 vibrato $14, $23 dutycycle $2 @@ -234,7 +232,7 @@ Music_Route26_Ch2: ; ef09d octave 2 note C_, 2 note D#, 2 -Music_Route26_branch_ef0ce: ; ef0ce +Music_Route26_branch_ef0ce: dutycycle $2 notetype $c, $c2 octave 2 @@ -283,7 +281,7 @@ Music_Route26_branch_ef0ce: ; ef0ce note D#, 4 note D#, 4 notetype $8, $c2 -Music_Route26_branch_ef10e: ; ef10e +Music_Route26_branch_ef10e: octave 2 note G#, 2 note G#, 2 @@ -339,9 +337,8 @@ Music_Route26_branch_ef10e: ; ef10e note C_, 1 note D#, 1 loopchannel 0, Music_Route26_branch_ef0ce -; ef14e -Music_Route26_branch_ef14e: ; ef14e +Music_Route26_branch_ef14e: note A#, 6 note A#, 1 octave 2 @@ -354,9 +351,8 @@ Music_Route26_branch_ef14e: ; ef14e octave 1 note A#, 2 endchannel -; ef15a -Music_Route26_Ch3: ; ef15a +Music_Route26_Ch3: stereopanning $ff vibrato $12, $23 notetype $c, $14 @@ -392,7 +388,7 @@ Music_Route26_Ch3: ; ef15a note F#, 2 note F_, 2 note D#, 2 -Music_Route26_branch_ef18a: ; ef18a +Music_Route26_branch_ef18a: vibrato $18, $23 notetype $c, $14 octave 5 @@ -538,9 +534,8 @@ Music_Route26_branch_ef18a: ; ef18a octave 3 note C_, 1 loopchannel 0, Music_Route26_branch_ef18a -; ef22f -Music_Route26_branch_ef22f: ; ef22f +Music_Route26_branch_ef22f: octave 5 note F_, 8 note C#, 2 @@ -550,18 +545,17 @@ Music_Route26_branch_ef22f: ; ef22f note C#, 4 note D#, 4 endchannel -; ef238 -Music_Route26_Ch4: ; ef238 +Music_Route26_Ch4: togglenoise $4 notetype $c -Music_Route26_branch_ef23c: ; ef23c +Music_Route26_branch_ef23c: note B_, 6 note D_, 1 note D_, 1 loopchannel 3, Music_Route26_branch_ef23c callchannel Music_Route26_branch_ef2b0 -Music_Route26_branch_ef246: ; ef246 +Music_Route26_branch_ef246: notetype $6 callchannel Music_Route26_branch_ef29a callchannel Music_Route26_branch_ef29a @@ -580,7 +574,7 @@ Music_Route26_branch_ef246: ; ef246 callchannel Music_Route26_branch_ef29a callchannel Music_Route26_branch_ef29a notetype $8 -Music_Route26_branch_ef266: ; ef266 +Music_Route26_branch_ef266: note D_, 2 note D_, 2 note D_, 2 @@ -591,7 +585,7 @@ Music_Route26_branch_ef266: ; ef266 callchannel Music_Route26_branch_ef2a8 callchannel Music_Route26_branch_ef29a callchannel Music_Route26_branch_ef2a8 -Music_Route26_branch_ef27c: ; ef27c +Music_Route26_branch_ef27c: notetype $6 note D_, 1 note D_, 1 @@ -611,9 +605,8 @@ Music_Route26_branch_ef27c: ; ef27c note B_, 16 callchannel Music_Route26_branch_ef2b0 loopchannel 0, Music_Route26_branch_ef246 -; ef29a -Music_Route26_branch_ef29a: ; ef29a +Music_Route26_branch_ef29a: note E_, 12 note D_, 2 note D_, 2 @@ -628,9 +621,8 @@ Music_Route26_branch_ef29a: ; ef29a note C#, 1 note C#, 1 endchannel -; ef2a8 -Music_Route26_branch_ef2a8: ; ef2a8 +Music_Route26_branch_ef2a8: note E_, 12 note D_, 2 note D_, 2 @@ -639,9 +631,8 @@ Music_Route26_branch_ef2a8: ; ef2a8 note E_, 4 note D_, 4 endchannel -; ef2b0 -Music_Route26_branch_ef2b0: ; ef2b0 +Music_Route26_branch_ef2b0: notetype $6 note C#, 1 note C#, 1 @@ -672,4 +663,3 @@ Music_Route26_branch_ef2b0: ; ef2b0 note D_, 2 note E_, 2 endchannel -; ef2d0 diff --git a/audio/music/route29.asm b/audio/music/route29.asm index de780ebeef2..d7cecf4f690 100644 --- a/audio/music/route29.asm +++ b/audio/music/route29.asm @@ -1,11 +1,10 @@ -Music_Route29: ; f0386 +Music_Route29: musicheader 4, 1, Music_Route29_Ch1 musicheader 1, 2, Music_Route29_Ch2 musicheader 1, 3, Music_Route29_Ch3 musicheader 1, 4, Music_Route29_Ch4 -; f0392 -Music_Route29_Ch1: ; f0392 +Music_Route29_Ch1: tempo 146 volume $77 dutycycle $3 @@ -14,7 +13,7 @@ Music_Route29_Ch1: ; f0392 stereopanning $f notetype $c, $b2 note __, 2 -Music_Route29_branch_f03a5: ; f03a5 +Music_Route29_branch_f03a5: note __, 2 octave 4 note C_, 2 @@ -168,16 +167,15 @@ Music_Route29_branch_f03a5: ; f03a5 note G_, 2 note G_, 4 loopchannel 0, Music_Route29_branch_f03a5 -; f044d -Music_Route29_Ch2: ; f044d +Music_Route29_Ch2: dutycycle $3 vibrato $12, $36 notetype $c, $c2 octave 4 note C_, 1 note D_, 1 -Music_Route29_branch_f0458: ; f0458 +Music_Route29_branch_f0458: callchannel Music_Route29_branch_f04de note F_, 1 note E_, 1 @@ -301,9 +299,8 @@ Music_Route29_branch_f0458: ; f0458 note C_, 1 note D_, 1 loopchannel 0, Music_Route29_branch_f0458 -; f04de -Music_Route29_branch_f04de: ; f04de +Music_Route29_branch_f04de: note E_, 2 note E_, 2 note G_, 2 @@ -333,14 +330,13 @@ Music_Route29_branch_f04de: ; f04de note E_, 2 note C_, 2 endchannel -; f04fb -Music_Route29_Ch3: ; f04fb +Music_Route29_Ch3: stereopanning $f0 notetype $c, $25 vibrato $9, $27 note __, 2 -Music_Route29_branch_f0504: ; f0504 +Music_Route29_branch_f0504: note __, 2 octave 3 note G_, 1 @@ -503,14 +499,13 @@ Music_Route29_branch_f0504: ; f0504 note C_, 1 note __, 3 loopchannel 0, Music_Route29_branch_f0504 -; f05a9 -Music_Route29_Ch4: ; f05a9 +Music_Route29_Ch4: stereopanning $f togglenoise $0 notetype $c note __, 2 -Music_Route29_branch_f05b0: ; f05b0 +Music_Route29_branch_f05b0: note __, 2 note F_, 2 note F_, 6 @@ -523,4 +518,3 @@ Music_Route29_branch_f05b0: ; f05b0 note F_, 2 note F_, 4 loopchannel 0, Music_Route29_branch_f05b0 -; f05bf diff --git a/audio/music/route3.asm b/audio/music/route3.asm index 5e696f4bdce..f36dbd53dac 100644 --- a/audio/music/route3.asm +++ b/audio/music/route3.asm @@ -1,11 +1,10 @@ -Music_Route3: ; ec2ca +Music_Route3: musicheader 4, 1, Music_Route3_Ch1 musicheader 1, 2, Music_Route3_Ch2 musicheader 1, 3, Music_Route3_Ch3 musicheader 1, 4, Music_Route3_Ch4 -; ec2d6 -Music_Route3_Ch1: ; ec2d6 +Music_Route3_Ch1: stereopanning $f tempo 160 volume $77 @@ -46,7 +45,7 @@ Music_Route3_Ch1: ; ec2d6 note E_, 1 note F#, 1 note G#, 1 -Music_Route3_branch_ec307: ; ec307 +Music_Route3_branch_ec307: callchannel Music_Route3_branch_ec3a4 note G_, 1 note D_, 1 @@ -195,9 +194,8 @@ Music_Route3_branch_ec307: ; ec307 octave 4 note D_, 1 loopchannel 0, Music_Route3_branch_ec307 -; ec3a4 -Music_Route3_branch_ec3a4: ; ec3a4 +Music_Route3_branch_ec3a4: octave 3 note A_, 1 note E_, 1 @@ -208,7 +206,7 @@ Music_Route3_branch_ec3a4: ; ec3a4 note E_, 1 note C#, 1 note E_, 1 -Music_Route3_branch_ec3b1: ; ec3b1 +Music_Route3_branch_ec3b1: note A_, 1 note E_, 1 note C#, 1 @@ -218,7 +216,7 @@ Music_Route3_branch_ec3b1: ; ec3b1 note E_, 1 note C#, 1 note E_, 1 -Music_Route3_branch_ec3bd: ; ec3bd +Music_Route3_branch_ec3bd: note G_, 1 note D_, 1 octave 2 @@ -235,9 +233,8 @@ Music_Route3_branch_ec3bd: ; ec3bd octave 3 note D_, 1 endchannel -; ec3d0 -Music_Route3_Ch2: ; ec3d0 +Music_Route3_Ch2: stereopanning $f0 notetype $c, $5e dutycycle $2 @@ -266,7 +263,7 @@ Music_Route3_Ch2: ; ec3d0 note C#, 1 note E_, 1 note G#, 1 -Music_Route3_branch_ec3f5: ; ec3f5 +Music_Route3_branch_ec3f5: intensity $7d callchannel Music_Route3_branch_ec443 note G_, 1 @@ -328,9 +325,8 @@ Music_Route3_branch_ec3f5: ; ec3f5 note F#, 1 note G#, 1 loopchannel 0, Music_Route3_branch_ec3f5 -; ec443 -Music_Route3_branch_ec443: ; ec443 +Music_Route3_branch_ec443: note A_, 6 note E_, 1 note A_, 1 @@ -353,9 +349,8 @@ Music_Route3_branch_ec443: ; ec443 note G_, 6 note D_, 1 endchannel -; ec45b -Music_Route3_Ch3: ; ec45b +Music_Route3_Ch3: stereopanning $ff vibrato $6, $3 notetype $c, $13 @@ -384,7 +379,7 @@ Music_Route3_Ch3: ; ec45b note __, 1 note G#, 2 callchannel Music_Route3_branch_ec4bd -Music_Route3_branch_ec47f: ; ec47f +Music_Route3_branch_ec47f: intensity $14 callchannel Music_Route3_branch_ec4bd callchannel Music_Route3_branch_ec4bd @@ -431,9 +426,8 @@ Music_Route3_branch_ec47f: ; ec47f note F#, 1 note G#, 1 loopchannel 0, Music_Route3_branch_ec47f -; ec4bd -Music_Route3_branch_ec4bd: ; ec4bd +Music_Route3_branch_ec4bd: octave 3 note A_, 1 note __, 1 @@ -451,9 +445,8 @@ Music_Route3_branch_ec4bd: ; ec4bd octave 2 note G#, 2 endchannel -; ec4ce -Music_Route3_branch_ec4ce: ; ec4ce +Music_Route3_branch_ec4ce: octave 3 note G_, 1 note __, 1 @@ -483,13 +476,12 @@ Music_Route3_branch_ec4ce: ; ec4ce note G#, 2 note B_, 2 endchannel -; ec4eb -Music_Route3_Ch4: ; ec4eb +Music_Route3_Ch4: togglenoise $4 notetype $c note __, 10 -Music_Route3_branch_ec4f0: ; ec4f0 +Music_Route3_branch_ec4f0: notetype $c note D_, 2 note D_, 4 @@ -507,4 +499,3 @@ Music_Route3_branch_ec4f0: ; ec4f0 note C#, 1 note C#, 1 loopchannel 0, Music_Route3_branch_ec4f0 -; ec506 diff --git a/audio/music/route30.asm b/audio/music/route30.asm index 7cae730c147..22623579f13 100644 --- a/audio/music/route30.asm +++ b/audio/music/route30.asm @@ -1,11 +1,10 @@ -Music_Route30: ; efc01 +Music_Route30: musicheader 4, 1, Music_Route30_Ch1 musicheader 1, 2, Music_Route30_Ch2 musicheader 1, 3, Music_Route30_Ch3 musicheader 1, 4, Music_Route30_Ch4 -; efc0d -Music_Route30_Ch1: ; efc0d +Music_Route30_Ch1: tempo 144 volume $77 dutycycle $3 @@ -27,7 +26,7 @@ Music_Route30_Ch1: ; efc0d note D_, 2 intensity $4e note C_, 4 -Music_Route30_branch_efc2e: ; efc2e +Music_Route30_branch_efc2e: intensity $b6 note D_, 6 intensity $b4 @@ -183,9 +182,8 @@ Music_Route30_branch_efc2e: ; efc2e octave 4 note D_, 2 loopchannel 0, Music_Route30_branch_efc2e -; efcda -Music_Route30_Ch2: ; efcda +Music_Route30_Ch2: dutycycle $3 vibrato $12, $36 stereopanning $f @@ -207,7 +205,7 @@ Music_Route30_Ch2: ; efcda note E_, 1 note F_, 1 note F#, 1 -Music_Route30_branch_efcf6: ; efcf6 +Music_Route30_branch_efcf6: intensity $c7 note G_, 10 octave 4 @@ -295,9 +293,8 @@ Music_Route30_branch_efcf6: ; efcf6 octave 3 note F#, 2 loopchannel 0, Music_Route30_branch_efcf6 -; efd5f -Music_Route30_Ch3: ; efd5f +Music_Route30_Ch3: notetype $c, $27 octave 2 note G_, 1 @@ -322,7 +319,7 @@ Music_Route30_Ch3: ; efd5f note __, 1 note G_, 1 note __, 1 -Music_Route30_branch_efd79: ; efd79 +Music_Route30_branch_efd79: note G_, 1 note __, 1 note B_, 2 @@ -577,14 +574,13 @@ Music_Route30_branch_efd79: ; efd79 note G_, 1 note __, 1 loopchannel 0, Music_Route30_branch_efd79 -; efe7a -Music_Route30_Ch4: ; efe7a +Music_Route30_Ch4: togglenoise $3 notetype $c callchannel Music_Route30_branch_efeb8 callchannel Music_Route30_branch_efec1 -Music_Route30_branch_efe84: ; efe84 +Music_Route30_branch_efe84: callchannel Music_Route30_branch_efecd callchannel Music_Route30_branch_efed7 callchannel Music_Route30_branch_efed7 @@ -602,9 +598,8 @@ Music_Route30_branch_efe84: ; efe84 callchannel Music_Route30_branch_efecd callchannel Music_Route30_branch_efee1 loopchannel 0, Music_Route30_branch_efe84 -; efeb8 -Music_Route30_branch_efeb8: ; efeb8 +Music_Route30_branch_efeb8: note D_, 2 note F#, 2 note F#, 2 @@ -614,9 +609,8 @@ Music_Route30_branch_efeb8: ; efeb8 note D_, 2 note D_, 4 endchannel -; efec1 -Music_Route30_branch_efec1: ; efec1 +Music_Route30_branch_efec1: note D_, 2 note F#, 2 note F#, 2 @@ -629,9 +623,8 @@ Music_Route30_branch_efec1: ; efec1 note D_, 1 note D_, 1 endchannel -; efecd -Music_Route30_branch_efecd: ; efecd +Music_Route30_branch_efecd: note D_, 2 note F#, 2 note F#, 2 @@ -642,9 +635,8 @@ Music_Route30_branch_efecd: ; efecd note D_, 2 note D_, 2 endchannel -; efed7 -Music_Route30_branch_efed7: ; efed7 +Music_Route30_branch_efed7: note D_, 2 note F#, 2 note F#, 2 @@ -655,9 +647,8 @@ Music_Route30_branch_efed7: ; efed7 note D_, 2 note D_, 2 endchannel -; efee1 -Music_Route30_branch_efee1: ; efee1 +Music_Route30_branch_efee1: note D_, 2 note F#, 2 note F#, 2 @@ -676,4 +667,3 @@ Music_Route30_branch_efee1: ; efee1 note D_, 1 notetype $c endchannel -; efef5 diff --git a/audio/music/route36.asm b/audio/music/route36.asm index 8c7db70fff0..1899116b928 100644 --- a/audio/music/route36.asm +++ b/audio/music/route36.asm @@ -1,11 +1,10 @@ -Music_Route36: ; e94e9 +Music_Route36: musicheader 4, 1, Music_Route36_Ch1 musicheader 1, 2, Music_Route36_Ch2 musicheader 1, 3, Music_Route36_Ch3 musicheader 1, 4, Music_Route36_Ch4 -; e94f5 -Music_Route36_Ch1: ; e94f5 +Music_Route36_Ch1: tempo 144 volume $77 dutycycle $3 @@ -26,7 +25,7 @@ Music_Route36_Ch1: ; e94f5 note A_, 1 intensity $5d note A#, 4 -Music_Route36_branch_e9517: ; e9517 +Music_Route36_branch_e9517: intensity $b5 note F_, 4 note A_, 2 @@ -163,9 +162,8 @@ Music_Route36_branch_e9517: ; e9517 note D#, 2 note E_, 2 loopchannel 0, Music_Route36_branch_e9517 -; e95af -Music_Route36_Ch2: ; e95af +Music_Route36_Ch2: dutycycle $3 vibrato $10, $36 stereopanning $f0 @@ -188,7 +186,7 @@ Music_Route36_Ch2: ; e95af note F_, 8 octave 3 note G_, 4 -Music_Route36_branch_e95ce: ; e95ce +Music_Route36_branch_e95ce: intensity $c7 octave 4 note C_, 10 @@ -311,9 +309,8 @@ Music_Route36_branch_e95ce: ; e95ce note A_, 1 note B_, 1 loopchannel 0, Music_Route36_branch_e95ce -; e966b -Music_Route36_Ch3: ; e966b +Music_Route36_Ch3: notetype $c, $25 octave 3 note F_, 1 @@ -337,7 +334,7 @@ Music_Route36_Ch3: ; e966b octave 3 note D#, 2 note E_, 2 -Music_Route36_branch_e9684: ; e9684 +Music_Route36_branch_e9684: note F_, 4 note C_, 2 note F_, 4 @@ -468,20 +465,19 @@ Music_Route36_branch_e9684: ; e9684 note D#, 2 note E_, 2 loopchannel 0, Music_Route36_branch_e9684 -; e9709 -Music_Route36_Ch4: ; e9709 +Music_Route36_Ch4: togglenoise $1 notetype $c callchannel Music_Route36_branch_e9734 callchannel Music_Route36_branch_e9741 -Music_Route36_branch_e9713: ; e9713 +Music_Route36_branch_e9713: callchannel Music_Route36_branch_e9734 callchannel Music_Route36_branch_e973b callchannel Music_Route36_branch_e9734 callchannel Music_Route36_branch_e9741 loopchannel 2, Music_Route36_branch_e9713 -Music_Route36_branch_e9723: ; e9723 +Music_Route36_branch_e9723: note A#, 4 note A_, 2 note F_, 4 @@ -491,9 +487,8 @@ Music_Route36_branch_e9723: ; e9723 loopchannel 11, Music_Route36_branch_e9723 callchannel Music_Route36_branch_e9741 loopchannel 0, Music_Route36_branch_e9713 -; e9734 -Music_Route36_branch_e9734: ; e9734 +Music_Route36_branch_e9734: note A_, 4 note A_, 6 note A#, 1 @@ -501,18 +496,16 @@ Music_Route36_branch_e9734: ; e9734 note A_, 2 note A#, 2 endchannel -; e973b -Music_Route36_branch_e973b: ; e973b +Music_Route36_branch_e973b: note A_, 4 note A_, 6 note B_, 1 note A#, 1 note A_, 4 endchannel -; e9741 -Music_Route36_branch_e9741: ; e9741 +Music_Route36_branch_e9741: note A_, 4 note A_, 6 note A#, 1 @@ -525,4 +518,3 @@ Music_Route36_branch_e9741: ; e9741 note A_, 1 notetype $c endchannel -; e974f diff --git a/audio/music/route37.asm b/audio/music/route37.asm index 90a832b3eb2..000db4e3bb9 100644 --- a/audio/music/route37.asm +++ b/audio/music/route37.asm @@ -1,11 +1,10 @@ -Music_Route37: ; ee94b +Music_Route37: musicheader 4, 1, Music_Route37_Ch1 musicheader 1, 2, Music_Route37_Ch2 musicheader 1, 3, Music_Route37_Ch3 musicheader 1, 4, Music_Route37_Ch4 -; ee957 -Music_Route37_Ch1: ; ee957 +Music_Route37_Ch1: tempo 144 volume $77 dutycycle $3 @@ -14,7 +13,7 @@ Music_Route37_Ch1: ; ee957 notetype $c, $b3 note __, 16 note __, 16 -Music_Route37_branch_ee969: ; ee969 +Music_Route37_branch_ee969: intensity $b3 note __, 2 octave 2 @@ -68,7 +67,7 @@ Music_Route37_branch_ee969: ; ee969 note E_, 2 note D#, 4 stereopanning $f -Music_Route37_branch_ee9a5: ; ee9a5 +Music_Route37_branch_ee9a5: callchannel Music_Route37_branch_ee9da octave 3 note C#, 4 @@ -97,9 +96,8 @@ Music_Route37_branch_ee9a5: ; ee9a5 callchannel Music_Route37_branch_ee9e9 note __, 4 loopchannel 0, Music_Route37_branch_ee969 -; ee9da -Music_Route37_branch_ee9da: ; ee9da +Music_Route37_branch_ee9da: intensity $c2 octave 2 note A_, 2 @@ -113,9 +111,8 @@ Music_Route37_branch_ee9da: ; ee9da note A_, 2 intensity $b7 endchannel -; ee9e9 -Music_Route37_branch_ee9e9: ; ee9e9 +Music_Route37_branch_ee9e9: intensity $c2 octave 2 note B_, 2 @@ -129,9 +126,8 @@ Music_Route37_branch_ee9e9: ; ee9e9 note B_, 2 intensity $b7 endchannel -; ee9f8 -Music_Route37_Ch2: ; ee9f8 +Music_Route37_Ch2: dutycycle $3 vibrato $1c, $12 notetype $c, $c2 @@ -162,7 +158,7 @@ Music_Route37_Ch2: ; ee9f8 note B_, 1 intensity $c2 note B_, 2 -Music_Route37_branch_eea24: ; eea24 +Music_Route37_branch_eea24: callchannel Music_Route37_branch_eeab7 intensity $c6 octave 4 @@ -274,9 +270,8 @@ Music_Route37_branch_eea24: ; eea24 intensity $c2 note F#, 2 loopchannel 0, Music_Route37_branch_eea24 -; eeab7 -Music_Route37_branch_eeab7: ; eeab7 +Music_Route37_branch_eeab7: intensity $c7 octave 3 note F#, 4 @@ -289,17 +284,16 @@ Music_Route37_branch_eeab7: ; eeab7 note F#, 2 note B_, 2 endchannel -; eeac7 -Music_Route37_Ch3: ; eeac7 +Music_Route37_Ch3: stereopanning $f0 notetype $c, $14 -Music_Route37_branch_eeacc: ; eeacc +Music_Route37_branch_eeacc: octave 2 note F#, 2 note __, 6 loopchannel 4, Music_Route37_branch_eeacc -Music_Route37_branch_eead3: ; eead3 +Music_Route37_branch_eead3: callchannel Music_Route37_branch_eeb32 note A_, 2 octave 3 @@ -311,7 +305,7 @@ Music_Route37_branch_eead3: ; eead3 note A_, 2 note F#, 2 note E_, 2 -Music_Route37_branch_eeae0: ; eeae0 +Music_Route37_branch_eeae0: note D#, 2 note F#, 2 loopchannel 4, Music_Route37_branch_eeae0 @@ -330,13 +324,13 @@ Music_Route37_branch_eeae0: ; eeae0 octave 2 note A_, 2 callchannel Music_Route37_branch_eeb32 -Music_Route37_branch_eeafb: ; eeafb +Music_Route37_branch_eeafb: octave 2 note B_, 2 octave 3 note D#, 2 loopchannel 4, Music_Route37_branch_eeafb -Music_Route37_branch_eeb03: ; eeb03 +Music_Route37_branch_eeb03: octave 2 note A_, 2 octave 3 @@ -345,13 +339,13 @@ Music_Route37_branch_eeb03: ; eeb03 note E_, 2 note C#, 2 callchannel Music_Route37_branch_eeb3c -Music_Route37_branch_eeb10: ; eeb10 +Music_Route37_branch_eeb10: octave 2 note B_, 2 octave 3 note F#, 2 loopchannel 4, Music_Route37_branch_eeb10 -Music_Route37_branch_eeb18: ; eeb18 +Music_Route37_branch_eeb18: octave 2 note A_, 2 octave 3 @@ -361,14 +355,13 @@ Music_Route37_branch_eeb18: ; eeb18 note C#, 2 callchannel Music_Route37_branch_eeb3c callchannel Music_Route37_branch_eeb32 -Music_Route37_branch_eeb28: ; eeb28 +Music_Route37_branch_eeb28: note F#, 2 note __, 6 loopchannel 4, Music_Route37_branch_eeb28 loopchannel 0, Music_Route37_branch_eead3 -; eeb32 -Music_Route37_branch_eeb32: ; eeb32 +Music_Route37_branch_eeb32: octave 2 note F#, 2 note B_, 2 @@ -379,9 +372,8 @@ Music_Route37_branch_eeb32: ; eeb32 note F#, 2 note B_, 2 endchannel -; eeb3c -Music_Route37_branch_eeb3c: ; eeb3c +Music_Route37_branch_eeb3c: octave 2 note B_, 2 octave 3 @@ -399,12 +391,11 @@ Music_Route37_branch_eeb3c: ; eeb3c octave 3 note D#, 2 endchannel -; eeb4d -Music_Route37_Ch4: ; eeb4d +Music_Route37_Ch4: stereopanning $f togglenoise $0 -Music_Route37_branch_eeb51: ; eeb51 +Music_Route37_branch_eeb51: notetype $c callchannel Music_Route37_branch_eeb6b note D_, 1 @@ -422,9 +413,8 @@ Music_Route37_branch_eeb51: ; eeb51 note D_, 1 note D_, 1 loopchannel 0, Music_Route37_branch_eeb51 -; eeb6b -Music_Route37_branch_eeb6b: ; eeb6b +Music_Route37_branch_eeb6b: note D_, 2 note D#, 1 note D#, 1 @@ -435,4 +425,3 @@ Music_Route37_branch_eeb6b: ; eeb6b note D#, 1 note D#, 1 endchannel -; eeb75 diff --git a/audio/music/ruinsofalphinterior.asm b/audio/music/ruinsofalphinterior.asm index 7d7ff5bc94e..f353b63a2d5 100644 --- a/audio/music/ruinsofalphinterior.asm +++ b/audio/music/ruinsofalphinterior.asm @@ -1,10 +1,9 @@ -Music_RuinsOfAlphInterior: ; ebd9e +Music_RuinsOfAlphInterior: musicheader 3, 1, Music_RuinsOfAlphInterior_Ch1 musicheader 1, 2, Music_RuinsOfAlphInterior_Ch2 musicheader 1, 3, Music_RuinsOfAlphInterior_Ch3 -; ebda7 -Music_RuinsOfAlphInterior_Ch1: ; ebda7 +Music_RuinsOfAlphInterior_Ch1: tempo 224 volume $77 dutycycle $0 @@ -12,14 +11,13 @@ Music_RuinsOfAlphInterior_Ch1: ; ebda7 notetype $c, $44 note __, 1 loopchannel 0, Music_RuinsOfAlphInterior_branch_ebdc2 -; ebdb8 -Music_RuinsOfAlphInterior_Ch2: ; ebdb8 +Music_RuinsOfAlphInterior_Ch2: tone $0002 dutycycle $0 stereopanning $f notetype $c, $a4 -Music_RuinsOfAlphInterior_branch_ebdc2: ; ebdc2 +Music_RuinsOfAlphInterior_branch_ebdc2: octave 4 note C_, 4 octave 3 @@ -35,11 +33,10 @@ Music_RuinsOfAlphInterior_branch_ebdc2: ; ebdc2 octave 3 note A#, 4 loopchannel 0, Music_RuinsOfAlphInterior_branch_ebdc2 -; ebdd4 -Music_RuinsOfAlphInterior_Ch3: ; ebdd4 +Music_RuinsOfAlphInterior_Ch3: notetype $c, $10 -Music_RuinsOfAlphInterior_branch_ebdd7: ; ebdd7 +Music_RuinsOfAlphInterior_branch_ebdd7: octave 2 note G#, 2 octave 3 @@ -47,4 +44,3 @@ Music_RuinsOfAlphInterior_branch_ebdd7: ; ebdd7 note E_, 2 note __, 10 loopchannel 0, Music_RuinsOfAlphInterior_branch_ebdd7 -; ebde1 diff --git a/audio/music/ruinsofalphradio.asm b/audio/music/ruinsofalphradio.asm index 73ce53c7573..5584b279acd 100644 --- a/audio/music/ruinsofalphradio.asm +++ b/audio/music/ruinsofalphradio.asm @@ -1,17 +1,16 @@ -Music_RuinsOfAlphRadio: ; eedcb +Music_RuinsOfAlphRadio: musicheader 3, 1, Music_RuinsOfAlphRadio_Ch1 musicheader 1, 2, Music_RuinsOfAlphRadio_Ch2 musicheader 1, 3, Music_RuinsOfAlphRadio_Ch3 -; eedd4 -Music_RuinsOfAlphRadio_Ch1: ; eedd4 +Music_RuinsOfAlphRadio_Ch1: tempo 160 volume $77 dutycycle $0 tone $0118 vibrato $0, $f0 stereopanning $f0 -Music_RuinsOfAlphRadio_branch_eede3: ; eede3 +Music_RuinsOfAlphRadio_branch_eede3: notetype $6, $71 callchannel Music_RuinsOfAlphRadio_branch_eee01 notetype $c, $a1 @@ -25,9 +24,8 @@ Music_RuinsOfAlphRadio_branch_eede3: ; eede3 notetype $c, $a1 note __, 16 loopchannel 0, Music_RuinsOfAlphRadio_branch_eede3 -; eee01 -Music_RuinsOfAlphRadio_branch_eee01: ; eee01 +Music_RuinsOfAlphRadio_branch_eee01: octave 4 note G_, 1 note F#, 1 @@ -35,9 +33,8 @@ Music_RuinsOfAlphRadio_branch_eee01: ; eee01 note F#, 1 note C_, 8 endchannel -; eee08 -Music_RuinsOfAlphRadio_branch_eee08: ; eee08 +Music_RuinsOfAlphRadio_branch_eee08: octave 4 note G_, 1 note F#, 1 @@ -48,12 +45,11 @@ Music_RuinsOfAlphRadio_branch_eee08: ; eee08 octave 5 note C_, 8 endchannel -; eee12 -Music_RuinsOfAlphRadio_Ch2: ; eee12 +Music_RuinsOfAlphRadio_Ch2: dutycycle $1 vibrato $1, $e0 -Music_RuinsOfAlphRadio_branch_eee17: ; eee17 +Music_RuinsOfAlphRadio_branch_eee17: stereopanning $f notetype $6, $81 callchannel Music_RuinsOfAlphRadio_branch_eee01 @@ -65,15 +61,13 @@ Music_RuinsOfAlphRadio_branch_eee17: ; eee17 notetype $c, $a1 note __, 16 loopchannel 0, Music_RuinsOfAlphRadio_branch_eee17 -; eee32 -Music_RuinsOfAlphRadio_Ch3: ; eee32 +Music_RuinsOfAlphRadio_Ch3: notetype $6, $26 -Music_RuinsOfAlphRadio_branch_eee35: ; eee35 +Music_RuinsOfAlphRadio_branch_eee35: octave 2 note C_, 1 note C#, 1 note C_, 1 note __, 16 loopchannel 0, Music_RuinsOfAlphRadio_branch_eee35 -; eee3e diff --git a/audio/music/showmearound.asm b/audio/music/showmearound.asm index f0bed8ef19c..344b8fe3ad8 100644 --- a/audio/music/showmearound.asm +++ b/audio/music/showmearound.asm @@ -1,11 +1,10 @@ -Music_ShowMeAround: ; edbd8 +Music_ShowMeAround: musicheader 4, 1, Music_ShowMeAround_Ch1 musicheader 1, 2, Music_ShowMeAround_Ch2 musicheader 1, 3, Music_ShowMeAround_Ch3 musicheader 1, 4, Music_ShowMeAround_Ch4 -; edbe4 -Music_ShowMeAround_Ch1: ; edbe4 +Music_ShowMeAround_Ch1: tempo 144 volume $77 stereopanning $f @@ -28,7 +27,7 @@ Music_ShowMeAround_Ch1: ; edbe4 note D_, 1 note E_, 1 note G#, 8 -Music_ShowMeAround_branch_edc01: ; edc01 +Music_ShowMeAround_branch_edc01: note __, 16 note __, 16 note __, 16 @@ -38,9 +37,8 @@ Music_ShowMeAround_branch_edc01: ; edc01 callchannel Music_ShowMeAround_branch_edc98 callchannel Music_ShowMeAround_branch_edc15 loopchannel 0, Music_ShowMeAround_branch_edc01 -; edc15 -Music_ShowMeAround_branch_edc15: ; edc15 +Music_ShowMeAround_branch_edc15: note __, 4 octave 3 note C#, 1 @@ -62,9 +60,8 @@ Music_ShowMeAround_branch_edc15: ; edc15 note E_, 1 note __, 3 endchannel -; edc2a -Music_ShowMeAround_Ch2: ; edc2a +Music_ShowMeAround_Ch2: stereopanning $ff dutycycle $2 notetype $c, $b1 @@ -86,7 +83,7 @@ Music_ShowMeAround_Ch2: ; edc2a note D_, 1 note E_, 8 dutycycle $1 -Music_ShowMeAround_branch_edc44: ; edc44 +Music_ShowMeAround_branch_edc44: callchannel Music_ShowMeAround_branch_edc98 callchannel Music_ShowMeAround_branch_edc98 callchannel Music_ShowMeAround_branch_edc86 @@ -138,9 +135,8 @@ Music_ShowMeAround_branch_edc44: ; edc44 note A_, 2 note A_, 4 loopchannel 0, Music_ShowMeAround_branch_edc44 -; edc86 -Music_ShowMeAround_branch_edc86: ; edc86 +Music_ShowMeAround_branch_edc86: octave 3 note A_, 2 octave 4 @@ -149,9 +145,8 @@ Music_ShowMeAround_branch_edc86: ; edc86 note D_, 2 note F#, 2 endchannel -; edc8e -Music_ShowMeAround_branch_edc8e: ; edc8e +Music_ShowMeAround_branch_edc8e: octave 5 note C#, 2 octave 4 @@ -162,9 +157,8 @@ Music_ShowMeAround_branch_edc8e: ; edc8e octave 4 note A_, 2 endchannel -; edc98 -Music_ShowMeAround_branch_edc98: ; edc98 +Music_ShowMeAround_branch_edc98: note __, 4 octave 3 note C#, 1 @@ -182,9 +176,8 @@ Music_ShowMeAround_branch_edc98: ; edc98 note B_, 1 note __, 1 endchannel -; edca9 -Music_ShowMeAround_Ch3: ; edca9 +Music_ShowMeAround_Ch3: stereopanning $f0 vibrato $10, $22 notetype $6, $25 @@ -226,7 +219,7 @@ Music_ShowMeAround_Ch3: ; edca9 note F_, 1 note E_, 2 intensity $14 -Music_ShowMeAround_branch_edcd9: ; edcd9 +Music_ShowMeAround_branch_edcd9: callchannel Music_ShowMeAround_branch_edcef callchannel Music_ShowMeAround_branch_edcef callchannel Music_ShowMeAround_branch_edcef @@ -234,9 +227,8 @@ Music_ShowMeAround_branch_edcd9: ; edcd9 callchannel Music_ShowMeAround_branch_edcef callchannel Music_ShowMeAround_branch_edd0f loopchannel 0, Music_ShowMeAround_branch_edcd9 -; edcef -Music_ShowMeAround_branch_edcef: ; edcef +Music_ShowMeAround_branch_edcef: octave 2 note A_, 2 note __, 6 @@ -269,9 +261,8 @@ Music_ShowMeAround_branch_edcef: ; edcef note D_, 2 note __, 2 endchannel -; edd0f -Music_ShowMeAround_branch_edd0f: ; edd0f +Music_ShowMeAround_branch_edd0f: octave 2 note A_, 2 note __, 6 @@ -305,9 +296,8 @@ Music_ShowMeAround_branch_edd0f: ; edd0f note A_, 2 note __, 6 endchannel -; edd30 -Music_ShowMeAround_Ch4: ; edd30 +Music_ShowMeAround_Ch4: togglenoise $3 notetype $c note __, 16 @@ -315,7 +305,7 @@ Music_ShowMeAround_Ch4: ; edd30 note D_, 2 note D#, 2 note F#, 4 -Music_ShowMeAround_branch_edd39: ; edd39 +Music_ShowMeAround_branch_edd39: callchannel Music_ShowMeAround_branch_edd4f callchannel Music_ShowMeAround_branch_edd4f callchannel Music_ShowMeAround_branch_edd4f @@ -323,9 +313,8 @@ Music_ShowMeAround_branch_edd39: ; edd39 callchannel Music_ShowMeAround_branch_edd4f callchannel Music_ShowMeAround_branch_edd5e loopchannel 0, Music_ShowMeAround_branch_edd39 -; edd4f -Music_ShowMeAround_branch_edd4f: ; edd4f +Music_ShowMeAround_branch_edd4f: note D#, 2 note F#, 2 note D_, 2 @@ -341,9 +330,8 @@ Music_ShowMeAround_branch_edd4f: ; edd4f note D_, 2 note D#, 2 endchannel -; edd5e -Music_ShowMeAround_branch_edd5e: ; edd5e +Music_ShowMeAround_branch_edd5e: note D#, 2 note F#, 2 note D_, 2 @@ -359,4 +347,3 @@ Music_ShowMeAround_branch_edd5e: ; edd5e note D_, 2 note F#, 2 endchannel -; edd6d diff --git a/audio/music/sprouttower.asm b/audio/music/sprouttower.asm index 60ceb350aca..d44de631007 100644 --- a/audio/music/sprouttower.asm +++ b/audio/music/sprouttower.asm @@ -1,11 +1,10 @@ -Music_SproutTower: ; f6974 +Music_SproutTower: musicheader 4, 1, Music_SproutTower_Ch1 musicheader 1, 2, Music_SproutTower_Ch2 musicheader 1, 3, Music_SproutTower_Ch3 musicheader 1, 4, Music_SproutTower_Ch4 -; f6980 -Music_SproutTower_Ch1: ; f6980 +Music_SproutTower_Ch1: tempo 176 volume $77 dutycycle $3 @@ -15,7 +14,7 @@ Music_SproutTower_Ch1: ; f6980 notetype $c, $a3 note __, 16 note __, 16 -Music_SproutTower_branch_f6994: ; f6994 +Music_SproutTower_branch_f6994: note __, 6 octave 3 note F_, 2 @@ -61,9 +60,8 @@ Music_SproutTower_branch_f6994: ; f6994 note D#, 4 note D#, 4 loopchannel 0, Music_SproutTower_branch_f6994 -; f69c8 -Music_SproutTower_Ch2: ; f69c8 +Music_SproutTower_Ch2: dutycycle $3 tone $0001 vibrato $8, $48 @@ -77,7 +75,7 @@ Music_SproutTower_Ch2: ; f69c8 note F_, 4 note D#, 4 note D#, 4 -Music_SproutTower_branch_f69dc: ; f69dc +Music_SproutTower_branch_f69dc: intensity $b5 octave 4 note C_, 4 @@ -139,9 +137,8 @@ Music_SproutTower_branch_f69dc: ; f69dc note C_, 16 note __, 16 loopchannel 0, Music_SproutTower_branch_f69dc -; f6a25 -Music_SproutTower_Ch3: ; f6a25 +Music_SproutTower_Ch3: vibrato $14, $e8 notetype $c, $14 octave 3 @@ -162,7 +159,7 @@ Music_SproutTower_Ch3: ; f6a25 note __, 2 note F#, 2 stereopanning $f0 -Music_SproutTower_branch_f6a3e: ; f6a3e +Music_SproutTower_branch_f6a3e: note __, 4 note C_, 2 note F_, 2 @@ -220,13 +217,12 @@ Music_SproutTower_branch_f6a3e: ; f6a3e note __, 2 note F_, 2 loopchannel 0, Music_SproutTower_branch_f6a3e -; f6a7a -Music_SproutTower_Ch4: ; f6a7a +Music_SproutTower_Ch4: togglenoise $0 notetype $c note __, 4 -Music_SproutTower_branch_f6a7f: ; f6a7f +Music_SproutTower_branch_f6a7f: note F#, 4 stereopanning $f0 note D#, 4 @@ -244,4 +240,3 @@ Music_SproutTower_branch_f6a7f: ; f6a7f stereopanning $ff note F#, 4 loopchannel 0, Music_SproutTower_branch_f6a7f -; f6a99 diff --git a/audio/music/ssaqua.asm b/audio/music/ssaqua.asm index 94570eccff3..5b06b27b86a 100644 --- a/audio/music/ssaqua.asm +++ b/audio/music/ssaqua.asm @@ -1,11 +1,10 @@ -Music_SSAqua: ; ead99 +Music_SSAqua: musicheader 4, 1, Music_SSAqua_Ch1 musicheader 1, 2, Music_SSAqua_Ch2 musicheader 1, 3, Music_SSAqua_Ch3 musicheader 1, 4, Music_SSAqua_Ch4 -; eada5 -Music_SSAqua_Ch1: ; eada5 +Music_SSAqua_Ch1: tempo 117 volume $77 stereopanning $f @@ -18,7 +17,7 @@ Music_SSAqua_Ch1: ; eada5 note __, 1 note G_, 1 note __, 1 -Music_SSAqua_branch_eadbc: ; eadbc +Music_SSAqua_branch_eadbc: octave 2 note G_, 16 note __, 8 @@ -248,15 +247,14 @@ Music_SSAqua_branch_eadbc: ; eadbc note F#, 2 note A_, 2 loopchannel 0, Music_SSAqua_branch_eadbc -; eaeca -Music_SSAqua_Ch2: ; eaeca +Music_SSAqua_Ch2: stereopanning $f0 dutycycle $2 vibrato $8, $33 notetype $c, $b7 note __, 2 -Music_SSAqua_branch_eaed5: ; eaed5 +Music_SSAqua_branch_eaed5: notetype $c, $b7 dutycycle $1 intensity $61 @@ -392,9 +390,8 @@ Music_SSAqua_branch_eaed5: ; eaed5 note A_, 8 note __, 8 loopchannel 0, Music_SSAqua_branch_eaed5 -; eaf88 -Music_SSAqua_branch_eaf88: ; eaf88 +Music_SSAqua_branch_eaf88: note D_, 6 octave 3 note B_, 1 @@ -468,9 +465,8 @@ Music_SSAqua_branch_eaf88: ; eaf88 note E_, 2 note F#, 2 endchannel -; eafd5 -Music_SSAqua_branch_eafd5: ; eafd5 +Music_SSAqua_branch_eafd5: notetype $c, $b7 note B_, 10 note F#, 1 @@ -480,9 +476,8 @@ Music_SSAqua_branch_eafd5: ; eafd5 note F#, 1 note __, 1 endchannel -; eafe0 -Music_SSAqua_branch_eafe0: ; eafe0 +Music_SSAqua_branch_eafe0: octave 3 note D_, 10 note E_, 1 @@ -504,9 +499,8 @@ Music_SSAqua_branch_eafe0: ; eafe0 note A_, 1 note __, 1 endchannel -; eaff5 -Music_SSAqua_branch_eaff5: ; eaff5 +Music_SSAqua_branch_eaff5: octave 5 note G_, 1 note D_, 1 @@ -580,9 +574,8 @@ Music_SSAqua_branch_eaff5: ; eaff5 note A_, 1 note G_, 1 endchannel -; eb03e -Music_SSAqua_branch_eb03e: ; eb03e +Music_SSAqua_branch_eb03e: octave 5 note G_, 1 octave 4 @@ -607,9 +600,8 @@ Music_SSAqua_branch_eb03e: ; eb03e octave 3 note G_, 1 endchannel -; eb056 -Music_SSAqua_Ch3: ; eb056 +Music_SSAqua_Ch3: stereopanning $ff vibrato $8, $34 notetype $6, $15 @@ -618,7 +610,7 @@ Music_SSAqua_Ch3: ; eb056 note __, 1 note G_, 1 note __, 1 -Music_SSAqua_branch_eb063: ; eb063 +Music_SSAqua_branch_eb063: note G_, 16 note __, 8 note G_, 2 @@ -651,7 +643,7 @@ Music_SSAqua_branch_eb063: ; eb063 note E_, 1 callchannel Music_SSAqua_branch_eb14d callchannel Music_SSAqua_branch_eb14d -Music_SSAqua_branch_eb08d: ; eb08d +Music_SSAqua_branch_eb08d: note G_, 2 note __, 2 octave 3 @@ -830,9 +822,8 @@ Music_SSAqua_branch_eb08d: ; eb08d note G_, 1 note __, 1 loopchannel 0, Music_SSAqua_branch_eb063 -; eb14d -Music_SSAqua_branch_eb14d: ; eb14d +Music_SSAqua_branch_eb14d: notetype $6, $15 octave 2 note G_, 2 @@ -868,9 +859,8 @@ Music_SSAqua_branch_eb14d: ; eb14d note G_, 1 note __, 1 endchannel -; eb172 -Music_SSAqua_branch_eb172: ; eb172 +Music_SSAqua_branch_eb172: octave 2 note G_, 2 note __, 2 @@ -1061,9 +1051,8 @@ Music_SSAqua_branch_eb172: ; eb172 note F#, 1 note __, 3 endchannel -; eb230 -Music_SSAqua_branch_eb230: ; eb230 +Music_SSAqua_branch_eb230: octave 2 note B_, 2 note __, 2 @@ -1089,13 +1078,12 @@ Music_SSAqua_branch_eb230: ; eb230 note D#, 1 note __, 3 endchannel -; eb249 -Music_SSAqua_Ch4: ; eb249 +Music_SSAqua_Ch4: togglenoise $3 notetype $c note __, 2 -Music_SSAqua_branch_eb24e: ; eb24e +Music_SSAqua_branch_eb24e: note G#, 1 note G_, 1 note G_, 1 @@ -1138,9 +1126,8 @@ Music_SSAqua_branch_eb24e: ; eb24e callchannel Music_SSAqua_branch_eb2ae callchannel Music_SSAqua_branch_eb2c7 loopchannel 0, Music_SSAqua_branch_eb24e -; eb2ae -Music_SSAqua_branch_eb2ae: ; eb2ae +Music_SSAqua_branch_eb2ae: note A#, 2 note G_, 1 note G_, 1 @@ -1154,9 +1141,8 @@ Music_SSAqua_branch_eb2ae: ; eb2ae note G_, 1 note G_, 1 endchannel -; eb2bb -Music_SSAqua_branch_eb2bb: ; eb2bb +Music_SSAqua_branch_eb2bb: note A#, 2 note G_, 1 note G_, 1 @@ -1169,9 +1155,8 @@ Music_SSAqua_branch_eb2bb: ; eb2bb note D_, 2 note F#, 2 endchannel -; eb2c7 -Music_SSAqua_branch_eb2c7: ; eb2c7 +Music_SSAqua_branch_eb2c7: note A#, 2 note G_, 1 note G_, 1 @@ -1184,4 +1169,3 @@ Music_SSAqua_branch_eb2c7: ; eb2c7 note D_, 2 note C_, 2 endchannel -; eb2d3 diff --git a/audio/music/successfulcapture.asm b/audio/music/successfulcapture.asm index 3bdb8c9ae2b..1b53f4a1a7d 100644 --- a/audio/music/successfulcapture.asm +++ b/audio/music/successfulcapture.asm @@ -1,26 +1,22 @@ -Music_SuccessfulCapture: ; f4602 +Music_SuccessfulCapture: musicheader 3, 1, Music_SuccessfulCapture_Ch1 musicheader 1, 2, Music_SuccessfulCapture_Ch2 musicheader 1, 3, Music_SuccessfulCapture_Ch3 -; f460b -Music_SuccessfulCapture_Ch1: ; f460b +Music_SuccessfulCapture_Ch1: tempo 126 volume $77 dutycycle $3 tone $0001 notetype $c, $a1 jumpchannel Music_SuccessfulCapture_branch_f4536 -; f461b -Music_SuccessfulCapture_Ch2: ; f461b +Music_SuccessfulCapture_Ch2: vibrato $12, $24 notetype $c, $c1 dutycycle $2 jumpchannel Music_SuccessfulCapture_branch_f4585 -; f4626 -Music_SuccessfulCapture_Ch3: ; f4626 +Music_SuccessfulCapture_Ch3: notetype $c, $25 jumpchannel Music_SuccessfulCapture_branch_f45cf -; f462c diff --git a/audio/music/suicunebattle.asm b/audio/music/suicunebattle.asm index a5819181fbc..189e6b18644 100644 --- a/audio/music/suicunebattle.asm +++ b/audio/music/suicunebattle.asm @@ -1,10 +1,9 @@ -Music_SuicuneBattle: ; 178b81 +Music_SuicuneBattle: musicheader 3, 1, Music_SuicuneBattle_Ch1 musicheader 1, 2, Music_SuicuneBattle_Ch2 musicheader 1, 3, Music_SuicuneBattle_Ch3 -; 178b8a -Music_SuicuneBattle_Ch1: ; 178b8a +Music_SuicuneBattle_Ch1: tempo 101 volume $77 dutycycle $3 @@ -95,7 +94,7 @@ Music_SuicuneBattle_Ch1: ; 178b8a octave 3 note E_, 1 note G#, 1 -Music_SuicuneBattle_branch_178bfc: ; 178bfc +Music_SuicuneBattle_branch_178bfc: notetype $c, $b4 octave 2 note A_, 2 @@ -511,9 +510,8 @@ Music_SuicuneBattle_branch_178bfc: ; 178bfc vibrato $12, $15 dutycycle $3 loopchannel 0, Music_SuicuneBattle_branch_178bfc -; 178dec -Music_SuicuneBattle_Ch2: ; 178dec +Music_SuicuneBattle_Ch2: dutycycle $3 vibrato $14, $34 tone $0001 @@ -591,7 +589,7 @@ Music_SuicuneBattle_Ch2: ; 178dec note E_, 8 note E_, 8 note E_, 4 -Music_SuicuneBattle_branch_178e4e: ; 178e4e +Music_SuicuneBattle_branch_178e4e: notetype $c, $c7 octave 3 note A_, 8 @@ -1187,9 +1185,8 @@ Music_SuicuneBattle_branch_178e4e: ; 178e4e note A_, 2 note B_, 2 loopchannel 0, Music_SuicuneBattle_branch_178e4e -; 179122 -Music_SuicuneBattle_Ch3: ; 179122 +Music_SuicuneBattle_Ch3: notetype $c, $18 note __, 16 note __, 4 @@ -1282,7 +1279,7 @@ Music_SuicuneBattle_Ch3: ; 179122 note D_, 2 note E_, 2 notetype $c, $16 -Music_SuicuneBattle_branch_179182: ; 179182 +Music_SuicuneBattle_branch_179182: octave 1 note A_, 2 octave 2 @@ -2057,4 +2054,3 @@ Music_SuicuneBattle_branch_179182: ; 179182 note D_, 2 note E_, 2 loopchannel 0, Music_SuicuneBattle_branch_179182 -; 17948b diff --git a/audio/music/surf.asm b/audio/music/surf.asm index 8a04945d9f5..c3948f5f791 100644 --- a/audio/music/surf.asm +++ b/audio/music/surf.asm @@ -1,17 +1,16 @@ -Music_Surf: ; f518a +Music_Surf: musicheader 3, 1, Music_Surf_Ch1 musicheader 1, 2, Music_Surf_Ch2 musicheader 1, 3, Music_Surf_Ch3 -; f5193 db $3 -Music_Surf_Ch1: ; f5194 +Music_Surf_Ch1: tempo 108 volume $77 notetype $c, $a7 stereopanning $f -Music_Surf_branch_f519e: ; f519e +Music_Surf_branch_f519e: dutycycle $2 vibrato $10, $24 intensity $73 @@ -119,9 +118,8 @@ Music_Surf_branch_f519e: ; f519e octave 3 note D#, 2 loopchannel 0, Music_Surf_branch_f519e -; f5233 -Music_Surf_branch_f5233: ; f5233 +Music_Surf_branch_f5233: notetype $c, $a7 octave 3 note D#, 4 @@ -214,9 +212,8 @@ Music_Surf_branch_f5233: ; f5233 note C#, 4 note D_, 4 endchannel -; f5293 -Music_Surf_branch_f5293: ; f5293 +Music_Surf_branch_f5293: octave 4 note G#, 16 note D#, 4 @@ -281,9 +278,8 @@ Music_Surf_branch_f5293: ; f5293 octave 3 note G_, 2 endchannel -; f52d9 -Music_Surf_branch_f52d9: ; f52d9 +Music_Surf_branch_f52d9: octave 3 note A#, 3 note G_, 3 @@ -341,15 +337,14 @@ Music_Surf_branch_f52d9: ; f52d9 octave 2 note B_, 8 endchannel -; f5317 -Music_Surf_Ch2: ; f5317 -Music_Surf_branch_f5317: ; f5317 +Music_Surf_Ch2: +Music_Surf_branch_f5317: notetype $c, $c2 stereopanning $f0 dutycycle $2 vibrato $14, $23 -Music_Surf_branch_f5321: ; f5321 +Music_Surf_branch_f5321: octave 1 note A#, 4 octave 2 @@ -365,7 +360,7 @@ Music_Surf_branch_f5321: ; f5321 note __, 3 note A#, 1 note __, 3 -Music_Surf_branch_f5333: ; f5333 +Music_Surf_branch_f5333: note D#, 4 note G_, 2 note G#, 2 @@ -448,9 +443,8 @@ Music_Surf_branch_f5333: ; f5333 note A#, 4 note B_, 4 loopchannel 0, Music_Surf_branch_f5317 -; f53b2 -Music_Surf_branch_f53b2: ; f53b2 +Music_Surf_branch_f53b2: octave 1 note G#, 4 octave 3 @@ -487,9 +481,8 @@ Music_Surf_branch_f53b2: ; f53b2 note F_, 4 note G_, 4 endchannel -; f53d6 -Music_Surf_branch_f53d6: ; f53d6 +Music_Surf_branch_f53d6: octave 4 note F_, 4 note D#, 4 @@ -507,9 +500,8 @@ Music_Surf_branch_f53d6: ; f53d6 note B_, 1 note A_, 1 endchannel -; f53e8 -Music_Surf_branch_f53e8: ; f53e8 +Music_Surf_branch_f53e8: note A#, 7 octave 4 note C_, 8 @@ -521,9 +513,8 @@ Music_Surf_branch_f53e8: ; f53e8 note C_, 16 note G_, 8 endchannel -; f53f3 -Music_Surf_branch_f53f3: ; f53f3 +Music_Surf_branch_f53f3: note F#, 1 note G_, 3 note F_, 4 @@ -540,9 +531,8 @@ Music_Surf_branch_f53f3: ; f53f3 octave 3 note B_, 1 endchannel -; f5404 -Music_Surf_branch_f5404: ; f5404 +Music_Surf_branch_f5404: octave 4 note C_, 8 note G_, 4 @@ -551,10 +541,9 @@ Music_Surf_branch_f5404: ; f5404 note G#, 8 note D#, 8 endchannel -; f540c -Music_Surf_Ch3: ; f540c -Music_Surf_branch_f540c: ; f540c +Music_Surf_Ch3: +Music_Surf_branch_f540c: stereopanning $ff notetype $c, $15 vibrato $16, $23 @@ -697,9 +686,8 @@ Music_Surf_branch_f540c: ; f540c octave 2 note B_, 4 loopchannel 0, Music_Surf_branch_f540c -; f54c8 -Music_Surf_branch_f54c8: ; f54c8 +Music_Surf_branch_f54c8: octave 3 note D#, 4 note G_, 1 @@ -732,4 +720,3 @@ Music_Surf_branch_f54c8: ; f54c8 note G#, 1 note __, 3 endchannel -; f54e8 diff --git a/audio/music/tintower.asm b/audio/music/tintower.asm index 2c9dd12e038..3871f4eea41 100644 --- a/audio/music/tintower.asm +++ b/audio/music/tintower.asm @@ -1,17 +1,16 @@ -Music_TinTower: ; f6811 +Music_TinTower: musicheader 4, 1, Music_TinTower_Ch1 musicheader 1, 2, Music_TinTower_Ch2 musicheader 1, 3, Music_TinTower_Ch3 musicheader 1, 4, Music_TinTower_Ch4 -; f681d -Music_TinTower_Ch1: ; f681d +Music_TinTower_Ch1: tempo 208 volume $77 dutycycle $3 tone $0004 vibrato $8, $45 -Music_TinTower_branch_f682a: ; f682a +Music_TinTower_branch_f682a: stereopanning $f0 notetype $c, $a5 octave 3 @@ -95,15 +94,14 @@ Music_TinTower_branch_f682a: ; f682a octave 3 note A#, 4 loopchannel 0, Music_TinTower_branch_f682a -; f688b -Music_TinTower_Ch2: ; f688b +Music_TinTower_Ch2: dutycycle $3 tone $0002 vibrato $18, $44 -Music_TinTower_branch_f6893: ; f6893 +Music_TinTower_branch_f6893: stereopanning $ff -Music_TinTower_branch_f6895: ; f6895 +Music_TinTower_branch_f6895: notetype $c, $b5 octave 4 note C_, 4 @@ -185,11 +183,10 @@ Music_TinTower_branch_f6895: ; f6895 intensity $95 note C#, 2 loopchannel 0, Music_TinTower_branch_f6893 -; f68f8 -Music_TinTower_Ch3: ; f68f8 +Music_TinTower_Ch3: notetype $c, $14 -Music_TinTower_branch_f68fb: ; f68fb +Music_TinTower_branch_f68fb: note __, 16 note __, 16 note __, 16 @@ -260,12 +257,11 @@ Music_TinTower_branch_f68fb: ; f68fb note __, 11 stereopanning $ff loopchannel 0, Music_TinTower_branch_f68fb -; f6948 -Music_TinTower_Ch4: ; f6948 +Music_TinTower_Ch4: togglenoise $0 notetype $c -Music_TinTower_branch_f694c: ; f694c +Music_TinTower_branch_f694c: stereopanning $f note G_, 2 stereopanning $f0 @@ -293,4 +289,3 @@ Music_TinTower_branch_f694c: ; f694c note G_, 2 note F_, 2 loopchannel 0, Music_TinTower_branch_f694c -; f6974 diff --git a/audio/music/titlescreen.asm b/audio/music/titlescreen.asm index 6e9c488a937..a59608a4b95 100644 --- a/audio/music/titlescreen.asm +++ b/audio/music/titlescreen.asm @@ -1,11 +1,10 @@ -Music_TitleScreen: ; eb808 +Music_TitleScreen: musicheader 4, 1, Music_TitleScreen_Ch1 musicheader 1, 2, Music_TitleScreen_Ch2 musicheader 1, 3, Music_TitleScreen_Ch3 musicheader 1, 4, Music_TitleScreen_Ch4 -; eb814 -Music_TitleScreen_Ch1: ; eb814 +Music_TitleScreen_Ch1: tempo 134 volume $77 dutycycle $3 @@ -272,12 +271,11 @@ Music_TitleScreen_Ch1: ; eb814 note G_, 1 note __, 11 endchannel -; eb96d -Music_TitleScreen_branch_eb96d: ; eb96d +Music_TitleScreen_branch_eb96d: notetype $c, $c3 note D_, 1 -Music_TitleScreen_branch_eb971: ; eb971 +Music_TitleScreen_branch_eb971: note __, 1 octave 2 note D_, 1 @@ -292,9 +290,8 @@ Music_TitleScreen_branch_eb971: ; eb971 note A_, 1 notetype $8, $b7 endchannel -; eb984 -Music_TitleScreen_Ch2: ; eb984 +Music_TitleScreen_Ch2: dutycycle $3 vibrato $14, $12 notetype $c, $c7 @@ -556,12 +553,11 @@ Music_TitleScreen_Ch2: ; eb984 note G_, 1 note __, 11 endchannel -; ebae7 -Music_TitleScreen_branch_ebae7: ; ebae7 +Music_TitleScreen_branch_ebae7: notetype $c, $b2 note D_, 1 -Music_TitleScreen_branch_ebaeb: ; ebaeb +Music_TitleScreen_branch_ebaeb: octave 3 note A_, 1 octave 4 @@ -579,9 +575,8 @@ Music_TitleScreen_branch_ebaeb: ; ebaeb note C_, 4 note C_, 4 endchannel -; ebb01 -Music_TitleScreen_Ch3: ; ebb01 +Music_TitleScreen_Ch3: stereopanning $f vibrato $10, $14 tone $0001 @@ -896,9 +891,8 @@ Music_TitleScreen_Ch3: ; ebb01 note G_, 1 note __, 11 endchannel -; ebc5c -Music_TitleScreen_Ch4: ; ebc5c +Music_TitleScreen_Ch4: togglenoise $5 stereopanning $f0 notetype $c @@ -1081,7 +1075,7 @@ Music_TitleScreen_Ch4: ; ebc5c note C#, 1 notetype $c note G#, 16 -Music_TitleScreen_branch_ebd40: ; ebd40 +Music_TitleScreen_branch_ebd40: note __, 16 loopchannel 6, Music_TitleScreen_branch_ebd40 note __, 12 @@ -1129,9 +1123,8 @@ Music_TitleScreen_branch_ebd40: ; ebd40 note C_, 4 note B_, 4 endchannel -; ebd77 -Music_TitleScreen_branch_ebd77: ; ebd77 +Music_TitleScreen_branch_ebd77: note C_, 2 note D#, 2 note C_, 2 @@ -1142,9 +1135,8 @@ Music_TitleScreen_branch_ebd77: ; ebd77 note C_, 2 note D#, 2 endchannel -; ebd81 -Music_TitleScreen_branch_ebd81: ; ebd81 +Music_TitleScreen_branch_ebd81: note C_, 2 note D#, 2 note C_, 2 @@ -1155,17 +1147,15 @@ Music_TitleScreen_branch_ebd81: ; ebd81 note C_, 2 note D#, 2 endchannel -; ebd8b -Music_TitleScreen_branch_ebd8b: ; ebd8b +Music_TitleScreen_branch_ebd8b: note C_, 2 note C_, 1 note C_, 1 loopchannel 4, Music_TitleScreen_branch_ebd8b endchannel -; ebd93 -Music_TitleScreen_branch_ebd93: ; ebd93 +Music_TitleScreen_branch_ebd93: note C_, 2 note C_, 1 note C_, 1 @@ -1176,4 +1166,3 @@ Music_TitleScreen_branch_ebd93: ; ebd93 note C_, 4 note C_, 4 endchannel -; ebd9e diff --git a/audio/music/trainervictory.asm b/audio/music/trainervictory.asm index fe7ffdd89f4..56b2d847b22 100644 --- a/audio/music/trainervictory.asm +++ b/audio/music/trainervictory.asm @@ -1,10 +1,9 @@ -Music_TrainerVictory: ; ebeab +Music_TrainerVictory: musicheader 3, 1, Music_TrainerVictory_Ch1 musicheader 1, 2, Music_TrainerVictory_Ch2 musicheader 1, 3, Music_TrainerVictory_Ch3 -; ebeb4 -Music_TrainerVictory_Ch1: ; ebeb4 +Music_TrainerVictory_Ch1: tempo 120 volume $77 dutycycle $2 @@ -20,7 +19,7 @@ Music_TrainerVictory_Ch1: ; ebeb4 intensity $b6 note A_, 12 stereopanning $f -Music_TrainerVictory_branch_ebecd: ; ebecd +Music_TrainerVictory_branch_ebecd: intensity $72 callchannel Music_TrainerVictory_branch_ebf11 intensity $51 @@ -48,7 +47,7 @@ Music_TrainerVictory_branch_ebecd: ; ebecd note __, 2 note G_, 2 note A#, 6 -Music_TrainerVictory_branch_ebef2: ; ebef2 +Music_TrainerVictory_branch_ebef2: intensity $72 octave 4 note D_, 2 @@ -60,7 +59,7 @@ Music_TrainerVictory_branch_ebef2: ; ebef2 note A_, 2 octave 4 note D_, 2 -Music_TrainerVictory_branch_ebf01: ; ebf01 +Music_TrainerVictory_branch_ebf01: octave 4 note C#, 2 octave 3 @@ -71,9 +70,8 @@ Music_TrainerVictory_branch_ebf01: ; ebf01 note F#, 2 note G_, 2 loopchannel 0, Music_TrainerVictory_branch_ebecd -; ebf11 -Music_TrainerVictory_branch_ebf11: ; ebf11 +Music_TrainerVictory_branch_ebf11: octave 3 note F#, 2 note __, 2 @@ -84,9 +82,8 @@ Music_TrainerVictory_branch_ebf11: ; ebf11 note E_, 2 note G_, 6 endchannel -; ebf1b -Music_TrainerVictory_Ch2: ; ebf1b +Music_TrainerVictory_Ch2: vibrato $12, $34 dutycycle $3 notetype $8, $d1 @@ -101,7 +98,7 @@ Music_TrainerVictory_Ch2: ; ebf1b intensity $d6 note D_, 12 stereopanning $f0 -Music_TrainerVictory_branch_ebf30: ; ebf30 +Music_TrainerVictory_branch_ebf30: notetype $8, $82 callchannel Music_TrainerVictory_branch_ebf56 note F#, 2 @@ -126,9 +123,8 @@ Music_TrainerVictory_branch_ebf30: ; ebf30 note F#, 16 note E_, 16 loopchannel 0, Music_TrainerVictory_branch_ebf30 -; ebf56 -Music_TrainerVictory_branch_ebf56: ; ebf56 +Music_TrainerVictory_branch_ebf56: octave 4 note D_, 2 note __, 2 @@ -143,9 +139,8 @@ Music_TrainerVictory_branch_ebf56: ; ebf56 octave 4 note E_, 6 endchannel -; ebf64 -Music_TrainerVictory_Ch3: ; ebf64 +Music_TrainerVictory_Ch3: notetype $8, $25 octave 3 note G_, 6 @@ -160,7 +155,7 @@ Music_TrainerVictory_Ch3: ; ebf64 note C#, 2 octave 2 note B_, 2 -Music_TrainerVictory_branch_ebf74: ; ebf74 +Music_TrainerVictory_branch_ebf74: callchannel Music_TrainerVictory_branch_ebfb1 octave 3 note C#, 2 @@ -212,9 +207,8 @@ Music_TrainerVictory_branch_ebf74: ; ebf74 note E_, 2 note C#, 2 loopchannel 0, Music_TrainerVictory_branch_ebf74 -; ebfb1 -Music_TrainerVictory_branch_ebfb1: ; ebfb1 +Music_TrainerVictory_branch_ebfb1: octave 2 note A_, 2 note __, 2 @@ -233,4 +227,3 @@ Music_TrainerVictory_branch_ebfb1: ; ebfb1 octave 2 note B_, 2 endchannel -; ebfc3 diff --git a/audio/music/unioncave.asm b/audio/music/unioncave.asm index 4f643026082..94c7aec6e32 100644 --- a/audio/music/unioncave.asm +++ b/audio/music/unioncave.asm @@ -1,23 +1,22 @@ -Music_UnionCave: ; f5c60 +Music_UnionCave: musicheader 4, 1, Music_UnionCave_Ch1 musicheader 1, 2, Music_UnionCave_Ch2 musicheader 1, 3, Music_UnionCave_Ch3 musicheader 1, 4, Music_UnionCave_Ch4 -; f5c6c -Music_UnionCave_Ch1: ; f5c6c +Music_UnionCave_Ch1: tempo 160 volume $77 dutycycle $1 tone $0002 vibrato $18, $34 stereopanning $f -Music_UnionCave_branch_f5c7b: ; f5c7b +Music_UnionCave_branch_f5c7b: notetype $c, $b3 -Music_UnionCave_branch_f5c7e: ; f5c7e +Music_UnionCave_branch_f5c7e: callchannel Music_UnionCave_branch_f5ccf loopchannel 4, Music_UnionCave_branch_f5c7e -Music_UnionCave_branch_f5c85: ; f5c85 +Music_UnionCave_branch_f5c85: octave 2 note G#, 2 octave 3 @@ -27,7 +26,7 @@ Music_UnionCave_branch_f5c85: ; f5c85 note E_, 2 note F_, 4 loopchannel 8, Music_UnionCave_branch_f5c85 -Music_UnionCave_branch_f5c91: ; f5c91 +Music_UnionCave_branch_f5c91: octave 2 note A_, 2 octave 3 @@ -64,21 +63,19 @@ Music_UnionCave_branch_f5c91: ; f5c91 callchannel Music_UnionCave_branch_f5ccf tone $0002 loopchannel 0, Music_UnionCave_branch_f5c7b -; f5ccf -Music_UnionCave_branch_f5ccf: ; f5ccf +Music_UnionCave_branch_f5ccf: octave 2 note G#, 2 octave 3 note C#, 2 note E_, 12 endchannel -; f5cd5 -Music_UnionCave_Ch2: ; f5cd5 +Music_UnionCave_Ch2: dutycycle $3 vibrato $8, $24 -Music_UnionCave_branch_f5cda: ; f5cda +Music_UnionCave_branch_f5cda: notetype $c, $c4 callchannel Music_UnionCave_branch_f5d34 intensity $c5 @@ -135,9 +132,8 @@ Music_UnionCave_branch_f5cda: ; f5cda callchannel Music_UnionCave_branch_f5d52 vibrato $8, $24 loopchannel 0, Music_UnionCave_branch_f5cda -; f5d34 -Music_UnionCave_branch_f5d34: ; f5d34 +Music_UnionCave_branch_f5d34: octave 4 note C_, 4 octave 3 @@ -168,27 +164,25 @@ Music_UnionCave_branch_f5d34: ; f5d34 note C#, 4 note C_, 4 endchannel -; f5d52 -Music_UnionCave_branch_f5d52: ; f5d52 +Music_UnionCave_branch_f5d52: octave 2 note G#, 2 octave 3 note C#, 2 note E_, 12 endchannel -; f5d58 -Music_UnionCave_Ch3: ; f5d58 +Music_UnionCave_Ch3: notetype $c, $16 stereopanning $f0 -Music_UnionCave_branch_f5d5d: ; f5d5d +Music_UnionCave_branch_f5d5d: note __, 16 loopchannel 7, Music_UnionCave_branch_f5d5d note __, 14 octave 4 note C_, 2 -Music_UnionCave_branch_f5d65: ; f5d65 +Music_UnionCave_branch_f5d65: note __, 2 octave 3 note E_, 2 @@ -200,7 +194,7 @@ Music_UnionCave_branch_f5d65: ; f5d65 octave 4 note C_, 2 loopchannel 4, Music_UnionCave_branch_f5d65 -Music_UnionCave_branch_f5d73: ; f5d73 +Music_UnionCave_branch_f5d73: note __, 2 octave 3 note F_, 2 @@ -224,7 +218,7 @@ Music_UnionCave_branch_f5d73: ; f5d73 octave 3 note B_, 8 note A#, 8 -Music_UnionCave_branch_f5d8d: ; f5d8d +Music_UnionCave_branch_f5d8d: note A_, 4 note G_, 4 note A#, 2 @@ -237,16 +231,15 @@ Music_UnionCave_branch_f5d8d: ; f5d8d note A_, 4 note G_, 4 note A#, 8 -Music_UnionCave_branch_f5d9c: ; f5d9c +Music_UnionCave_branch_f5d9c: note __, 16 loopchannel 4, Music_UnionCave_branch_f5d9c loopchannel 0, Music_UnionCave_branch_f5d5d -; f5da5 -Music_UnionCave_Ch4: ; f5da5 +Music_UnionCave_Ch4: togglenoise $1 notetype $c -Music_UnionCave_branch_f5da9: ; f5da9 +Music_UnionCave_branch_f5da9: stereopanning $f0 note E_, 4 stereopanning $ff @@ -263,4 +256,3 @@ Music_UnionCave_branch_f5da9: ; f5da9 note __, 8 loopchannel 0, Music_UnionCave_branch_f5da9 loopchannel 0, Music_UnionCave_branch_f5da9 ; unused -; f5dc5 diff --git a/audio/music/vermilioncity.asm b/audio/music/vermilioncity.asm index ac4fc3b6d10..ec88085e6b1 100644 --- a/audio/music/vermilioncity.asm +++ b/audio/music/vermilioncity.asm @@ -1,12 +1,11 @@ -Music_VermilionCity: ; eb676 +Music_VermilionCity: musicheader 3, 1, Music_VermilionCity_Ch1 musicheader 1, 2, Music_VermilionCity_Ch2 musicheader 1, 3, Music_VermilionCity_Ch3 -; eb67f db $3 -Music_VermilionCity_Ch1: ; eb680 +Music_VermilionCity_Ch1: stereopanning $f tempo 176 volume $77 @@ -30,7 +29,7 @@ Music_VermilionCity_Ch1: ; eb680 octave 5 note D_, 1 vibrato $10, $23 -Music_VermilionCity_branch_eb6a0: ; eb6a0 +Music_VermilionCity_branch_eb6a0: dutycycle $1 notetype $c, $85 callchannel Music_VermilionCity_branch_eb6f9 @@ -91,9 +90,8 @@ Music_VermilionCity_branch_eb6a0: ; eb6a0 octave 3 note D_, 4 loopchannel 0, Music_VermilionCity_branch_eb6a0 -; eb6f9 -Music_VermilionCity_branch_eb6f9: ; eb6f9 +Music_VermilionCity_branch_eb6f9: octave 3 note C#, 4 note E_, 4 @@ -102,9 +100,8 @@ Music_VermilionCity_branch_eb6f9: ; eb6f9 note E_, 2 note G#, 2 endchannel -; eb701 -Music_VermilionCity_branch_eb701: ; eb701 +Music_VermilionCity_branch_eb701: note D_, 2 note F_, 2 note A_, 2 @@ -116,9 +113,8 @@ Music_VermilionCity_branch_eb701: ; eb701 note A_, 2 note E_, 2 endchannel -; eb70c -Music_VermilionCity_branch_eb70c: ; eb70c +Music_VermilionCity_branch_eb70c: note __, 2 note F#, 2 note A_, 2 @@ -140,9 +136,8 @@ Music_VermilionCity_branch_eb70c: ; eb70c note B_, 2 note G#, 2 endchannel -; eb721 -Music_VermilionCity_Ch2: ; eb721 +Music_VermilionCity_Ch2: stereopanning $ff dutycycle $3 notetype $c, $77 @@ -157,7 +152,7 @@ Music_VermilionCity_Ch2: ; eb721 note E_, 4 note F#, 4 note G#, 4 -Music_VermilionCity_branch_eb735: ; eb735 +Music_VermilionCity_branch_eb735: notetype $c, $97 callchannel Music_VermilionCity_branch_eb768 note G#, 2 @@ -191,9 +186,8 @@ Music_VermilionCity_branch_eb735: ; eb735 octave 5 note E_, 16 loopchannel 0, Music_VermilionCity_branch_eb735 -; eb768 -Music_VermilionCity_branch_eb768: ; eb768 +Music_VermilionCity_branch_eb768: octave 1 note A_, 8 octave 2 @@ -216,9 +210,8 @@ Music_VermilionCity_branch_eb768: ; eb768 octave 1 note A_, 2 endchannel -; eb77e -Music_VermilionCity_branch_eb77e: ; eb77e +Music_VermilionCity_branch_eb77e: note F#, 8 note B_, 8 note A_, 4 @@ -226,9 +219,8 @@ Music_VermilionCity_branch_eb77e: ; eb77e note F#, 4 note E_, 4 endchannel -; eb785 -Music_VermilionCity_Ch3: ; eb785 +Music_VermilionCity_Ch3: stereopanning $f0 vibrato $22, $23 notetype $c, $25 @@ -249,7 +241,7 @@ Music_VermilionCity_Ch3: ; eb785 note D_, 1 octave 2 note B_, 1 -Music_VermilionCity_branch_eb79e: ; eb79e +Music_VermilionCity_branch_eb79e: notetype $c, $22 callchannel Music_VermilionCity_branch_eb7de octave 5 @@ -297,9 +289,8 @@ Music_VermilionCity_branch_eb79e: ; eb79e note E_, 1 note G#, 1 loopchannel 0, Music_VermilionCity_branch_eb79e -; eb7de -Music_VermilionCity_branch_eb7de: ; eb7de +Music_VermilionCity_branch_eb7de: octave 5 note A_, 8 octave 6 @@ -323,9 +314,8 @@ Music_VermilionCity_branch_eb7de: ; eb7de octave 5 note B_, 1 endchannel -; eb7f5 -Music_VermilionCity_branch_eb7f5: ; eb7f5 +Music_VermilionCity_branch_eb7f5: note A_, 1 note __, 1 note A_, 2 @@ -345,4 +335,3 @@ Music_VermilionCity_branch_eb7f5: ; eb7f5 octave 4 note C#, 1 endchannel -; eb808 diff --git a/audio/music/victoryroad.asm b/audio/music/victoryroad.asm index dbefa5127dd..ea914865f05 100644 --- a/audio/music/victoryroad.asm +++ b/audio/music/victoryroad.asm @@ -1,21 +1,20 @@ -Music_VictoryRoad: ; f6c72 +Music_VictoryRoad: musicheader 4, 1, Music_VictoryRoad_Ch1 musicheader 1, 2, Music_VictoryRoad_Ch2 musicheader 1, 3, Music_VictoryRoad_Ch3 musicheader 1, 4, Music_VictoryRoad_Ch4 -; f6c7e -Music_VictoryRoad_Ch1: ; f6c7e +Music_VictoryRoad_Ch1: tempo 144 volume $77 stereopanning $f dutycycle $3 tone $0002 notetype $c, $b3 -Music_VictoryRoad_branch_f6c8d: ; f6c8d +Music_VictoryRoad_branch_f6c8d: callchannel Music_VictoryRoad_branch_f6cb9 loopchannel 6, Music_VictoryRoad_branch_f6c8d -Music_VictoryRoad_branch_f6c94: ; f6c94 +Music_VictoryRoad_branch_f6c94: intensity $b2 octave 2 note A_, 1 @@ -37,13 +36,12 @@ Music_VictoryRoad_branch_f6c94: ; f6c94 octave 3 note G#, 3 loopchannel 2, Music_VictoryRoad_branch_f6c94 -Music_VictoryRoad_branch_f6cae: ; f6cae +Music_VictoryRoad_branch_f6cae: callchannel Music_VictoryRoad_branch_f6cb9 loopchannel 2, Music_VictoryRoad_branch_f6cae loopchannel 0, Music_VictoryRoad_branch_f6c8d -; f6cb9 -Music_VictoryRoad_branch_f6cb9: ; f6cb9 +Music_VictoryRoad_branch_f6cb9: intensity $b2 octave 2 note G_, 1 @@ -63,12 +61,11 @@ Music_VictoryRoad_branch_f6cb9: ; f6cb9 octave 3 note F#, 3 endchannel -; f6cce -Music_VictoryRoad_Ch2: ; f6cce +Music_VictoryRoad_Ch2: dutycycle $3 vibrato $10, $24 -Music_VictoryRoad_branch_f6cd3: ; f6cd3 +Music_VictoryRoad_branch_f6cd3: notetype $c, $c2 callchannel Music_VictoryRoad_branch_f6d1e note __, 2 @@ -119,9 +116,8 @@ Music_VictoryRoad_branch_f6cd3: ; f6cd3 note C#, 1 note D_, 16 loopchannel 0, Music_VictoryRoad_branch_f6cd3 -; f6d1e -Music_VictoryRoad_branch_f6d1e: ; f6d1e +Music_VictoryRoad_branch_f6d1e: octave 3 note E_, 1 note __, 1 @@ -136,15 +132,14 @@ Music_VictoryRoad_branch_f6d1e: ; f6d1e note A_, 1 note A_, 1 endchannel -; f6d2c -Music_VictoryRoad_Ch3: ; f6d2c +Music_VictoryRoad_Ch3: stereopanning $f0 notetype $c, $28 -Music_VictoryRoad_branch_f6d31: ; f6d31 +Music_VictoryRoad_branch_f6d31: callchannel Music_VictoryRoad_branch_f6d52 loopchannel 6, Music_VictoryRoad_branch_f6d31 -Music_VictoryRoad_branch_f6d38: ; f6d38 +Music_VictoryRoad_branch_f6d38: note D_, 1 note __, 1 note B_, 1 @@ -157,13 +152,12 @@ Music_VictoryRoad_branch_f6d38: ; f6d38 note D_, 1 note B_, 3 loopchannel 2, Music_VictoryRoad_branch_f6d38 -Music_VictoryRoad_branch_f6d47: ; f6d47 +Music_VictoryRoad_branch_f6d47: callchannel Music_VictoryRoad_branch_f6d52 loopchannel 2, Music_VictoryRoad_branch_f6d47 loopchannel 0, Music_VictoryRoad_branch_f6d31 -; f6d52 -Music_VictoryRoad_branch_f6d52: ; f6d52 +Music_VictoryRoad_branch_f6d52: octave 3 note C_, 1 note __, 1 @@ -177,12 +171,11 @@ Music_VictoryRoad_branch_f6d52: ; f6d52 note C_, 1 note A_, 3 endchannel -; f6d5f -Music_VictoryRoad_Ch4: ; f6d5f +Music_VictoryRoad_Ch4: togglenoise $0 notetype $c -Music_VictoryRoad_branch_f6d63: ; f6d63 +Music_VictoryRoad_branch_f6d63: note D_, 2 note D_, 2 note D#, 1 @@ -202,4 +195,3 @@ Music_VictoryRoad_branch_f6d63: ; f6d63 note D_, 2 note D#, 1 loopchannel 0, Music_VictoryRoad_branch_f6d63 -; f6d79 diff --git a/audio/music/violetcity.asm b/audio/music/violetcity.asm index 6ccb874f186..a8a89c3c275 100644 --- a/audio/music/violetcity.asm +++ b/audio/music/violetcity.asm @@ -1,11 +1,10 @@ -Music_VioletCity: ; f0000 +Music_VioletCity: musicheader 4, 1, Music_VioletCity_Ch1 musicheader 1, 2, Music_VioletCity_Ch2 musicheader 1, 3, Music_VioletCity_Ch3 musicheader 1, 4, Music_VioletCity_Ch4 -; f000c -Music_VioletCity_Ch1: ; f000c +Music_VioletCity_Ch1: tempo 164 volume $77 vibrato $12, $25 @@ -65,7 +64,7 @@ Music_VioletCity_Ch1: ; f000c octave 3 note C#, 12 note __, 8 -Music_VioletCity_branch_f0056: ; f0056 +Music_VioletCity_branch_f0056: notetype $6, $95 note __, 4 octave 2 @@ -296,9 +295,8 @@ Music_VioletCity_branch_f0056: ; f0056 note C#, 4 note __, 4 loopchannel 0, Music_VioletCity_branch_f0056 -; f0162 -Music_VioletCity_Ch2: ; f0162 +Music_VioletCity_Ch2: vibrato $12, $24 dutycycle $2 notetype $c, $c7 @@ -349,7 +347,7 @@ Music_VioletCity_Ch2: ; f0162 note __, 2 note D#, 1 note E_, 1 -Music_VioletCity_branch_f0199: ; f0199 +Music_VioletCity_branch_f0199: intensity $b7 note F#, 4 note __, 2 @@ -503,9 +501,8 @@ Music_VioletCity_branch_f0199: ; f0199 note D#, 1 note E_, 1 loopchannel 0, Music_VioletCity_branch_f0199 -; f0247 -Music_VioletCity_Ch3: ; f0247 +Music_VioletCity_Ch3: notetype $c, $25 note __, 16 note __, 6 @@ -530,7 +527,7 @@ Music_VioletCity_Ch3: ; f0247 note F#, 2 octave 2 note A#, 2 -Music_VioletCity_branch_f0261: ; f0261 +Music_VioletCity_branch_f0261: notetype $c, $25 note B_, 1 note __, 5 @@ -692,9 +689,8 @@ Music_VioletCity_branch_f0261: ; f0261 octave 2 note A#, 4 loopchannel 0, Music_VioletCity_branch_f0261 -; f0311 -Music_VioletCity_branch_f0311: ; f0311 +Music_VioletCity_branch_f0311: note G_, 2 note __, 10 note G_, 2 @@ -708,9 +704,8 @@ Music_VioletCity_branch_f0311: ; f0311 octave 2 note A_, 4 endchannel -; f031e -Music_VioletCity_Ch4: ; f031e +Music_VioletCity_Ch4: togglenoise $3 notetype $c note D#, 2 @@ -729,7 +724,7 @@ Music_VioletCity_Ch4: ; f031e note D_, 2 note C_, 8 note D#, 2 -Music_VioletCity_branch_f0338: ; f0338 +Music_VioletCity_branch_f0338: callchannel Music_VioletCity_branch_f037a callchannel Music_VioletCity_branch_f037a callchannel Music_VioletCity_branch_f037a @@ -747,9 +742,8 @@ Music_VioletCity_branch_f0338: ; f0338 callchannel Music_VioletCity_branch_f037a callchannel Music_VioletCity_branch_f037a loopchannel 0, Music_VioletCity_branch_f0338 -; f036c -Music_VioletCity_branch_f036c: ; f036c +Music_VioletCity_branch_f036c: note D_, 1 note D_, 1 note D#, 1 @@ -764,9 +758,8 @@ Music_VioletCity_branch_f036c: ; f036c note G_, 1 note G_, 1 endchannel -; f037a -Music_VioletCity_branch_f037a: ; f037a +Music_VioletCity_branch_f037a: note D#, 2 note G_, 1 note G_, 1 @@ -779,4 +772,3 @@ Music_VioletCity_branch_f037a: ; f037a note D_, 2 note D#, 2 endchannel -; f0386 diff --git a/audio/music/viridiancity.asm b/audio/music/viridiancity.asm index 7196882cf2f..ea38a0e6d77 100644 --- a/audio/music/viridiancity.asm +++ b/audio/music/viridiancity.asm @@ -1,11 +1,10 @@ -Music_ViridianCity: ; f4000 +Music_ViridianCity: musicheader 4, 1, Music_ViridianCity_Ch1 musicheader 1, 2, Music_ViridianCity_Ch2 musicheader 1, 3, Music_ViridianCity_Ch3 musicheader 1, 4, Music_ViridianCity_Ch4 -; f400c -Music_ViridianCity_Ch1: ; f400c +Music_ViridianCity_Ch1: tempo 157 volume $77 stereopanning $f @@ -42,7 +41,7 @@ Music_ViridianCity_Ch1: ; f400c note __, 4 note G_, 8 note __, 4 -Music_ViridianCity_branch_f4039: ; f4039 +Music_ViridianCity_branch_f4039: callchannel Music_ViridianCity_branch_f40c5 note __, 4 callchannel Music_ViridianCity_branch_f40c5 @@ -170,9 +169,8 @@ Music_ViridianCity_branch_f4039: ; f4039 note G_, 8 note A#, 4 loopchannel 0, Music_ViridianCity_branch_f4039 -; f40c5 -Music_ViridianCity_branch_f40c5: ; f40c5 +Music_ViridianCity_branch_f40c5: octave 3 note A_, 1 note __, 3 @@ -247,9 +245,8 @@ Music_ViridianCity_branch_f40c5: ; f40c5 note __, 4 note G_, 8 endchannel -; f410f -Music_ViridianCity_branch_f410f: ; f410f +Music_ViridianCity_branch_f410f: octave 3 note B_, 2 note D_, 2 @@ -272,9 +269,8 @@ Music_ViridianCity_branch_f410f: ; f410f note G_, 1 note __, 1 endchannel -; f4125 -Music_ViridianCity_Ch2: ; f4125 +Music_ViridianCity_Ch2: vibrato $10, $46 dutycycle $1 notetype $c, $b7 @@ -308,7 +304,7 @@ Music_ViridianCity_Ch2: ; f4125 note __, 4 note E_, 8 note __, 4 -Music_ViridianCity_branch_f414c: ; f414c +Music_ViridianCity_branch_f414c: callchannel Music_ViridianCity_branch_f41c0 note __, 4 callchannel Music_ViridianCity_branch_f41c0 @@ -406,9 +402,8 @@ Music_ViridianCity_branch_f414c: ; f414c octave 1 note A_, 4 loopchannel 0, Music_ViridianCity_branch_f414c -; f41c0 -Music_ViridianCity_branch_f41c0: ; f41c0 +Music_ViridianCity_branch_f41c0: octave 2 note D_, 4 note __, 2 @@ -474,9 +469,8 @@ Music_ViridianCity_branch_f41c0: ; f41c0 note __, 4 note E_, 8 endchannel -; f4201 -Music_ViridianCity_branch_f4201: ; f4201 +Music_ViridianCity_branch_f4201: note G_, 4 note __, 2 octave 3 @@ -487,9 +481,8 @@ Music_ViridianCity_branch_f4201: ; f4201 note F_, 2 note F#, 2 endchannel -; f420b -Music_ViridianCity_branch_f420b: ; f420b +Music_ViridianCity_branch_f420b: note F#, 4 note __, 2 octave 3 @@ -500,9 +493,8 @@ Music_ViridianCity_branch_f420b: ; f420b note E_, 2 note F_, 2 endchannel -; f4215 -Music_ViridianCity_branch_f4215: ; f4215 +Music_ViridianCity_branch_f4215: octave 2 note E_, 4 note __, 2 @@ -512,9 +504,8 @@ Music_ViridianCity_branch_f4215: ; f4215 note D_, 2 note D#, 2 endchannel -; f421e -Music_ViridianCity_Ch3: ; f421e +Music_ViridianCity_Ch3: vibrato $12, $24 notetype $c, $13 stereopanning $ff @@ -550,7 +541,7 @@ Music_ViridianCity_Ch3: ; f421e note D_, 8 note F#, 2 note G_, 2 -Music_ViridianCity_branch_f4246: ; f4246 +Music_ViridianCity_branch_f4246: intensity $13 callchannel Music_ViridianCity_branch_f42a2 octave 5 @@ -632,9 +623,8 @@ Music_ViridianCity_branch_f4246: ; f4246 note D_, 8 note E_, 4 loopchannel 0, Music_ViridianCity_branch_f4246 -; f42a2 -Music_ViridianCity_branch_f42a2: ; f42a2 +Music_ViridianCity_branch_f42a2: octave 5 note A_, 2 note __, 2 @@ -696,14 +686,13 @@ Music_ViridianCity_branch_f42a2: ; f42a2 note __, 4 note D_, 8 endchannel -; f42df -Music_ViridianCity_Ch4: ; f42df +Music_ViridianCity_Ch4: togglenoise $3 notetype $c callchannel Music_ViridianCity_branch_f431d callchannel Music_ViridianCity_branch_f432c -Music_ViridianCity_branch_f42e9: ; f42e9 +Music_ViridianCity_branch_f42e9: callchannel Music_ViridianCity_branch_f431d callchannel Music_ViridianCity_branch_f431d callchannel Music_ViridianCity_branch_f431d @@ -721,9 +710,8 @@ Music_ViridianCity_branch_f42e9: ; f42e9 callchannel Music_ViridianCity_branch_f433b callchannel Music_ViridianCity_branch_f433b loopchannel 0, Music_ViridianCity_branch_f42e9 -; f431d -Music_ViridianCity_branch_f431d: ; f431d +Music_ViridianCity_branch_f431d: note E_, 2 note E_, 2 note D_, 2 @@ -739,9 +727,8 @@ Music_ViridianCity_branch_f431d: ; f431d note E_, 2 note F#, 2 endchannel -; f432c -Music_ViridianCity_branch_f432c: ; f432c +Music_ViridianCity_branch_f432c: note E_, 2 note E_, 2 note D_, 2 @@ -757,9 +744,8 @@ Music_ViridianCity_branch_f432c: ; f432c note A#, 2 note A#, 2 endchannel -; f433b -Music_ViridianCity_branch_f433b: ; f433b +Music_ViridianCity_branch_f433b: note D#, 2 note F#, 2 note D_, 2 @@ -776,9 +762,8 @@ Music_ViridianCity_branch_f433b: ; f433b note D_, 2 note D#, 2 endchannel -; f434b -Music_ViridianCity_branch_f434b: ; f434b +Music_ViridianCity_branch_f434b: note D#, 2 note F#, 2 note D_, 2 @@ -795,4 +780,3 @@ Music_ViridianCity_branch_f434b: ; f434b note D_, 2 note F#, 2 endchannel -; f435b diff --git a/audio/music/wildpokemonvictory.asm b/audio/music/wildpokemonvictory.asm index fc95e111ec7..f1438dc69d1 100644 --- a/audio/music/wildpokemonvictory.asm +++ b/audio/music/wildpokemonvictory.asm @@ -1,10 +1,9 @@ -Music_WildPokemonVictory: ; f4518 +Music_WildPokemonVictory: musicheader 3, 1, Music_WildPokemonVictory_Ch1 musicheader 1, 2, Music_WildPokemonVictory_Ch2 musicheader 1, 3, Music_WildPokemonVictory_Ch3 -; f4521 -Music_WildPokemonVictory_Ch1: ; f4521 +Music_WildPokemonVictory_Ch1: tempo 126 volume $77 dutycycle $3 @@ -17,9 +16,9 @@ Music_WildPokemonVictory_Ch1: ; f4521 note F#, 1 intensity $b6 note E_, 12 -Music_SuccessfulCapture_branch_f4536: ; f4536 +Music_SuccessfulCapture_branch_f4536: stereopanning $f -Music_WildPokemonVictory_branch_f4538: ; f4538 +Music_WildPokemonVictory_branch_f4538: callchannel Music_WildPokemonVictory_branch_f455c note F#, 2 note F#, 2 @@ -41,9 +40,8 @@ Music_WildPokemonVictory_branch_f4538: ; f4538 octave 3 note F#, 4 loopchannel 0, Music_WildPokemonVictory_branch_f4538 -; f455c -Music_WildPokemonVictory_branch_f455c: ; f455c +Music_WildPokemonVictory_branch_f455c: intensity $71 octave 3 note G#, 1 @@ -68,9 +66,8 @@ Music_WildPokemonVictory_branch_f455c: ; f455c note E_, 2 note A_, 2 endchannel -; f4575 -Music_WildPokemonVictory_Ch2: ; f4575 +Music_WildPokemonVictory_Ch2: vibrato $12, $24 dutycycle $2 notetype $c, $d1 @@ -81,9 +78,9 @@ Music_WildPokemonVictory_Ch2: ; f4575 note A_, 1 intensity $d6 note B_, 12 -Music_SuccessfulCapture_branch_f4585: ; f4585 +Music_SuccessfulCapture_branch_f4585: stereopanning $f0 -Music_WildPokemonVictory_branch_f4587: ; f4587 +Music_WildPokemonVictory_branch_f4587: callchannel Music_WildPokemonVictory_branch_f45b5 octave 4 note B_, 2 @@ -115,9 +112,8 @@ Music_WildPokemonVictory_branch_f4587: ; f4587 note F#, 1 note A_, 1 loopchannel 0, Music_WildPokemonVictory_branch_f4587 -; f45b5 -Music_WildPokemonVictory_branch_f45b5: ; f45b5 +Music_WildPokemonVictory_branch_f45b5: intensity $81 octave 4 note B_, 2 @@ -132,9 +128,8 @@ Music_WildPokemonVictory_branch_f45b5: ; f45b5 note C#, 2 note C#, 4 endchannel -; f45c4 -Music_WildPokemonVictory_Ch3: ; f45c4 +Music_WildPokemonVictory_Ch3: notetype $c, $20 note __, 6 octave 6 @@ -144,8 +139,8 @@ Music_WildPokemonVictory_Ch3: ; f45c4 note __, 3 note E_, 1 note __, 3 -Music_SuccessfulCapture_branch_f45cf: ; f45cf -Music_WildPokemonVictory_branch_f45cf: ; f45cf +Music_SuccessfulCapture_branch_f45cf: +Music_WildPokemonVictory_branch_f45cf: callchannel Music_WildPokemonVictory_branch_f45f4 note D#, 2 note C#, 2 @@ -170,9 +165,8 @@ Music_WildPokemonVictory_branch_f45cf: ; f45cf octave 2 note B_, 4 loopchannel 0, Music_WildPokemonVictory_branch_f45cf -; f45f4 -Music_WildPokemonVictory_branch_f45f4: ; f45f4 +Music_WildPokemonVictory_branch_f45f4: intensity $25 octave 3 note E_, 2 @@ -186,4 +180,3 @@ Music_WildPokemonVictory_branch_f45f4: ; f45f4 note __, 4 note C#, 2 endchannel -; f4602 diff --git a/audio/music_pointers.asm b/audio/music_pointers.asm index eb6869896cf..b036e34fb28 100644 --- a/audio/music_pointers.asm +++ b/audio/music_pointers.asm @@ -1,6 +1,6 @@ ; See song sections in audio.asm. -Music: ; e906e +Music: ; entries correspond to MUSIC_* constants dba Music_Nothing ; 0xe91a3 @@ -109,4 +109,3 @@ Music: ; e906e dba Music_SuicuneBattle ; 0x178b81 dba Music_BattleTowerLobby ; 0x17948b dba Music_MobileCenter ; 0x17961d -; e91a3 diff --git a/audio/notes.asm b/audio/notes.asm index 543672a4a9a..eeb84959b5a 100644 --- a/audio/notes.asm +++ b/audio/notes.asm @@ -1,4 +1,4 @@ -FrequencyTable: ; e8d80 +FrequencyTable: dw 0 ; __ dw $f82c ; C_ dw $f89d ; C# @@ -24,4 +24,3 @@ FrequencyTable: ; e8d80 dw $fdac ; A_ dw $fdcd ; A# dw $fded ; B_ -; e8db2 diff --git a/audio/sfx.asm b/audio/sfx.asm index 2f80fa912b6..dbc10ddbb28 100644 --- a/audio/sfx.asm +++ b/audio/sfx.asm @@ -1,143 +1,110 @@ -Sfx_PokeballsPlacedOnTable: ; f0941 +Sfx_PokeballsPlacedOnTable: musicheader 1, 5, Sfx_PokeballsPlacedOnTable_Ch5 -; f0944 -Sfx_BallWobble: ; f0944 +Sfx_BallWobble: musicheader 1, 5, Sfx_BallWobble_Ch5 -; f0947 -Sfx_Potion: ; f0947 +Sfx_Potion: musicheader 1, 5, Sfx_Potion_Ch5 -; f094a -Sfx_FullHeal: ; f094a +Sfx_FullHeal: musicheader 1, 5, Sfx_FullHeal_Ch5 -; f094d -Sfx_Menu: ; f094d +Sfx_Menu: musicheader 1, 8, Sfx_Menu_Ch8 -; f0950 -Sfx_ReadText2: ; f0950 -Sfx_ReadText: ; f0950 +Sfx_ReadText2: +Sfx_ReadText: musicheader 1, 5, Sfx_ReadText2_Ch5 -; f0953 -Sfx_Poison: ; f0953 +Sfx_Poison: musicheader 1, 5, Sfx_Poison_Ch5 -; f0956 -Sfx_GotSafariBalls: ; f0956 +Sfx_GotSafariBalls: musicheader 1, 5, Sfx_GotSafariBalls_Ch5 -; f0959 -Sfx_BootPc: ; f0959 +Sfx_BootPc: musicheader 1, 5, Sfx_BootPc_Ch5 -; f095c -Sfx_ShutDownPc: ; f095c +Sfx_ShutDownPc: musicheader 1, 5, Sfx_ShutDownPc_Ch5 -; f095f -Sfx_ChoosePcOption: ; f095f +Sfx_ChoosePcOption: musicheader 1, 5, Sfx_ChoosePcOption_Ch5 -; f0962 -Sfx_EscapeRope: ; f0962 +Sfx_EscapeRope: musicheader 1, 5, Sfx_EscapeRope_Ch5 -; f0965 -Sfx_PushButton: ; f0965 +Sfx_PushButton: musicheader 1, 5, Sfx_PushButton_Ch5 -; f0968 -Sfx_SecondPartOfItemfinder: ; f0968 +Sfx_SecondPartOfItemfinder: musicheader 1, 5, Sfx_SecondPartOfItemfinder_Ch5 -; f096b -Sfx_WarpTo: ; f096b +Sfx_WarpTo: musicheader 1, 5, Sfx_WarpTo_Ch5 -; f096e -Sfx_WarpFrom: ; f096e +Sfx_WarpFrom: musicheader 1, 5, Sfx_WarpFrom_Ch5 -; f0971 -Sfx_ChangeDexMode: ; f0971 +Sfx_ChangeDexMode: musicheader 1, 5, Sfx_ChangeDexMode_Ch5 -; f0974 -Sfx_JumpOverLedge: ; f0974 +Sfx_JumpOverLedge: musicheader 1, 5, Sfx_JumpOverLedge_Ch5 -; f0977 -Sfx_GrassRustle: ; f0977 +Sfx_GrassRustle: musicheader 1, 8, Sfx_GrassRustle_Ch8 -; f097a -Sfx_Fly: ; f097a +Sfx_Fly: musicheader 1, 8, Sfx_Fly_Ch8 -; f097d -Sfx_Wrong: ; f097d +Sfx_Wrong: musicheader 2, 5, Sfx_Wrong_Ch5 musicheader 1, 6, Sfx_Wrong_Ch6 -; f0983 -Sfx_Squeak: ; f0983 +Sfx_Squeak: musicheader 1, 5, Sfx_Squeak_Ch5 -; f0986 -Sfx_Strength: ; f0986 +Sfx_Strength: musicheader 1, 8, Sfx_Strength_Ch8 -; f0989 -Sfx_Boat: ; f0989 +Sfx_Boat: musicheader 2, 5, Sfx_Boat_Ch5 musicheader 1, 6, Sfx_Boat_Ch6 -; f098f -Sfx_WallOpen: ; f098f +Sfx_WallOpen: musicheader 1, 5, Sfx_WallOpen_Ch5 -; f0992 -Sfx_PlacePuzzlePieceDown: ; f0992 +Sfx_PlacePuzzlePieceDown: musicheader 1, 8, Sfx_PlacePuzzlePieceDown_Ch8 -; f0995 -Sfx_EnterDoor: ; f0995 +Sfx_EnterDoor: musicheader 1, 8, Sfx_EnterDoor_Ch8 -; f0998 -Sfx_SwitchPokemon: ; f0998 +Sfx_SwitchPokemon: musicheader 2, 5, Sfx_SwitchPokemon_Ch5 musicheader 1, 6, Sfx_SwitchPokemon_Ch6 -; f099e -Sfx_Tally: ; f099e +Sfx_Tally: musicheader 2, 5, Sfx_Tally_Ch5 musicheader 1, 6, Sfx_Tally_Ch6 -; f09a4 -Sfx_Transaction: ; f09a4 +Sfx_Transaction: musicheader 2, 5, Sfx_Transaction_Ch5 musicheader 1, 6, Sfx_Transaction_Ch6 -; f09aa -Sfx_Bump: ; f09aa +Sfx_Bump: musicheader 1, 5, Sfx_Bump_Ch5 -; f09ad -Sfx_ExitBuilding: ; f09ad +Sfx_ExitBuilding: musicheader 1, 8, Sfx_ExitBuilding_Ch8 -; f09b0 -Sfx_Save: ; f09b0 +Sfx_Save: musicheader 2, 5, Sfx_Save_Ch5 musicheader 1, 6, Sfx_Save_Ch6 -; f09b6 -Sfx_Save_Ch5: ; f09b6 +Sfx_Save_Ch5: dutycycle $2 sound __, 3, $f1, $0700 sound __, 2, $e1, $0600 @@ -147,9 +114,8 @@ Sfx_Save_Ch5: ; f09b6 sound __, 3, $e1, $07c0 sound __, 16, $f2, $07e0 endchannel -; f09d5 -Sfx_Save_Ch6: ; f09d5 +Sfx_Save_Ch6: dutycycle $2 sound __, 3, $8, 0 sound __, 3, $a1, $0701 @@ -160,341 +126,268 @@ Sfx_Save_Ch6: ; f09d5 sound __, 3, $91, $07c1 sound __, 16, $d2, $07e1 endchannel -; f09f8 -Sfx_Pokeflute: ; f09f8 +Sfx_Pokeflute: musicheader 1, 7, Sfx_Pokeflute_Ch7 -; f09fb -Sfx_ElevatorEnd: ; f09fb +Sfx_ElevatorEnd: musicheader 1, 5, Sfx_ElevatorEnd_Ch5 -; f09fe -Sfx_ThrowBall: ; f09fe +Sfx_ThrowBall: musicheader 2, 5, Sfx_ThrowBall_Ch5 musicheader 1, 6, Sfx_ThrowBall_Ch6 -; f0a04 -Sfx_BallPoof: ; f0a04 +Sfx_BallPoof: musicheader 2, 5, Sfx_BallPoof_Ch5 musicheader 1, 8, Sfx_BallPoof_Ch8 -; f0a0a -Sfx_Unknown3A: ; f0a0a +Sfx_Unknown3A: musicheader 2, 5, Sfx_Unknown3A_Ch5 musicheader 1, 8, Sfx_Unknown3A_Ch8 -; f0a10 -Sfx_Run: ; f0a10 +Sfx_Run: musicheader 1, 8, Sfx_Run_Ch8 -; f0a13 -Sfx_SlotMachineStart: ; f0a13 +Sfx_SlotMachineStart: musicheader 2, 5, Sfx_SlotMachineStart_Ch5 musicheader 1, 6, Sfx_SlotMachineStart_Ch6 -; f0a19 -Sfx_Call: ; f0a19 +Sfx_Call: musicheader 1, 5, Sfx_Call_Ch5 -; f0a1c -Sfx_Unknown60: ; f0a1c +Sfx_Unknown60: musicheader 1, 8, Sfx_Unknown60_Ch8 -; f0a1f -Sfx_Unknown61: ; f0a1f +Sfx_Unknown61: musicheader 1, 8, Sfx_Unknown61_Ch8 -; f0a22 -Sfx_SwitchPockets: ; f0a22 +Sfx_SwitchPockets: musicheader 1, 8, Sfx_SwitchPockets_Ch8 -; f0a25 -Sfx_Unknown63: ; f0a25 +Sfx_Unknown63: musicheader 1, 8, Sfx_Unknown63_Ch8 -; f0a28 -Sfx_Burn: ; f0a28 +Sfx_Burn: musicheader 1, 8, Sfx_Burn_Ch8 -; f0a2b -Sfx_TitleScreenEntrance: ; f0a2b +Sfx_TitleScreenEntrance: musicheader 1, 8, Sfx_TitleScreenEntrance_Ch8 -; f0a2e -Sfx_Unknown66: ; f0a2e +Sfx_Unknown66: musicheader 1, 5, Sfx_Unknown66_Ch5 -; f0a31 -Sfx_GetCoinFromSlots: ; f0a31 +Sfx_GetCoinFromSlots: musicheader 1, 5, Sfx_GetCoinFromSlots_Ch5 -; f0a34 -Sfx_PayDay: ; f0a34 +Sfx_PayDay: musicheader 2, 5, Sfx_PayDay_Ch5 musicheader 1, 6, Sfx_PayDay_Ch6 -; f0a3a -Sfx_Metronome: ; f0a3a +Sfx_Metronome: musicheader 1, 5, Sfx_Metronome_Ch5 -; f0a3d -Sfx_Peck: ; f0a3d +Sfx_Peck: musicheader 1, 8, Sfx_Peck_Ch8 -; f0a40 -Sfx_Kinesis: ; f0a40 +Sfx_Kinesis: musicheader 1, 5, Sfx_Kinesis_Ch5 -; f0a43 -Sfx_Lick: ; f0a43 +Sfx_Lick: musicheader 1, 5, Sfx_Lick_Ch5 -; f0a46 -Sfx_Pound: ; f0a46 +Sfx_Pound: musicheader 1, 8, Sfx_Pound_Ch8 -; f0a49 -Sfx_MovePuzzlePiece: ; f0a49 +Sfx_MovePuzzlePiece: musicheader 1, 8, Sfx_MovePuzzlePiece_Ch8 -; f0a4c -Sfx_CometPunch: ; f0a4c +Sfx_CometPunch: musicheader 1, 8, Sfx_CometPunch_Ch8 -; f0a4f -Sfx_MegaPunch: ; f0a4f +Sfx_MegaPunch: musicheader 1, 8, Sfx_MegaPunch_Ch8 -; f0a52 -Sfx_Scratch: ; f0a52 +Sfx_Scratch: musicheader 1, 8, Sfx_Scratch_Ch8 -; f0a55 -Sfx_Vicegrip: ; f0a55 +Sfx_Vicegrip: musicheader 1, 8, Sfx_Vicegrip_Ch8 -; f0a58 -Sfx_RazorWind: ; f0a58 +Sfx_RazorWind: musicheader 1, 8, Sfx_RazorWind_Ch8 -; f0a5b -Sfx_Cut: ; f0a5b +Sfx_Cut: musicheader 1, 8, Sfx_Cut_Ch8 -; f0a5e -Sfx_WingAttack: ; f0a5e +Sfx_WingAttack: musicheader 1, 8, Sfx_WingAttack_Ch8 -; f0a61 -Sfx_Whirlwind: ; f0a61 +Sfx_Whirlwind: musicheader 1, 8, Sfx_Whirlwind_Ch8 -; f0a64 -Sfx_Bind: ; f0a64 +Sfx_Bind: musicheader 1, 8, Sfx_Bind_Ch8 -; f0a67 -Sfx_VineWhip: ; f0a67 +Sfx_VineWhip: musicheader 1, 8, Sfx_VineWhip_Ch8 -; f0a6a -Sfx_DoubleKick: ; f0a6a +Sfx_DoubleKick: musicheader 1, 8, Sfx_DoubleKick_Ch8 -; f0a6d -Sfx_MegaKick: ; f0a6d +Sfx_MegaKick: musicheader 1, 8, Sfx_MegaKick_Ch8 -; f0a70 -Sfx_Headbutt: ; f0a70 +Sfx_Headbutt: musicheader 1, 8, Sfx_Headbutt_Ch8 -; f0a73 -Sfx_HornAttack: ; f0a73 +Sfx_HornAttack: musicheader 1, 8, Sfx_HornAttack_Ch8 -; f0a76 -Sfx_Tackle: ; f0a76 +Sfx_Tackle: musicheader 1, 8, Sfx_Tackle_Ch8 -; f0a79 -Sfx_PoisonSting: ; f0a79 +Sfx_PoisonSting: musicheader 1, 8, Sfx_PoisonSting_Ch8 -; f0a7c -Sfx_Powder: ; f0a7c +Sfx_Powder: musicheader 1, 8, Sfx_Powder_Ch8 -; f0a7f -Sfx_Doubleslap: ; f0a7f +Sfx_Doubleslap: musicheader 1, 8, Sfx_Doubleslap_Ch8 -; f0a82 -Sfx_Bite: ; f0a82 +Sfx_Bite: musicheader 2, 5, Sfx_Bite_Ch5 musicheader 1, 8, Sfx_Bite_Ch8 -; f0a88 -Sfx_JumpKick: ; f0a88 +Sfx_JumpKick: musicheader 1, 8, Sfx_JumpKick_Ch8 -; f0a8b -Sfx_Stomp: ; f0a8b +Sfx_Stomp: musicheader 1, 8, Sfx_Stomp_Ch8 -; f0a8e -Sfx_TailWhip: ; f0a8e +Sfx_TailWhip: musicheader 1, 8, Sfx_TailWhip_Ch8 -; f0a91 -Sfx_KarateChop: ; f0a91 +Sfx_KarateChop: musicheader 1, 8, Sfx_KarateChop_Ch8 -; f0a94 -Sfx_Submission: ; f0a94 +Sfx_Submission: musicheader 1, 8, Sfx_Submission_Ch8 -; f0a97 -Sfx_WaterGun: ; f0a97 +Sfx_WaterGun: musicheader 2, 5, Sfx_WaterGun_Ch5 musicheader 1, 8, Sfx_WaterGun_Ch8 -; f0a9d -Sfx_SwordsDance: ; f0a9d +Sfx_SwordsDance: musicheader 1, 8, Sfx_SwordsDance_Ch8 -; f0aa0 -Sfx_Thunder: ; f0aa0 +Sfx_Thunder: musicheader 1, 8, Sfx_Thunder_Ch8 -; f0aa3 -Sfx_Supersonic: ; f0aa3 +Sfx_Supersonic: musicheader 3, 5, Sfx_Supersonic_Ch5 musicheader 1, 6, Sfx_Supersonic_Ch6 musicheader 1, 8, Sfx_Supersonic_Ch8 -; f0aac -Sfx_Leer: ; f0aac +Sfx_Leer: musicheader 3, 5, Sfx_Leer_Ch5 musicheader 1, 6, Sfx_Leer_Ch6 musicheader 1, 8, Sfx_Leer_Ch8 -; f0ab5 -Sfx_Ember: ; f0ab5 +Sfx_Ember: musicheader 2, 5, Sfx_Ember_Ch5 musicheader 1, 8, Sfx_Ember_Ch8 -; f0abb -Sfx_Bubblebeam: ; f0abb +Sfx_Bubblebeam: musicheader 3, 5, Sfx_Bubblebeam_Ch5 musicheader 1, 6, Sfx_Bubblebeam_Ch6 musicheader 1, 8, Sfx_Bubblebeam_Ch8 -; f0ac4 -Sfx_HydroPump: ; f0ac4 +Sfx_HydroPump: musicheader 2, 5, Sfx_HydroPump_Ch5 musicheader 1, 8, Sfx_HydroPump_Ch8 -; f0aca -Sfx_Surf: ; f0aca +Sfx_Surf: musicheader 3, 5, Sfx_Surf_Ch5 musicheader 1, 6, Sfx_Surf_Ch6 musicheader 1, 8, Sfx_Surf_Ch8 -; f0ad3 -Sfx_Psybeam: ; f0ad3 +Sfx_Psybeam: musicheader 3, 5, Sfx_Psybeam_Ch5 musicheader 1, 6, Sfx_Psybeam_Ch6 musicheader 1, 8, Sfx_Psybeam_Ch8 -; f0adc -Sfx_Charge: ; f0adc +Sfx_Charge: musicheader 3, 5, Sfx_Charge_Ch5 musicheader 1, 6, Sfx_Charge_Ch6 musicheader 1, 8, Sfx_Charge_Ch8 -; f0ae5 -Sfx_Thundershock: ; f0ae5 +Sfx_Thundershock: musicheader 3, 5, Sfx_Thundershock_Ch5 musicheader 1, 6, Sfx_Thundershock_Ch6 musicheader 1, 8, Sfx_Thundershock_Ch8 -; f0aee -Sfx_Psychic: ; f0aee +Sfx_Psychic: musicheader 3, 5, Sfx_Psychic_Ch5 musicheader 1, 6, Sfx_Psychic_Ch6 musicheader 1, 8, Sfx_Psychic_Ch8 -; f0af7 -Sfx_Screech: ; f0af7 +Sfx_Screech: musicheader 2, 5, Sfx_Screech_Ch5 musicheader 1, 6, Sfx_Screech_Ch6 -; f0afd -Sfx_BoneClub: ; f0afd +Sfx_BoneClub: musicheader 2, 5, Sfx_BoneClub_Ch5 musicheader 1, 6, Sfx_BoneClub_Ch6 -; f0b03 -Sfx_Sharpen: ; f0b03 +Sfx_Sharpen: musicheader 2, 5, Sfx_Sharpen_Ch5 musicheader 1, 6, Sfx_Sharpen_Ch6 -; f0b09 -Sfx_EggBomb: ; f0b09 +Sfx_EggBomb: musicheader 3, 5, Sfx_EggBomb_Ch5 musicheader 1, 6, Sfx_EggBomb_Ch6 musicheader 1, 8, Sfx_EggBomb_Ch8 -; f0b12 -Sfx_Sing: ; f0b12 +Sfx_Sing: musicheader 2, 5, Sfx_Sing_Ch5 musicheader 1, 6, Sfx_Sing_Ch6 -; f0b18 -Sfx_HyperBeam: ; f0b18 +Sfx_HyperBeam: musicheader 3, 5, Sfx_HyperBeam_Ch5 musicheader 1, 6, Sfx_HyperBeam_Ch6 musicheader 1, 8, Sfx_HyperBeam_Ch8 -; f0b21 -Sfx_Shine: ; f0b21 +Sfx_Shine: musicheader 1, 5, Sfx_Shine_Ch5 -; f0b24 -Sfx_Unknown5F: ; f0b24 +Sfx_Unknown5F: musicheader 3, 5, Sfx_Unknown5F_Ch5 musicheader 1, 6, Sfx_Unknown5F_Ch6 -Sfx_Sandstorm: ; f0b2a +Sfx_Sandstorm: musicheader 1, 8, Sfx_Sandstorm_Ch8 -; f0b2d -Sfx_HangUp: ; f0b2d +Sfx_HangUp: musicheader 1, 5, Sfx_HangUp_Ch5 -; f0b30 -Sfx_NoSignal: ; f0b30 +Sfx_NoSignal: musicheader 1, 5, Sfx_NoSignal_Ch5 -; f0b33 -Sfx_Elevator: ; f0b33 +Sfx_Elevator: musicheader 4, 5, Sfx_Elevator_Ch5 musicheader 1, 6, Sfx_Elevator_Ch6 musicheader 1, 7, Sfx_Elevator_Ch7 musicheader 1, 8, Sfx_Elevator_Ch8 -; f0b3f -Sfx_DexFanfare5079: ; f0b3f -Sfx_LevelUp: ; f0b3f +Sfx_DexFanfare5079: +Sfx_LevelUp: musicheader 4, 5, Sfx_DexFanfare5079_Ch5 musicheader 1, 6, Sfx_DexFanfare5079_Ch6 musicheader 1, 7, Sfx_DexFanfare5079_Ch7 musicheader 1, 8, Sfx_DexFanfare5079_Ch8 -; f0b4b -Sfx_DexFanfare5079_Ch5: ; f0b4b -Sfx_LevelUp_Ch5: ; f0b4b +Sfx_DexFanfare5079_Ch5: +Sfx_LevelUp_Ch5: togglesfx tempo 120 volume $77 @@ -508,10 +401,9 @@ Sfx_LevelUp_Ch5: ; f0b4b octave 4 note G#, 12 endchannel -; f0b5f -Sfx_DexFanfare5079_Ch6: ; f0b5f -Sfx_LevelUp_Ch6: ; f0b5f +Sfx_DexFanfare5079_Ch6: +Sfx_LevelUp_Ch6: togglesfx dutycycle $2 notetype $8, $c1 @@ -522,10 +414,9 @@ Sfx_LevelUp_Ch6: ; f0b5f intensity $c3 note B_, 12 endchannel -; f0b6d -Sfx_DexFanfare5079_Ch7: ; f0b6d -Sfx_LevelUp_Ch7: ; f0b6d +Sfx_DexFanfare5079_Ch7: +Sfx_LevelUp_Ch7: togglesfx notetype $8, $25 octave 4 @@ -541,25 +432,22 @@ Sfx_LevelUp_Ch7: ; f0b6d note E_, 3 note __, 4 endchannel -; f0b7f -Sfx_DexFanfare5079_Ch8: ; f0b7f -Sfx_LevelUp_Ch8: ; f0b7f +Sfx_DexFanfare5079_Ch8: +Sfx_LevelUp_Ch8: togglesfx sfxtogglenoise $4 notetype $c note C_, 12 endchannel -; f0b86 -Sfx_KeyItem: ; f0b86 +Sfx_KeyItem: musicheader 4, 5, Sfx_KeyItem_Ch5 musicheader 1, 6, Sfx_KeyItem_Ch6 musicheader 1, 7, Sfx_KeyItem_Ch7 musicheader 1, 8, Sfx_KeyItem_Ch8 -; f0b92 -Sfx_KeyItem_Ch5: ; f0b92 +Sfx_KeyItem_Ch5: togglesfx tempo 120 volume $77 @@ -575,9 +463,8 @@ Sfx_KeyItem_Ch5: ; f0b92 intensity $b3 note G#, 16 endchannel -; f0ba8 -Sfx_KeyItem_Ch6: ; f0ba8 +Sfx_KeyItem_Ch6: togglesfx dutycycle $2 notetype $6, $c1 @@ -590,9 +477,8 @@ Sfx_KeyItem_Ch6: ; f0ba8 intensity $c3 note B_, 16 endchannel -; f0bb8 -Sfx_KeyItem_Ch7: ; f0bb8 +Sfx_KeyItem_Ch7: togglesfx notetype $6, $25 octave 4 @@ -612,24 +498,21 @@ Sfx_KeyItem_Ch7: ; f0bb8 note E_, 4 note __, 4 endchannel -; f0bce -Sfx_KeyItem_Ch8: ; f0bce +Sfx_KeyItem_Ch8: togglesfx sfxtogglenoise $4 notetype $c note C_, 16 endchannel -; f0bd5 -Sfx_DexFanfare2049: ; f0bd5 +Sfx_DexFanfare2049: musicheader 4, 5, Sfx_DexFanfare2049_Ch5 musicheader 1, 6, Sfx_DexFanfare2049_Ch6 musicheader 1, 7, Sfx_DexFanfare2049_Ch7 musicheader 1, 8, Sfx_DexFanfare2049_Ch8 -; f0be1 -Sfx_DexFanfare2049_Ch5: ; f0be1 +Sfx_DexFanfare2049_Ch5: togglesfx tempo 104 volume $77 @@ -653,9 +536,8 @@ Sfx_DexFanfare2049_Ch5: ; f0be1 note A_, 2 note __, 6 endchannel -; f0bfe -Sfx_DexFanfare2049_Ch6: ; f0bfe +Sfx_DexFanfare2049_Ch6: togglesfx dutycycle $2 notetype $c, $c1 @@ -674,9 +556,8 @@ Sfx_DexFanfare2049_Ch6: ; f0bfe note G_, 4 note F_, 8 endchannel -; f0c13 -Sfx_DexFanfare2049_Ch7: ; f0c13 +Sfx_DexFanfare2049_Ch7: togglesfx notetype $c, $25 octave 4 @@ -695,25 +576,22 @@ Sfx_DexFanfare2049_Ch7: ; f0c13 note F_, 2 note __, 6 endchannel -; f0c27 -Sfx_DexFanfare2049_Ch8: ; f0c27 +Sfx_DexFanfare2049_Ch8: togglesfx sfxtogglenoise $4 notetype $c note C_, 16 note __, 16 endchannel -; f0c2f -Sfx_Item: ; f0c2f +Sfx_Item: musicheader 4, 5, Sfx_Item_Ch5 musicheader 1, 6, Sfx_Item_Ch6 musicheader 1, 7, Sfx_Item_Ch7 musicheader 1, 8, Sfx_Item_Ch8 -; f0c3b -Sfx_Item_Ch5: ; f0c3b +Sfx_Item_Ch5: togglesfx tempo 108 volume $77 @@ -731,9 +609,8 @@ Sfx_Item_Ch5: ; f0c3b note F_, 12 note __, 12 endchannel -; f0c54 -Sfx_Item_Ch6: ; f0c54 +Sfx_Item_Ch6: togglesfx vibrato $8, $27 dutycycle $2 @@ -749,9 +626,8 @@ Sfx_Item_Ch6: ; f0c54 note A_, 12 note __, 12 endchannel -; f0c68 -Sfx_Item_Ch7: ; f0c68 +Sfx_Item_Ch7: togglesfx notetype $8, $25 octave 4 @@ -774,25 +650,22 @@ Sfx_Item_Ch7: ; f0c68 note F_, 4 note __, 14 endchannel -; f0c81 -Sfx_Item_Ch8: ; f0c81 +Sfx_Item_Ch8: togglesfx sfxtogglenoise $4 notetype $c note C_, 16 note __, 16 endchannel -; f0c89 -Sfx_CaughtMon: ; f0c89 +Sfx_CaughtMon: musicheader 4, 5, Sfx_CaughtMon_Ch5 musicheader 1, 6, Sfx_CaughtMon_Ch6 musicheader 1, 7, Sfx_CaughtMon_Ch7 musicheader 1, 8, Sfx_CaughtMon_Ch8 -; f0c95 -Sfx_CaughtMon_Ch5: ; f0c95 +Sfx_CaughtMon_Ch5: togglesfx tempo 112 volume $77 @@ -815,9 +688,8 @@ Sfx_CaughtMon_Ch5: ; f0c95 intensity $b3 note F_, 12 endchannel -; f0cb5 -Sfx_CaughtMon_Ch6: ; f0cb5 +Sfx_CaughtMon_Ch6: togglesfx dutycycle $2 vibrato $8, $27 @@ -836,9 +708,8 @@ Sfx_CaughtMon_Ch6: ; f0cb5 intensity $c3 note A_, 12 endchannel -; f0cce -Sfx_CaughtMon_Ch7: ; f0cce +Sfx_CaughtMon_Ch7: togglesfx notetype $8, $25 octave 3 @@ -856,25 +727,22 @@ Sfx_CaughtMon_Ch7: ; f0cce note A_, 3 note __, 3 endchannel -; f0ce2 -Sfx_CaughtMon_Ch8: ; f0ce2 +Sfx_CaughtMon_Ch8: togglesfx sfxtogglenoise $4 notetype $c note C_, 16 note __, 16 endchannel -; f0cea -Sfx_DexFanfare80109: ; f0cea +Sfx_DexFanfare80109: musicheader 4, 5, Sfx_DexFanfare80109_Ch5 musicheader 1, 6, Sfx_DexFanfare80109_Ch6 musicheader 1, 7, Sfx_DexFanfare80109_Ch7 musicheader 1, 8, Sfx_DexFanfare80109_Ch8 -; f0cf6 -Sfx_DexFanfare80109_Ch5: ; f0cf6 +Sfx_DexFanfare80109_Ch5: togglesfx tempo 112 volume $77 @@ -899,9 +767,8 @@ Sfx_DexFanfare80109_Ch5: ; f0cf6 intensity $a5 note A#, 16 endchannel -; f0d17 -Sfx_DexFanfare80109_Ch6: ; f0d17 +Sfx_DexFanfare80109_Ch6: togglesfx vibrato $8, $27 dutycycle $2 @@ -923,9 +790,8 @@ Sfx_DexFanfare80109_Ch6: ; f0d17 octave 5 note D#, 16 endchannel -; f0d32 -Sfx_DexFanfare80109_Ch7: ; f0d32 +Sfx_DexFanfare80109_Ch7: togglesfx notetype $c, $25 octave 4 @@ -951,31 +817,27 @@ Sfx_DexFanfare80109_Ch7: ; f0d32 note D#, 3 note __, 9 endchannel -; f0d4e -Sfx_DexFanfare80109_Ch8: ; f0d4e +Sfx_DexFanfare80109_Ch8: togglesfx sfxtogglenoise $4 notetype $c note C_, 16 note __, 16 endchannel -; f0d56 -Sfx_Fanfare2: ; f0d56 +Sfx_Fanfare2: musicheader 3, 5, Sfx_Fanfare2_Ch5 musicheader 1, 6, Sfx_Fanfare2_Ch6 musicheader 1, 8, Sfx_Fanfare2_Ch8 -; f0d5f -UnusedSfx: ; f0d5f +UnusedSfx: musicheader 4, 5, UnusedSfx_Ch5 musicheader 1, 6, UnusedSfx_Ch6 musicheader 1, 7, UnusedSfx_Ch7 musicheader 1, 8, UnusedSfx_Ch8 -; f0d6b -UnusedSfx_Ch5: ; f0d6b +UnusedSfx_Ch5: togglesfx tempo 124 volume $77 @@ -998,9 +860,8 @@ UnusedSfx_Ch5: ; f0d6b intensity $a5 note F_, 16 endchannel -; f0d8a -UnusedSfx_Ch6: ; f0d8a +UnusedSfx_Ch6: togglesfx vibrato $8, $27 dutycycle $2 @@ -1023,9 +884,8 @@ UnusedSfx_Ch6: ; f0d8a intensity $b5 note A_, 16 endchannel -; f0da6 -UnusedSfx_Ch7: ; f0da6 +UnusedSfx_Ch7: togglesfx notetype $c, $25 octave 4 @@ -1039,31 +899,27 @@ UnusedSfx_Ch7: ; f0da6 note A_, 3 note __, 9 endchannel -; f0db6 -UnusedSfx_Ch8: ; f0db6 +UnusedSfx_Ch8: togglesfx sfxtogglenoise $4 notetype $c note C_, 16 note __, 16 endchannel -; f0dbe -Sfx_Fanfare: ; f0dbe +Sfx_Fanfare: musicheader 3, 5, Sfx_Fanfare_Ch5 musicheader 1, 6, Sfx_Fanfare_Ch6 musicheader 1, 8, Sfx_Fanfare_Ch8 -; f0dc7 -Sfx_RegisterPhoneNumber: ; f0dc7 +Sfx_RegisterPhoneNumber: musicheader 4, 5, Sfx_RegisterPhoneNumber_Ch5 musicheader 1, 6, Sfx_RegisterPhoneNumber_Ch6 musicheader 1, 7, Sfx_RegisterPhoneNumber_Ch7 musicheader 1, 8, Sfx_RegisterPhoneNumber_Ch8 -; f0dd3 -Sfx_RegisterPhoneNumber_Ch5: ; f0dd3 +Sfx_RegisterPhoneNumber_Ch5: togglesfx tempo 124 volume $77 @@ -1086,11 +942,10 @@ Sfx_RegisterPhoneNumber_Ch5: ; f0dd3 note C_, 2 note __, 8 endchannel -; f0def togglesfx -Sfx_RegisterPhoneNumber_Ch6: ; f0df0 +Sfx_RegisterPhoneNumber_Ch6: togglesfx dutycycle $3 notetype $c, $c2 @@ -1111,11 +966,10 @@ Sfx_RegisterPhoneNumber_Ch6: ; f0df0 note G#, 2 note __, 8 endchannel -; f0e07 togglesfx -Sfx_RegisterPhoneNumber_Ch7: ; f0e08 +Sfx_RegisterPhoneNumber_Ch7: togglesfx notetype $c, $25 note __, 2 @@ -1133,11 +987,10 @@ Sfx_RegisterPhoneNumber_Ch7: ; f0e08 note G#, 2 note __, 8 endchannel -; f0e1b togglesfx -Sfx_RegisterPhoneNumber_Ch8: ; f0e1c +Sfx_RegisterPhoneNumber_Ch8: togglesfx sfxtogglenoise $4 notetype $c @@ -1145,17 +998,15 @@ Sfx_RegisterPhoneNumber_Ch8: ; f0e1c note __, 16 note __, 16 endchannel -; f0e25 togglesfx -Sfx_3RdPlace: ; f0e26 +Sfx_3RdPlace: musicheader 3, 5, Sfx_3RdPlace_Ch5 musicheader 1, 6, Sfx_3RdPlace_Ch6 musicheader 1, 7, Sfx_3RdPlace_Ch7 -; f0e2f -Sfx_3RdPlace_Ch5: ; f0e2f +Sfx_3RdPlace_Ch5: togglesfx tempo 120 volume $77 @@ -1171,11 +1022,10 @@ Sfx_3RdPlace_Ch5: ; f0e2f note C_, 1 note D_, 6 endchannel -; f0e44 togglesfx -Sfx_3RdPlace_Ch6: ; f0e45 +Sfx_3RdPlace_Ch6: togglesfx dutycycle $2 notetype $c, $b4 @@ -1189,11 +1039,10 @@ Sfx_3RdPlace_Ch6: ; f0e45 note F_, 1 note G_, 6 endchannel -; f0e55 togglesfx -Sfx_3RdPlace_Ch7: ; f0e56 +Sfx_3RdPlace_Ch7: togglesfx notetype $c, $25 octave 3 @@ -1207,20 +1056,18 @@ Sfx_3RdPlace_Ch7: ; f0e56 note A_, 1 note B_, 6 endchannel -; f0e65 togglesfx -Sfx_GetEggFromDayCareLady: ; f0e66 -Sfx_GetEggFromDayCareMan: ; f0e66 +Sfx_GetEggFromDayCareLady: +Sfx_GetEggFromDayCareMan: musicheader 4, 5, Sfx_GetEggFromDayCareLady_Ch5 musicheader 1, 6, Sfx_GetEggFromDayCareLady_Ch6 musicheader 1, 7, Sfx_GetEggFromDayCareLady_Ch7 musicheader 1, 8, Sfx_GetEggFromDayCareLady_Ch8 -; f0e72 -Sfx_GetEggFromDayCareLady_Ch5: ; f0e72 -Sfx_GetEggFromDayCareMan_Ch5: ; f0e72 +Sfx_GetEggFromDayCareLady_Ch5: +Sfx_GetEggFromDayCareMan_Ch5: togglesfx tempo 120 volume $77 @@ -1249,12 +1096,11 @@ Sfx_GetEggFromDayCareMan_Ch5: ; f0e72 note F_, 9 note __, 9 endchannel -; f0e9a togglesfx -Sfx_GetEggFromDayCareLady_Ch6: ; f0e9b -Sfx_GetEggFromDayCareMan_Ch6: ; f0e9b +Sfx_GetEggFromDayCareLady_Ch6: +Sfx_GetEggFromDayCareMan_Ch6: togglesfx vibrato $12, $34 dutycycle $3 @@ -1280,12 +1126,11 @@ Sfx_GetEggFromDayCareMan_Ch6: ; f0e9b note A_, 9 note __, 9 endchannel -; f0ebd togglesfx -Sfx_GetEggFromDayCareLady_Ch7: ; f0ebe -Sfx_GetEggFromDayCareMan_Ch7: ; f0ebe +Sfx_GetEggFromDayCareLady_Ch7: +Sfx_GetEggFromDayCareMan_Ch7: togglesfx notetype $8, $25 note __, 2 @@ -1301,12 +1146,11 @@ Sfx_GetEggFromDayCareMan_Ch7: ; f0ebe note A_, 9 note __, 9 endchannel -; f0ecf togglesfx -Sfx_GetEggFromDayCareLady_Ch8: ; f0ed0 -Sfx_GetEggFromDayCareMan_Ch8: ; f0ed0 +Sfx_GetEggFromDayCareLady_Ch8: +Sfx_GetEggFromDayCareMan_Ch8: togglesfx sfxtogglenoise $4 notetype $8 @@ -1315,18 +1159,16 @@ Sfx_GetEggFromDayCareMan_Ch8: ; f0ed0 note __, 16 note __, 12 endchannel -; f0edb togglesfx -Sfx_MoveDeleted: ; f0edc +Sfx_MoveDeleted: musicheader 4, 5, Sfx_MoveDeleted_Ch5 musicheader 1, 6, Sfx_MoveDeleted_Ch6 musicheader 1, 7, Sfx_MoveDeleted_Ch7 musicheader 1, 8, Sfx_MoveDeleted_Ch8 -; f0ee8 -Sfx_MoveDeleted_Ch5: ; f0ee8 +Sfx_MoveDeleted_Ch5: togglesfx tempo 116 volume $77 @@ -1353,11 +1195,10 @@ Sfx_MoveDeleted_Ch5: ; f0ee8 note D_, 10 note __, 6 endchannel -; f0f0c togglesfx -Sfx_MoveDeleted_Ch6: ; f0f0d +Sfx_MoveDeleted_Ch6: togglesfx dutycycle $3 vibrato $c, $44 @@ -1390,11 +1231,10 @@ Sfx_MoveDeleted_Ch6: ; f0f0d note F_, 16 note __, 6 endchannel -; f0f36 togglesfx -Sfx_MoveDeleted_Ch7: ; f0f37 +Sfx_MoveDeleted_Ch7: togglesfx notetype $6, $25 octave 2 @@ -1418,11 +1258,10 @@ Sfx_MoveDeleted_Ch7: ; f0f37 note B_, 16 note __, 6 endchannel -; f0f52 togglesfx -Sfx_MoveDeleted_Ch8: ; f0f53 +Sfx_MoveDeleted_Ch8: togglesfx sfxtogglenoise $3 notetype $c @@ -1431,18 +1270,16 @@ Sfx_MoveDeleted_Ch8: ; f0f53 note __, 16 note __, 6 endchannel -; f0f5d togglesfx -Sfx_2ndPlace: ; f0f5e +Sfx_2ndPlace: musicheader 4, 5, Sfx_2ndPlace_Ch5 musicheader 1, 6, Sfx_2ndPlace_Ch6 musicheader 1, 7, Sfx_2ndPlace_Ch7 musicheader 1, 8, Sfx_2ndPlace_Ch8 -; f0f6a -Sfx_2ndPlace_Ch5: ; f0f6a +Sfx_2ndPlace_Ch5: togglesfx tempo 116 volume $77 @@ -1473,11 +1310,10 @@ Sfx_2ndPlace_Ch5: ; f0f6a note B_, 12 note __, 6 endchannel -; f0f91 togglesfx -Sfx_2ndPlace_Ch6: ; f0f92 +Sfx_2ndPlace_Ch6: togglesfx dutycycle $2 notetype $8, $b1 @@ -1498,11 +1334,10 @@ Sfx_2ndPlace_Ch6: ; f0f92 note D_, 12 note __, 6 endchannel -; f0fac togglesfx -Sfx_2ndPlace_Ch7: ; f0fad +Sfx_2ndPlace_Ch7: togglesfx notetype $8, $25 octave 3 @@ -1537,11 +1372,10 @@ Sfx_2ndPlace_Ch7: ; f0fad note G_, 12 note __, 6 endchannel -; f0fd1 togglesfx -Sfx_2ndPlace_Ch8: ; f0fd2 +Sfx_2ndPlace_Ch8: togglesfx sfxtogglenoise $3 notetype $8 @@ -1553,18 +1387,16 @@ Sfx_2ndPlace_Ch8: ; f0fd2 note B_, 12 note __, 6 endchannel -; f0fe1 togglesfx -Sfx_1stPlace: ; f0fe2 +Sfx_1stPlace: musicheader 4, 5, Sfx_1stPlace_Ch5 musicheader 1, 6, Sfx_1stPlace_Ch6 musicheader 1, 7, Sfx_1stPlace_Ch7 musicheader 1, 8, Sfx_1stPlace_Ch8 -; f0fee -Sfx_1stPlace_Ch5: ; f0fee +Sfx_1stPlace_Ch5: togglesfx tempo 124 volume $77 @@ -1602,11 +1434,10 @@ Sfx_1stPlace_Ch5: ; f0fee note A_, 10 note __, 6 endchannel -; f101f togglesfx -Sfx_1stPlace_Ch6: ; f1020 +Sfx_1stPlace_Ch6: togglesfx dutycycle $3 vibrato $c, $34 @@ -1627,11 +1458,10 @@ Sfx_1stPlace_Ch6: ; f1020 note D_, 10 note __, 6 endchannel -; f103c togglesfx -Sfx_1stPlace_Ch7: ; f103d +Sfx_1stPlace_Ch7: togglesfx notetype $c, $25 octave 2 @@ -1652,11 +1482,10 @@ Sfx_1stPlace_Ch7: ; f103d note D_, 10 note __, 6 endchannel -; f1053 togglesfx -Sfx_1stPlace_Ch8: ; f1054 +Sfx_1stPlace_Ch8: togglesfx sfxtogglenoise $4 notetype $6 @@ -1674,18 +1503,16 @@ Sfx_1stPlace_Ch8: ; f1054 note B_, 10 note __, 6 endchannel -; f1068 togglesfx -Sfx_ChooseACard: ; f1069 +Sfx_ChooseACard: musicheader 4, 5, Sfx_ChooseACard_Ch5 musicheader 1, 6, Sfx_ChooseACard_Ch6 musicheader 1, 7, Sfx_ChooseACard_Ch7 musicheader 1, 8, Sfx_ChooseACard_Ch8 -; f1075 -Sfx_ChooseACard_Ch5: ; f1075 +Sfx_ChooseACard_Ch5: togglesfx tempo 152 volume $77 @@ -1728,11 +1555,10 @@ Sfx_ChooseACard_Ch5: ; f1075 note E_, 4 note __, 12 endchannel -; f10a8 togglesfx -Sfx_ChooseACard_Ch6: ; f10a9 +Sfx_ChooseACard_Ch6: togglesfx dutycycle $3 notetype $6, $b4 @@ -1761,11 +1587,10 @@ Sfx_ChooseACard_Ch6: ; f10a9 note A_, 4 note __, 12 endchannel -; f10c8 togglesfx -Sfx_ChooseACard_Ch7: ; f10c9 +Sfx_ChooseACard_Ch7: togglesfx notetype $6, $25 octave 3 @@ -1798,11 +1623,10 @@ Sfx_ChooseACard_Ch7: ; f10c9 note A_, 4 note __, 12 endchannel -; f10eb togglesfx -Sfx_ChooseACard_Ch8: ; f10ec +Sfx_ChooseACard_Ch8: togglesfx sfxtogglenoise $4 notetype $6 @@ -1824,18 +1648,16 @@ Sfx_ChooseACard_Ch8: ; f10ec note D_, 2 note B_, 16 endchannel -; f1103 togglesfx -Sfx_GetTm: ; f1104 +Sfx_GetTm: musicheader 4, 5, Sfx_GetTm_Ch5 musicheader 1, 6, Sfx_GetTm_Ch6 musicheader 1, 7, Sfx_GetTm_Ch7 musicheader 1, 8, Sfx_GetTm_Ch8 -; f1110 -Sfx_GetTm_Ch5: ; f1110 +Sfx_GetTm_Ch5: togglesfx tempo 144 volume $77 @@ -1858,11 +1680,10 @@ Sfx_GetTm_Ch5: ; f1110 note F#, 8 note __, 6 endchannel -; f1130 togglesfx -Sfx_GetTm_Ch6: ; f1131 +Sfx_GetTm_Ch6: togglesfx dutycycle $3 vibrato $8, $24 @@ -1882,11 +1703,10 @@ Sfx_GetTm_Ch6: ; f1131 note D_, 8 note __, 6 endchannel -; f114b togglesfx -Sfx_GetTm_Ch7: ; f114c +Sfx_GetTm_Ch7: togglesfx notetype $6, $25 octave 2 @@ -1914,11 +1734,10 @@ Sfx_GetTm_Ch7: ; f114c note A_, 16 note __, 6 endchannel -; f1169 togglesfx -Sfx_GetTm_Ch8: ; f116a +Sfx_GetTm_Ch8: togglesfx sfxtogglenoise $4 notetype $6 @@ -1935,18 +1754,16 @@ Sfx_GetTm_Ch8: ; f116a note B_, 16 note __, 6 endchannel -; f117c togglesfx -Sfx_GetBadge: ; f117d +Sfx_GetBadge: musicheader 4, 5, Sfx_GetBadge_Ch5 musicheader 1, 6, Sfx_GetBadge_Ch6 musicheader 1, 7, Sfx_GetBadge_Ch7 musicheader 1, 8, Sfx_GetBadge_Ch8 -; f1189 -Sfx_GetBadge_Ch5: ; f1189 +Sfx_GetBadge_Ch5: togglesfx tempo 120 volume $77 @@ -1964,11 +1781,10 @@ Sfx_GetBadge_Ch5: ; f1189 note A_, 16 note __, 6 endchannel -; f11a9 togglesfx -Sfx_GetBadge_branch_f11aa: ; f11aa +Sfx_GetBadge_branch_f11aa: note __, 5 octave 3 note F_, 2 @@ -1989,9 +1805,8 @@ Sfx_GetBadge_branch_f11aa: ; f11aa note C#, 2 note F_, 2 endchannel -; f11be -Sfx_GetBadge_Ch6: ; f11be +Sfx_GetBadge_Ch6: togglesfx dutycycle $3 vibrato $8, $24 @@ -2037,11 +1852,10 @@ Sfx_GetBadge_Ch6: ; f11be note F_, 16 note __, 6 endchannel -; f11f4 togglesfx -Sfx_GetBadge_Ch7: ; f11f5 +Sfx_GetBadge_Ch7: togglesfx notetype $6, $25 octave 2 @@ -2077,11 +1891,10 @@ Sfx_GetBadge_Ch7: ; f11f5 note F_, 16 note __, 6 endchannel -; f121a togglesfx -Sfx_GetBadge_Ch8: ; f121b +Sfx_GetBadge_Ch8: togglesfx sfxtogglenoise $4 notetype $6 @@ -2104,18 +1917,16 @@ Sfx_GetBadge_Ch8: ; f121b note B_, 16 note __, 6 endchannel -; f1235 togglesfx -Sfx_QuitSlots: ; f1236 +Sfx_QuitSlots: musicheader 4, 5, Sfx_QuitSlots_Ch5 musicheader 1, 6, Sfx_QuitSlots_Ch6 musicheader 1, 7, Sfx_QuitSlots_Ch7 musicheader 1, 8, Sfx_QuitSlots_Ch8 -; f1242 -Sfx_QuitSlots_Ch5: ; f1242 +Sfx_QuitSlots_Ch5: togglesfx tempo 144 volume $77 @@ -2144,11 +1955,10 @@ Sfx_QuitSlots_Ch5: ; f1242 note G#, 14 note __, 6 endchannel -; f1265 togglesfx -Sfx_QuitSlots_Ch6: ; f1266 +Sfx_QuitSlots_Ch6: togglesfx dutycycle $2 notetype $8, $b3 @@ -2172,11 +1982,10 @@ Sfx_QuitSlots_Ch6: ; f1266 note F_, 14 note __, 6 endchannel -; f1282 togglesfx -Sfx_QuitSlots_Ch7: ; f1283 +Sfx_QuitSlots_Ch7: togglesfx notetype $8, $25 octave 3 @@ -2204,11 +2013,10 @@ Sfx_QuitSlots_Ch7: ; f1283 note C#, 14 note __, 6 endchannel -; f12a0 togglesfx -Sfx_QuitSlots_Ch8: ; f12a1 +Sfx_QuitSlots_Ch8: togglesfx sfxtogglenoise $3 notetype $8 @@ -2225,16 +2033,14 @@ Sfx_QuitSlots_Ch8: ; f12a1 note B_, 14 note __, 6 endchannel -; f12b3 togglesfx -Sfx_Protect: ; f12b4 +Sfx_Protect: musicheader 2, 5, Sfx_Protect_Ch5 musicheader 1, 8, Sfx_Protect_Ch8 -; f12ba -Sfx_Protect_Ch5: ; f12ba +Sfx_Protect_Ch5: togglesfx notetype $1, $f1 dutycycle $0 @@ -2269,22 +2075,19 @@ Sfx_Protect_Ch5: ; f12ba note C#, 5 note E_, 5 endchannel -; f12e5 -Sfx_Protect_Ch8: ; f12e5 +Sfx_Protect_Ch8: noise __, 10, $9e, $0 noise __, 10, $be, $11 loopchannel 6, Sfx_Protect_Ch8 noise __, 10, $a7, $0 noise C_, 1, $75, $11 endchannel -; f12f6 -Sfx_Sketch: ; f12f6 +Sfx_Sketch: musicheader 1, 5, Sfx_Sketch_Ch5 -; f12f9 -Sfx_Sketch_Ch5: ; f12f9 +Sfx_Sketch_Ch5: dutycycle $1 soundinput $a5 .loop @@ -2295,13 +2098,11 @@ Sfx_Sketch_Ch5: ; f12f9 loopchannel 3, .loop soundinput $8 endchannel -; f1314 -Sfx_RainDance: ; f1314 +Sfx_RainDance: musicheader 1, 8, Sfx_RainDance_Ch8 -; f1317 -Sfx_RainDance_Ch8: ; f1317 +Sfx_RainDance_Ch8: noise __, 12, $7d, $50 noise __, 7, $7d, $4f noise __, 12, $7f, $47 @@ -2312,97 +2113,82 @@ Sfx_RainDance_Ch8: ; f1317 noise __, 6, $4f, $47 noise __, 11, $32, $46 endchannel -; f1334 -Sfx_Aeroblast: ; f1334 +Sfx_Aeroblast: musicheader 2, 5, Sfx_Aeroblast_Ch5 musicheader 1, 8, Sfx_Aeroblast_Ch8 -; f133a -Sfx_Aeroblast_Ch5: ; f133a +Sfx_Aeroblast_Ch5: sound_duty 2, 0, 3, 3 soundinput $f5 sound C_, 13, $f8, $0580 soundinput $8 endchannel -; f1345 -Sfx_Aeroblast_Ch8: ; f1345 +Sfx_Aeroblast_Ch8: noise __, 5, $f8, $6c noise __, 5, $c8, $5c noise __, 5, $78, $5b noise C_, 1, $31, $5a endchannel -; f1352 -Sfx_Spark: ; f1352 +Sfx_Spark: musicheader 1, 8, Sfx_Spark_Ch8 -; f1355 -Sfx_Spark_Ch8: ; f1355 +Sfx_Spark_Ch8: noise __, 5, $f8, $5d noise __, 5, $d8, $6f loopchannel 2, Sfx_Spark_Ch8 endchannel -; f1360 -Sfx_Curse: ; f1360 +Sfx_Curse: musicheader 2, 5, Sfx_Curse_Ch5 musicheader 1, 8, Sfx_Curse_Ch8 -; f1366 -Sfx_Curse_Ch5: ; f1366 +Sfx_Curse_Ch5: dutycycle $3 sound __, 5, $f2, $0483 sound __, 5, $f2, $0511 sound __, 5, $f2, $0589 sound __, 5, $f2, $05ed endchannel -; f1379 -Sfx_Curse_Ch8: ; f1379 +Sfx_Curse_Ch8: noise C_, 5, $9a, $9 endchannel -; f137d -Sfx_Rage: ; f137d +Sfx_Rage: musicheader 2, 5, Sfx_Rage_Ch5 musicheader 1, 8, Sfx_Rage_Ch8 -; f1383 -Sfx_Rage_Ch5: ; f1383 +Sfx_Rage_Ch5: dutycycle $0 sound __, 4, $d1, $07b0 sound __, 4, $d1, $07c2 sound C_, 9, $d2, $07d5 endchannel -; f1392 -Sfx_Rage_Ch8: ; f1392 +Sfx_Rage_Ch8: noise __, 4, $f4, $1a noise __, 4, $f4, $19 noise C_, 9, $f2, $18 endchannel -; f139c -Sfx_Thief: ; f139c +Sfx_Thief: musicheader 1, 8, Sfx_Thief_Ch8 -; f139f -Sfx_Thief_Ch8: ; f139f +Sfx_Thief_Ch8: noise __, 1, $0, $0 noise __, 5, $e1, $12 noise __, 1, $0, $0 noise __, 3, $b1, $22 loopchannel 2, Sfx_Thief_Ch8 endchannel -; f13b0 -Sfx_Thief2: ; f13b0 +Sfx_Thief2: musicheader 1, 5, Sfx_Thief2_Ch5 -; f13b3 -Sfx_Thief2_Ch5: ; f13b3 +Sfx_Thief2_Ch5: togglesfx notetype $2, $f4 dutycycle $0 @@ -2420,14 +2206,12 @@ Sfx_Thief2_Ch5: ; f13b3 note A_, 3 togglesfx endchannel -; f13ca -Sfx_SpiderWeb: ; f13ca +Sfx_SpiderWeb: musicheader 2, 5, Sfx_SpiderWeb_Ch5 musicheader 1, 8, Sfx_SpiderWeb_Ch8 -; f13d0 -Sfx_SpiderWeb_Ch5: ; f13d0 +Sfx_SpiderWeb_Ch5: dutycycle $0 sound C#, 1, $7f, $0720 soundinput $95 @@ -2439,19 +2223,16 @@ Sfx_SpiderWeb_Ch5: ; f13d0 sound __, 5, $51, $0640 soundinput $8 endchannel -; f13f3 -Sfx_SpiderWeb_Ch8: ; f13f3 +Sfx_SpiderWeb_Ch8: noise C#, 1, $ef, $0 endchannel -; f13f7 -Sfx_MindReader: ; f13f7 +Sfx_MindReader: musicheader 2, 5, Sfx_MindReader_Ch5 musicheader 1, 8, Sfx_MindReader_Ch8 -; f13fd -Sfx_MindReader_Ch5: ; f13fd +Sfx_MindReader_Ch5: togglesfx dutycycle $2 notetype $2, $f1 @@ -2469,19 +2250,16 @@ Sfx_MindReader_Ch5: ; f13fd note D_, 3 togglesfx endchannel -; f1416 -Sfx_MindReader_Ch8: ; f1416 +Sfx_MindReader_Ch8: noise C_, 2, $af, $19 noise C_, 3, $af, $18 endchannel -; f141d -Sfx_Nightmare: ; f141d +Sfx_Nightmare: musicheader 1, 5, Sfx_Nightmare_Ch5 -; f1420 -Sfx_Nightmare_Ch5: ; f1420 +Sfx_Nightmare_Ch5: dutycycle $0 soundinput $34 .loop @@ -2498,13 +2276,11 @@ Sfx_Nightmare_Ch5: ; f1420 loopchannel 2, .loop soundinput $8 endchannel -; f1453 -Sfx_Snore: ; f1453 +Sfx_Snore: musicheader 1, 8, Sfx_Snore_Ch8 -; f1456 -Sfx_Snore_Ch8: ; f1456 +Sfx_Snore_Ch8: noise __, 3, $ea, $4b noise __, 3, $ea, $5b noise __, 3, $0, $0 @@ -2512,13 +2288,11 @@ Sfx_Snore_Ch8: ; f1456 noise __, 5, $ee, $46 noise __, 5, $ee, $45 endchannel -; f1469 -Sfx_SweetKiss: ; f1469 +Sfx_SweetKiss: musicheader 1, 5, Sfx_SweetKiss_Ch5 -; f146c -Sfx_SweetKiss_Ch5: ; f146c +Sfx_SweetKiss_Ch5: dutycycle $2 .loop sound __, 3, $c1, $07c8 @@ -2526,13 +2300,11 @@ Sfx_SweetKiss_Ch5: ; f146c loopchannel 2, .loop sound C_, 11, $f1, $07e2 endchannel -; f147f -Sfx_SweetKiss2: ; f147f +Sfx_SweetKiss2: musicheader 1, 5, Sfx_SweetKiss2_Ch5 -; f1482 -Sfx_SweetKiss2_Ch5: ; f1482 +Sfx_SweetKiss2_Ch5: dutycycle $0 soundinput $97 sound __, 3, $f4, $0772 @@ -2544,31 +2316,26 @@ Sfx_SweetKiss2_Ch5: ; f1482 sound __, 3, $a1, $0772 soundinput $8 endchannel -; f14a5 -Sfx_BellyDrum: ; f14a5 +Sfx_BellyDrum: musicheader 2, 5, Sfx_BellyDrum_Ch5 musicheader 1, 8, Sfx_BellyDrum_Ch8 -; f14ab -Sfx_BellyDrum_Ch5: ; f14ab +Sfx_BellyDrum_Ch5: dutycycle $2 soundinput $ac sound __, 13, $f1, $05a3 soundinput $8 endchannel -; f14b6 -Sfx_BellyDrum_Ch8: ; f14b6 +Sfx_BellyDrum_Ch8: noise __, 13, $b1, $6c endchannel -; f14ba -Sfx_Unknown7F: ; f14ba +Sfx_Unknown7F: musicheader 1, 5, Sfx_Unknown7F_Ch5 -; f14bd -Sfx_Unknown7F_Ch5: ; f14bd +Sfx_Unknown7F_Ch5: dutycycle $2 soundinput $95 sound __, 3, $c9, $03b3 @@ -2576,14 +2343,12 @@ Sfx_Unknown7F_Ch5: ; f14bd sound __, 5, $d1, $0543 soundinput $8 endchannel -; f14d0 -Sfx_SludgeBomb: ; f14d0 +Sfx_SludgeBomb: musicheader 2, 5, Sfx_SludgeBomb_Ch5 musicheader 1, 8, Sfx_SludgeBomb_Ch8 -; f14d6 -Sfx_SludgeBomb_Ch5: ; f14d6 +Sfx_SludgeBomb_Ch5: dutycycle $2 soundinput $c5 sound __, 4, $f8, $0581 @@ -2592,20 +2357,17 @@ Sfx_SludgeBomb_Ch5: ; f14d6 sound C_, 1, $f2, $05d1 soundinput $8 endchannel -; f14eb -Sfx_SludgeBomb_Ch8: ; f14eb +Sfx_SludgeBomb_Ch8: noise __, 4, $e2, $6e noise __, 2, $0, $0 noise C_, 1, $e2, $6d endchannel -; f14f5 -Sfx_Foresight: ; f14f5 +Sfx_Foresight: musicheader 1, 5, Sfx_Foresight_Ch5 -; f14f8 -Sfx_Foresight_Ch5: ; f14f8 +Sfx_Foresight_Ch5: sound __, 4, $f4, $07b5 sound __, 4, $f5, $07c8 sound __, 9, $f4, $07da @@ -2614,13 +2376,11 @@ Sfx_Foresight_Ch5: ; f14f8 sound __, 3, $0, 0 sound __, 9, $91, $07da endchannel -; f1515 -Sfx_Spite: ; f1515 +Sfx_Spite: musicheader 1, 5, Sfx_Spite_Ch5 -; f1518 -Sfx_Spite_Ch5: ; f1518 +Sfx_Spite_Ch5: togglesfx vibrato $0, $12 dutycycle $3 @@ -2645,27 +2405,23 @@ Sfx_Spite_Ch5: ; f1518 soundinput $8 togglesfx endchannel -; f153a -Sfx_Outrage: ; f153a +Sfx_Outrage: musicheader 1, 8, Sfx_Outrage_Ch8 -; f153d -Sfx_Outrage_Ch8: ; f153d +Sfx_Outrage_Ch8: noise __, 12, $ea, $6c noise __, 12, $ea, $6b noise __, 12, $ea, $6a noise __, 12, $ea, $69 noise __, 12, $e1, $59 endchannel -; f154d -Sfx_PerishSong: ; f154d +Sfx_PerishSong: musicheader 2, 5, Sfx_PerishSong_Ch5 musicheader 1, 6, Sfx_PerishSong_Ch6 -; f1553 -Sfx_PerishSong_Ch5: ; f1553 +Sfx_PerishSong_Ch5: togglesfx dutycycle $0 vibrato $12, $53 @@ -2675,9 +2431,8 @@ Sfx_PerishSong_Ch5: ; f1553 note G#, 9 togglesfx endchannel -; f1561 -Sfx_PerishSong_Ch6: ; f1561 +Sfx_PerishSong_Ch6: togglesfx dutycycle $0 vibrato $12, $53 @@ -2688,14 +2443,12 @@ Sfx_PerishSong_Ch6: ; f1561 note B_, 9 togglesfx endchannel -; f1570 -Sfx_GigaDrain: ; f1570 +Sfx_GigaDrain: musicheader 2, 5, Sfx_GigaDrain_Ch5 musicheader 1, 8, Sfx_GigaDrain_Ch8 -; f1576 -Sfx_GigaDrain_Ch5: ; f1576 +Sfx_GigaDrain_Ch5: dutycycle $2 soundinput $97 sound __, 5, $f8, $0680 @@ -2709,9 +2462,8 @@ Sfx_GigaDrain_Ch5: ; f1576 sound C_, 5, $88, $0511 soundinput $8 endchannel -; f15a1 -Sfx_GigaDrain_Ch8: ; f15a1 +Sfx_GigaDrain_Ch8: noise __, 5, $c8, $44 noise C_, 5, $c8, $50 noise C_, 5, $c8, $52 @@ -2719,13 +2471,11 @@ Sfx_GigaDrain_Ch8: ; f15a1 noise C_, 5, $c8, $56 noise D#, 1, $c7, $57 endchannel -; f15b4 -Sfx_Attract: ; f15b4 +Sfx_Attract: musicheader 1, 5, Sfx_Attract_Ch5 -; f15b7 -Sfx_Attract_Ch5: ; f15b7 +Sfx_Attract_Ch5: dutycycle $0 soundinput $77 sound __, 5, $a9, $06f0 @@ -2734,37 +2484,31 @@ Sfx_Attract_Ch5: ; f15b7 sound __, 9, $f1, $0740 soundinput $8 endchannel -; f15cc -Sfx_Kinesis2: ; f15cc +Sfx_Kinesis2: musicheader 1, 5, Sfx_Kinesis2_Ch5 -; f15cf -Sfx_Kinesis2_Ch5: ; f15cf +Sfx_Kinesis2_Ch5: dutycycle $0 sound __, 3, $f3, $0796 sound __, 3, $23, $0796 sound C_, 5, $f1, $07c4 endchannel -; f15de -Sfx_ZapCannon: ; f15de +Sfx_ZapCannon: musicheader 1, 8, Sfx_ZapCannon_Ch8 -; f15e1 -Sfx_ZapCannon_Ch8: ; f15e1 +Sfx_ZapCannon_Ch8: noise __, 3, $e1, $49 noise __, 1, $0, $0 loopchannel 8, Sfx_ZapCannon_Ch8 noise __, 9, $e1, $49 endchannel -; f15ef -Sfx_MeanLook: ; f15ef +Sfx_MeanLook: musicheader 1, 5, Sfx_MeanLook_Ch5 -; f15f2 -Sfx_MeanLook_Ch5: ; f15f2 +Sfx_MeanLook_Ch5: soundinput $77 dutycycle $3 sound __, 3, $f8, $0720 @@ -2780,26 +2524,22 @@ Sfx_MeanLook_Ch5: ; f15f2 sound __, 13, $28, $0720 soundinput $8 endchannel -; f1621 -Sfx_HealBell: ; f1621 +Sfx_HealBell: musicheader 1, 5, Sfx_HealBell_Ch5 -; f1624 -Sfx_HealBell_Ch5: ; f1624 +Sfx_HealBell_Ch5: dutycycle $1 sound __, 2, $f1, $07da sound __, 2, $d1, $07d9 sound __, 2, $f1, $07da sound __, 9, $d1, $07db endchannel -; f1637 -Sfx_Return: ; f1637 +Sfx_Return: musicheader 1, 5, Sfx_Return_Ch5 -; f163a -Sfx_Return_Ch5: ; f163a +Sfx_Return_Ch5: dutycycle $0 .loop soundinput $bf @@ -2810,13 +2550,11 @@ Sfx_Return_Ch5: ; f163a loopchannel 2, .loop soundinput $8 endchannel -; f1653 -Sfx_ExpBar: ; f1653 +Sfx_ExpBar: musicheader 1, 5, Sfx_ExpBar_Ch5 -; f1656 -Sfx_ExpBar_Ch5: ; f1656 +Sfx_ExpBar_Ch5: dutycycle $2 soundinput $d7 sound __, 9, $e1, $0750 @@ -2830,13 +2568,11 @@ Sfx_ExpBar_Ch5: ; f1656 sound C_, 1, $a8, $0770 soundinput $8 endchannel -; f167f -Sfx_MilkDrink: ; f167f +Sfx_MilkDrink: musicheader 1, 5, Sfx_MilkDrink_Ch5 -; f1682 -Sfx_MilkDrink_Ch5: ; f1682 +Sfx_MilkDrink_Ch5: dutycycle $2 .loop soundinput $a4 @@ -2848,13 +2584,11 @@ Sfx_MilkDrink_Ch5: ; f1682 loopchannel 6, .loop soundinput $8 endchannel -; f169f -Sfx_Present: ; f169f +Sfx_Present: musicheader 1, 5, Sfx_Present_Ch5 -; f16a2 -Sfx_Present_Ch5: ; f16a2 +Sfx_Present_Ch5: dutycycle $2 soundinput $d6 .loop @@ -2864,13 +2598,11 @@ Sfx_Present_Ch5: ; f16a2 sound C_, 1, $f1, $0780 soundinput $8 endchannel -; f16b9 -Sfx_MorningSun: ; f16b9 +Sfx_MorningSun: musicheader 1, 5, Sfx_MorningSun_Ch5 -; f16bc -Sfx_MorningSun_Ch5: ; f16bc +Sfx_MorningSun_Ch5: dutycycle $3 .loop sound __, 3, $f1, $07e4 @@ -2882,13 +2614,11 @@ Sfx_MorningSun_Ch5: ; f16bc sound __, 2, $0, 0 sound __, 9, $82, $07e7 endchannel -; f16df -Sfx_Moonlight: ; f16df +Sfx_Moonlight: musicheader 1, 5, Sfx_Moonlight_Ch5 -; f16e2 -Sfx_Moonlight_Ch5: ; f16e2 +Sfx_Moonlight_Ch5: dutycycle $2 .loop sound __, 2, $f8, $07d0 @@ -2898,14 +2628,12 @@ Sfx_Moonlight_Ch5: ; f16e2 sound C_, 1, $d1, $07e0 sound C_, 1, $81, $07e0 endchannel -; f16fd -Sfx_Encore: ; f16fd +Sfx_Encore: musicheader 2, 5, Sfx_Encore_Ch5 musicheader 1, 8, Sfx_Encore_Ch8 -; f1703 -Sfx_Encore_Ch5: ; f1703 +Sfx_Encore_Ch5: dutycycle $2 soundinput $ce sound C_, 1, $0, 0 @@ -2915,32 +2643,27 @@ Sfx_Encore_Ch5: ; f1703 loopchannel 2, .loop soundinput $8 endchannel -; f171a -Sfx_Encore_Ch8: ; f171a +Sfx_Encore_Ch8: noise D_, 1, $1f, $36 noise D_, 1, $76, $36 endchannel -; f1721 -Sfx_BeatUp: ; f1721 +Sfx_BeatUp: musicheader 1, 8, Sfx_BeatUp_Ch8 -; f1724 -Sfx_BeatUp_Ch8: ; f1724 +Sfx_BeatUp_Ch8: noise __, 3, $e8, $69 noise __, 7, $d8, $24 noise __, 3, $e8, $6c noise __, 5, $c8, $46 noise __, 7, $d1, $24 endchannel -; f1734 -Sfx_SweetScent: ; f1734 +Sfx_SweetScent: musicheader 1, 5, Sfx_SweetScent_Ch5 -; f1737 -Sfx_SweetScent_Ch5: ; f1737 +Sfx_SweetScent_Ch5: dutycycle $2 soundinput $96 sound __, 7, $f8, $0760 @@ -2949,14 +2672,12 @@ Sfx_SweetScent_Ch5: ; f1737 sound C_, 7, $f1, $0730 soundinput $8 endchannel -; f174c -Sfx_BatonPass: ; f174c +Sfx_BatonPass: musicheader 2, 5, Sfx_BatonPass_Ch5 musicheader 1, 8, Sfx_BatonPass_Ch8 -; f1752 -Sfx_BatonPass_Ch5: ; f1752 +Sfx_BatonPass_Ch5: dutycycle $2 soundinput $f7 sound C#, 1, $f2, $0680 @@ -2967,18 +2688,15 @@ Sfx_BatonPass_Ch5: ; f1752 sound __, 2, $f1, $0760 soundinput $8 endchannel -; f1771 -Sfx_BatonPass_Ch8: ; f1771 +Sfx_BatonPass_Ch8: noise C#, 1, $f2, $20 endchannel -; f1775 -Sfx_EggCrack: ; f1775 +Sfx_EggCrack: musicheader 1, 5, Sfx_EggCrack_Ch5 -; f1778 -Sfx_EggCrack_Ch5: ; f1778 +Sfx_EggCrack_Ch5: togglesfx notetype $1, $f1 dutycycle $0 @@ -2988,13 +2706,11 @@ Sfx_EggCrack_Ch5: ; f1778 note __, 1 note F#, 1 endchannel -; f1784 -Sfx_Evolved: ; f1784 +Sfx_Evolved: musicheader 1, 5, Sfx_Evolved_Ch5 -; f1787 -Sfx_Evolved_Ch5: ; f1787 +Sfx_Evolved_Ch5: togglesfx notetype $1, $c1 octave 4 @@ -3013,13 +2729,11 @@ Sfx_Evolved_Ch5: ; f1787 octave 7 note C_, 16 endchannel -; f179b -Sfx_MasterBall: ; f179b +Sfx_MasterBall: musicheader 1, 5, Sfx_MasterBall_Ch5 -; f179e -Sfx_MasterBall_Ch5: ; f179e +Sfx_MasterBall_Ch5: togglesfx dutycycle $1 notetype $2, $e1 @@ -3048,13 +2762,11 @@ Sfx_MasterBall_Ch5: ; f179e note C#, 2 note C_, 2 endchannel -; f17c0 -Sfx_EggHatch: ; f17c0 +Sfx_EggHatch: musicheader 1, 5, Sfx_EggHatch_Ch5 -; f17c3 -Sfx_EggHatch_Ch5: ; f17c3 +Sfx_EggHatch_Ch5: togglesfx notetype $2, $f1 dutycycle $2 @@ -3071,13 +2783,11 @@ Sfx_EggHatch_Ch5: ; f17c3 intensity $42 note B_, 7 endchannel -; f17d9 -Sfx_GsIntroCharizardFireball: ; f17d9 +Sfx_GsIntroCharizardFireball: musicheader 1, 8, Sfx_GsIntroCharizardFireball_Ch8 -; f17dc -Sfx_GsIntroCharizardFireball_Ch8: ; f17dc +Sfx_GsIntroCharizardFireball_Ch8: noise __, 9, $cf, $4d noise __, 9, $f1, $37 .loop @@ -3091,13 +2801,11 @@ Sfx_GsIntroCharizardFireball_Ch8: ; f17dc noise __, 13, $d8, $5c noise C#, 9, $d3, $4f endchannel -; f17ff -Sfx_GsIntroPokemonAppears: ; f17ff +Sfx_GsIntroPokemonAppears: musicheader 1, 8, Sfx_GsIntroPokemonAppears_Ch8 -; f1802 -Sfx_GsIntroPokemonAppears_Ch8: ; f1802 +Sfx_GsIntroPokemonAppears_Ch8: noise __, 2, $88, $4f noise __, 3, $8f, $2 noise __, 3, $5f, $12 @@ -3106,13 +2814,11 @@ Sfx_GsIntroPokemonAppears_Ch8: ; f1802 noise __, 2, $f8, $4f noise __, 9, $f1, $0 endchannel -; f1818 -Sfx_Flash: ; f1818 +Sfx_Flash: musicheader 1, 5, Sfx_Flash_Ch5 -; f181b -Sfx_Flash_Ch5: ; f181b +Sfx_Flash_Ch5: dutycycle $1 soundinput $ef sound __, 2, $40, $07e8 @@ -3126,13 +2832,11 @@ Sfx_Flash_Ch5: ; f181b sound __, 16, $12, $07e8 soundinput $8 endchannel -; f1846 -Sfx_GameFreakLogoGs: ; f1846 +Sfx_GameFreakLogoGs: musicheader 1, 5, Sfx_GameFreakLogoGs_Ch5 -; f1849 -Sfx_GameFreakLogoGs_Ch5: ; f1849 +Sfx_GameFreakLogoGs_Ch5: dutycycle $3 soundinput $7f sound __, 5, $55, $07e2 @@ -3147,16 +2851,14 @@ Sfx_GameFreakLogoGs_Ch5: ; f1849 sound __, 11, $15, $07e2 soundinput $8 endchannel -; f1878 -Sfx_DexFanfareLessThan20: ; f1878 +Sfx_DexFanfareLessThan20: musicheader 4, 5, Sfx_DexFanfareLessThan20_Ch5 musicheader 1, 6, Sfx_DexFanfareLessThan20_Ch6 musicheader 1, 7, Sfx_DexFanfareLessThan20_Ch7 musicheader 1, 8, Sfx_DexFanfareLessThan20_Ch8 -; f1884 -Sfx_DexFanfareLessThan20_Ch5: ; f1884 +Sfx_DexFanfareLessThan20_Ch5: togglesfx tempo 124 volume $77 @@ -3174,11 +2876,10 @@ Sfx_DexFanfareLessThan20_Ch5: ; f1884 note E_, 2 note D_, 6 endchannel -; f189a togglesfx -Sfx_DexFanfareLessThan20_Ch6: ; f189b +Sfx_DexFanfareLessThan20_Ch6: togglesfx notetype $8, $c1 octave 3 @@ -3194,11 +2895,10 @@ Sfx_DexFanfareLessThan20_Ch6: ; f189b note G_, 2 note F#, 6 endchannel -; f18ac togglesfx -Sfx_DexFanfareLessThan20_Ch7: ; f18ad +Sfx_DexFanfareLessThan20_Ch7: togglesfx notetype $8, $25 octave 4 @@ -3223,11 +2923,10 @@ Sfx_DexFanfareLessThan20_Ch7: ; f18ad note A_, 2 note __, 6 endchannel -; f18c7 togglesfx -Sfx_DexFanfareLessThan20_Ch8: ; f18c8 +Sfx_DexFanfareLessThan20_Ch8: togglesfx sfxtogglenoise $4 notetype $c @@ -3235,18 +2934,16 @@ Sfx_DexFanfareLessThan20_Ch8: ; f18c8 note __, 16 note __, 12 endchannel -; f18d1 togglesfx -Sfx_DexFanfare140169: ; f18d2 +Sfx_DexFanfare140169: musicheader 4, 5, Sfx_DexFanfare140169_Ch5 musicheader 1, 6, Sfx_DexFanfare140169_Ch6 musicheader 1, 7, Sfx_DexFanfare140169_Ch7 musicheader 1, 8, Sfx_DexFanfare140169_Ch8 -; f18de -Sfx_DexFanfare140169_Ch5: ; f18de +Sfx_DexFanfare140169_Ch5: togglesfx tempo 120 volume $77 @@ -3272,11 +2969,10 @@ Sfx_DexFanfare140169_Ch5: ; f18de note B_, 8 note __, 8 endchannel -; f1900 togglesfx -Sfx_DexFanfare140169_Ch6: ; f1901 +Sfx_DexFanfare140169_Ch6: togglesfx dutycycle $2 vibrato $12, $34 @@ -3299,11 +2995,10 @@ Sfx_DexFanfare140169_Ch6: ; f1901 note G_, 8 note __, 8 endchannel -; f191d togglesfx -Sfx_DexFanfare140169_Ch7: ; f191e +Sfx_DexFanfare140169_Ch7: togglesfx notetype $c, $25 note __, 4 @@ -3334,11 +3029,10 @@ Sfx_DexFanfare140169_Ch7: ; f191e note G_, 4 note __, 4 endchannel -; f193e togglesfx -Sfx_DexFanfare140169_Ch8: ; f193f +Sfx_DexFanfare140169_Ch8: togglesfx sfxtogglenoise $4 notetype $c @@ -3352,18 +3046,16 @@ Sfx_DexFanfare140169_Ch8: ; f193f loopchannel 3, .loop note D_, 8 endchannel -; f1950 togglesfx -Sfx_DexFanfare170199: ; f1951 +Sfx_DexFanfare170199: musicheader 4, 5, Sfx_DexFanfare170199_Ch5 musicheader 1, 6, Sfx_DexFanfare170199_Ch6 musicheader 1, 7, Sfx_DexFanfare170199_Ch7 musicheader 1, 8, Sfx_DexFanfare170199_Ch8 -; f195d -Sfx_DexFanfare170199_Ch5: ; f195d +Sfx_DexFanfare170199_Ch5: togglesfx tempo 112 volume $77 @@ -3389,11 +3081,10 @@ Sfx_DexFanfare170199_Ch5: ; f195d note A#, 12 note __, 4 endchannel -; f1981 togglesfx -Sfx_DexFanfare170199_Ch6: ; f1982 +Sfx_DexFanfare170199_Ch6: togglesfx vibrato $12, $34 dutycycle $3 @@ -3418,11 +3109,10 @@ Sfx_DexFanfare170199_Ch6: ; f1982 note D_, 12 note __, 4 endchannel -; f19a2 togglesfx -Sfx_DexFanfare170199_Ch7: ; f19a3 +Sfx_DexFanfare170199_Ch7: togglesfx notetype $8, $25 octave 3 @@ -3447,11 +3137,10 @@ Sfx_DexFanfare170199_Ch7: ; f19a3 note A#, 12 note __, 4 endchannel -; f19bf togglesfx -Sfx_DexFanfare170199_Ch8: ; f19c0 +Sfx_DexFanfare170199_Ch8: togglesfx sfxtogglenoise $4 notetype $8 @@ -3470,18 +3159,16 @@ Sfx_DexFanfare170199_Ch8: ; f19c0 notetype $c note B_, 16 endchannel -; f19d5 db $fd -Sfx_DexFanfare200229: ; f19d6 +Sfx_DexFanfare200229: musicheader 4, 5, Sfx_DexFanfare200229_Ch5 musicheader 1, 6, Sfx_DexFanfare200229_Ch6 musicheader 1, 7, Sfx_DexFanfare200229_Ch7 musicheader 1, 8, Sfx_DexFanfare200229_Ch8 -; f19e2 -Sfx_DexFanfare200229_Ch5: ; f19e2 +Sfx_DexFanfare200229_Ch5: togglesfx tempo 124 volume $77 @@ -3505,11 +3192,10 @@ Sfx_DexFanfare200229_Ch5: ; f19e2 note F#, 12 note __, 4 endchannel -; f1a03 togglesfx -Sfx_DexFanfare200229_Ch6: ; f1a04 +Sfx_DexFanfare200229_Ch6: togglesfx vibrato $12, $34 dutycycle $3 @@ -3529,11 +3215,10 @@ Sfx_DexFanfare200229_Ch6: ; f1a04 note A_, 12 note __, 4 endchannel -; f1a1e togglesfx -Sfx_DexFanfare200229_Ch7: ; f1a1f +Sfx_DexFanfare200229_Ch7: togglesfx notetype $8, $25 octave 3 @@ -3574,11 +3259,10 @@ Sfx_DexFanfare200229_Ch7: ; f1a1f note D_, 6 note __, 6 endchannel -; f1a49 togglesfx -Sfx_DexFanfare200229_Ch8: ; f1a4a +Sfx_DexFanfare200229_Ch8: togglesfx sfxtogglenoise $4 notetype $8 @@ -3604,18 +3288,16 @@ Sfx_DexFanfare200229_Ch8: ; f1a4a note D_, 2 note B_, 12 endchannel -; f1a65 togglesfx -Sfx_DexFanfare230Plus: ; f1a66 +Sfx_DexFanfare230Plus: musicheader 4, 5, Sfx_DexFanfare230Plus_Ch5 musicheader 1, 6, Sfx_DexFanfare230Plus_Ch6 musicheader 1, 7, Sfx_DexFanfare230Plus_Ch7 musicheader 1, 8, Sfx_DexFanfare230Plus_Ch8 -; f1a72 -Sfx_DexFanfare230Plus_Ch5: ; f1a72 +Sfx_DexFanfare230Plus_Ch5: togglesfx tempo 112 volume $77 @@ -3660,11 +3342,10 @@ Sfx_DexFanfare230Plus_Ch5: ; f1a72 note A_, 14 note __, 2 endchannel -; f1ab1 togglesfx -Sfx_DexFanfare230Plus_Ch6: ; f1ab2 +Sfx_DexFanfare230Plus_Ch6: togglesfx vibrato $12, $34 dutycycle $3 @@ -3696,11 +3377,10 @@ Sfx_DexFanfare230Plus_Ch6: ; f1ab2 note F#, 14 note __, 2 endchannel -; f1ad9 togglesfx -Sfx_DexFanfare230Plus_Ch7: ; f1ada +Sfx_DexFanfare230Plus_Ch7: togglesfx notetype $8, $25 octave 3 @@ -3746,11 +3426,10 @@ Sfx_DexFanfare230Plus_Ch7: ; f1ada note D_, 14 note __, 2 endchannel -; f1b0b togglesfx -Sfx_DexFanfare230Plus_Ch8: ; f1b0c +Sfx_DexFanfare230Plus_Ch8: togglesfx sfxtogglenoise $4 notetype $8 @@ -3783,52 +3462,44 @@ Sfx_DexFanfare230Plus_Ch8: ; f1b0c loopchannel 18, .loop2 note D_, 6 endchannel -; f1b32 togglesfx -Sfx_NotVeryEffective: ; f1b33 +Sfx_NotVeryEffective: musicheader 1, 8, Sfx_NotVeryEffective_Ch8 -; f1b36 -Sfx_NotVeryEffective_Ch8: ; f1b36 +Sfx_NotVeryEffective_Ch8: noise __, 5, $f1, $5f noise __, 2, $a0, $42 noise C_, 1, $f1, $53 endchannel -; f1b40 -Sfx_Damage: ; f1b40 +Sfx_Damage: musicheader 1, 8, Sfx_Damage_Ch8 -; f1b43 -Sfx_Damage_Ch8: ; f1b43 +Sfx_Damage_Ch8: noise __, 5, $f1, $5e noise __, 2, $a0, $12 noise __, 5, $f0, $32 noise C_, 1, $f1, $44 endchannel -; f1b50 -Sfx_SuperEffective: ; f1b50 +Sfx_SuperEffective: musicheader 1, 8, Sfx_SuperEffective_Ch8 -; f1b53 -Sfx_SuperEffective_Ch8: ; f1b53 +Sfx_SuperEffective_Ch8: noise __, 4, $f1, $4f noise __, 2, $c8, $22 noise __, 3, $f8, $3f noise __, 4, $d0, $15 noise C#, 1, $f2, $35 endchannel -; f1b63 -Sfx_BallBounce: ; f1b63 +Sfx_BallBounce: musicheader 2, 5, Sfx_BallBounce_Ch5 musicheader 1, 6, Sfx_BallBounce_Ch6 -; f1b69 -Sfx_BallBounce_Ch5: ; f1b69 +Sfx_BallBounce_Ch5: dutycycle $2 sound __, 9, $e1, $0740 sound C_, 8, $0, 0 @@ -3839,9 +3510,8 @@ Sfx_BallBounce_Ch5: ; f1b69 sound __, 9, $51, $0740 sound C_, 8, $0, 0 endchannel -; f1b8c -Sfx_BallBounce_Ch6: ; f1b8c +Sfx_BallBounce_Ch6: dutycycle $2 sound __, 3, $8, 0 sound __, 9, $b1, $0741 @@ -3853,14 +3523,12 @@ Sfx_BallBounce_Ch6: ; f1b8c sound __, 9, $21, $0741 sound C_, 8, $0, 0 endchannel -; f1bb3 -Sfx_SweetScent2: ; f1bb3 +Sfx_SweetScent2: musicheader 2, 5, Sfx_SweetScent2_Ch5 musicheader 1, 8, Sfx_SweetScent2_Ch8 -; f1bb9 -Sfx_SweetScent2_Ch5: ; f1bb9 +Sfx_SweetScent2_Ch5: soundinput $af dutycycle $1 sound __, 7, $f8, $05f0 @@ -3868,9 +3536,8 @@ Sfx_SweetScent2_Ch5: ; f1bb9 sound C_, 1, $f1, $0650 soundinput $8 endchannel -; f1bcc -Sfx_SweetScent2_Ch8: ; f1bcc +Sfx_SweetScent2_Ch8: noise __, 3, $e8, $22 noise C_, 2, $aa, $0 .loop @@ -3883,34 +3550,29 @@ Sfx_SweetScent2_Ch8: ; f1bcc noise __, 7, $59, $0 noise __, 3, $21, $7 endchannel -; f1bec -Sfx_HitEndOfExpBar: ; f1bec +Sfx_HitEndOfExpBar: musicheader 2, 5, Sfx_HitEndOfExpBar_Ch5 musicheader 1, 6, Sfx_HitEndOfExpBar_Ch6 -; f1bf2 -Sfx_HitEndOfExpBar_Ch5: ; f1bf2 +Sfx_HitEndOfExpBar_Ch5: dutycycle $2 sound __, 2, $e1, $0789 sound __, 2, $e1, $07a2 sound C_, 1, $e1, $07b1 endchannel -; f1c01 -Sfx_HitEndOfExpBar_Ch6: ; f1c01 +Sfx_HitEndOfExpBar_Ch6: dutycycle $2 sound __, 2, $e1, $07a2 sound __, 2, $e1, $07b1 sound C_, 1, $e1, $07c4 endchannel -; f1c10 -Sfx_GiveTrademon: ; f1c10 +Sfx_GiveTrademon: musicheader 1, 5, Sfx_GiveTrademon_Ch5 -; f1c13 -Sfx_GiveTrademon_Ch5: ; f1c13 +Sfx_GiveTrademon_Ch5: sound C#, 1, $0, 0 dutycycle $1 soundinput $a7 @@ -3924,13 +3586,11 @@ Sfx_GiveTrademon_Ch5: ; f1c13 sound C_, 12, $14, $0750 soundinput $8 endchannel -; f1c3e -Sfx_GetTrademon: ; f1c3e +Sfx_GetTrademon: musicheader 1, 5, Sfx_GetTrademon_Ch5 -; f1c41 -Sfx_GetTrademon_Ch5: ; f1c41 +Sfx_GetTrademon_Ch5: sound C#, 1, $0, 0 dutycycle $2 soundinput $bf @@ -3944,18 +3604,16 @@ Sfx_GetTrademon_Ch5: ; f1c41 sound C_, 12, $f4, $07bc soundinput $8 endchannel -; f1c6c -Sfx_TrainArrived: ; f1c6c +Sfx_TrainArrived: musicheader 3, 5, Sfx_TrainArrived_Ch5 musicheader 1, 6, Sfx_TrainArrived_Ch6 musicheader 1, 8, Sfx_TrainArrived_Ch8 -; f1c75 -Sfx_TrainArrived_Ch6: ; f1c75 +Sfx_TrainArrived_Ch6: tone $0008 sound __, 9, $0, 0 -Sfx_TrainArrived_Ch5: ; f1c7c +Sfx_TrainArrived_Ch5: dutycycle $2 sound __, 5, $5f, $0691 sound __, 5, $6f, $0694 @@ -3965,9 +3623,8 @@ Sfx_TrainArrived_Ch5: ; f1c7c sound C_, 1, $6f, $06ab sound F_, 9, $65, $06a8 endchannel -; f1c9b -Sfx_TrainArrived_Ch8: ; f1c9b +Sfx_TrainArrived_Ch8: noise __, 6, $af, $10 noise __, 5, $9f, $20 noise __, 5, $8f, $21 @@ -3977,13 +3634,11 @@ Sfx_TrainArrived_Ch8: ; f1c9b noise __, 5, $9f, $10 noise F_, 9, $a3, $0 endchannel -; f1cb4 -Sfx_2Boops: ; f1cb4 +Sfx_2Boops: musicheader 1, 5, Sfx_2Boops_Ch5 -; f1cb7 -Sfx_2Boops_Ch5: ; f1cb7 +Sfx_2Boops_Ch5: dutycycle $2 .loop soundinput $79 @@ -3994,19 +3649,16 @@ Sfx_2Boops_Ch5: ; f1cb7 loopchannel 2, .loop soundinput $8 endchannel -; f1cd0 -Sfx_UnknownCB: ; f1cd0 +Sfx_UnknownCB: musicheader 1, 8, Sfx_UnknownCB_Ch8 -; f1cd3 -Sfx_Menu_Ch8: ; f1cd3 +Sfx_Menu_Ch8: noise __, 2, $e2, $33 noise __, 9, $e1, $22 endchannel -; f1cda -Sfx_Pokeflute_Ch7: ; f1cda +Sfx_Pokeflute_Ch7: tempo 256 volume $77 togglesfx @@ -4030,37 +3682,32 @@ Sfx_Pokeflute_Ch7: ; f1cda note G_, 8 note __, 12 endchannel -; f1cf8 -Sfx_PlacePuzzlePieceDown_Ch8: ; f1cf8 +Sfx_PlacePuzzlePieceDown_Ch8: noise __, 3, $f7, $24 noise __, 3, $f7, $34 noise __, 5, $f7, $44 noise __, 9, $f4, $55 noise __, 9, $f1, $44 endchannel -; f1d08 -Sfx_EnterDoor_Ch8: ; f1d08 +Sfx_EnterDoor_Ch8: noise __, 10, $f1, $44 noise __, 9, $d1, $43 endchannel -; f1d0f -Sfx_SwitchPokemon_Ch5: ; f1d0f +Sfx_SwitchPokemon_Ch5: dutycycle $2 sound __, 9, $e1, $0740 endchannel -; f1d16 -Sfx_SwitchPokemon_Ch6: ; f1d16 +Sfx_SwitchPokemon_Ch6: dutycycle $2 sound __, 3, $8, 0 sound __, 9, $b1, $0741 endchannel -; f1d21 -Sfx_PokeballsPlacedOnTable_Ch5: ; f1d21 +Sfx_PokeballsPlacedOnTable_Ch5: dutycycle $2 soundinput $3a sound __, 5, $f2, $0200 @@ -4068,9 +3715,8 @@ Sfx_PokeballsPlacedOnTable_Ch5: ; f1d21 sound __, 9, $e2, $0200 soundinput $8 endchannel -; f1d32 -Sfx_BallWobble_Ch5: ; f1d32 +Sfx_BallWobble_Ch5: dutycycle $2 soundinput $3a sound __, 5, $f2, $0400 @@ -4078,73 +3724,64 @@ Sfx_BallWobble_Ch5: ; f1d32 sound __, 9, $e2, $0400 soundinput $8 endchannel -; f1d43 -Sfx_Tally_Ch5: ; f1d43 +Sfx_Tally_Ch5: dutycycle $2 sound __, 5, $f1, $0780 endchannel -; f1d4a -Sfx_Tally_Ch6: ; f1d4a +Sfx_Tally_Ch6: dutycycle $2 sound __, 2, $8, 0 sound __, 5, $a1, $0761 endchannel -; f1d55 -Sfx_Transaction_Ch5: ; f1d55 +Sfx_Transaction_Ch5: dutycycle $2 sound __, 5, $e1, $0700 sound C_, 9, $f2, $07e0 endchannel -; f1d60 -Sfx_Transaction_Ch6: ; f1d60 +Sfx_Transaction_Ch6: dutycycle $2 sound __, 2, $8, 0 sound __, 5, $91, $06c1 sound C_, 9, $a2, $07a1 endchannel -; f1d6f -Sfx_Bump_Ch5: ; f1d6f +Sfx_Bump_Ch5: dutycycle $2 soundinput $5a sound __, 16, $f1, $0300 soundinput $8 endchannel -; f1d7a -Sfx_ExitBuilding_Ch8: ; f1d7a +Sfx_ExitBuilding_Ch8: noise __, 3, $f1, $54 noise __, 13, $71, $23 noise __, 3, $b1, $54 noise __, 13, $61, $23 noise __, 7, $41, $54 endchannel -; f1d8a -Sfx_ReadText2_Ch5: ; f1d8a -Sfx_ReadText_Ch5: ; f1d8a +Sfx_ReadText2_Ch5: +Sfx_ReadText_Ch5: dutycycle $2 sound __, 1, $91, $07c0 sound __, 1, $81, $07d0 sound __, 1, $91, $07c0 sound __, 13, $a1, $07d0 endchannel -; f1d9d -Sfx_Potion_Ch5: ; f1d9d +Sfx_Potion_Ch5: dutycycle $2 soundinput $17 sound __, 16, $f0, $04f0 sound __, 16, $f2, $0650 soundinput $8 endchannel -; f1dac -Sfx_Poison_Ch5: ; f1dac +Sfx_Poison_Ch5: dutycycle $0 soundinput $14 sound __, 5, $f2, $0600 @@ -4152,9 +3789,8 @@ Sfx_Poison_Ch5: ; f1dac sound __, 16, $f3, $0600 soundinput $8 endchannel -; f1dbf -Sfx_FullHeal_Ch5: ; f1dbf +Sfx_FullHeal_Ch5: dutycycle $2 soundinput $14 sound __, 5, $f2, $0600 @@ -4163,18 +3799,16 @@ Sfx_FullHeal_Ch5: ; f1dbf sound __, 16, $f2, $0600 soundinput $8 endchannel -; f1dd4 -Sfx_GotSafariBalls_Ch5: ; f1dd4 +Sfx_GotSafariBalls_Ch5: dutycycle $2 soundinput $15 sound __, 16, $f0, $04f0 sound __, 16, $f2, $0650 soundinput $8 endchannel -; f1de3 -Sfx_BootPc_Ch5: ; f1de3 +Sfx_BootPc_Ch5: dutycycle $2 sound __, 16, $f2, $07c0 sound __, 16, $0, 0 @@ -4187,27 +3821,24 @@ Sfx_BootPc_Ch5: ; f1de3 sound __, 4, $a1, $07c0 sound __, 9, $a1, $0700 endchannel -; f1e0e -Sfx_ShutDownPc_Ch5: ; f1e0e +Sfx_ShutDownPc_Ch5: dutycycle $2 sound __, 5, $f0, $0600 sound __, 5, $f0, $0400 sound __, 5, $f0, $0200 sound __, 2, $0, 0 endchannel -; f1e21 -Sfx_ChoosePcOption_Ch5: ; f1e21 +Sfx_ChoosePcOption_Ch5: dutycycle $2 sound __, 7, $f0, $0700 sound __, 5, $0, 0 sound __, 7, $f0, $0700 sound __, 2, $0, 0 endchannel -; f1e34 -Sfx_EscapeRope_Ch5: ; f1e34 +Sfx_EscapeRope_Ch5: dutycycle $1 soundinput $17 sound __, 16, $d7, $0600 @@ -4217,9 +3848,8 @@ Sfx_EscapeRope_Ch5: ; f1e34 sound __, 16, $17, $0400 soundinput $8 endchannel -; f1e4f -Sfx_PushButton_Ch5: ; f1e4f +Sfx_PushButton_Ch5: dutycycle $2 sound __, 5, $0, 0 sound __, 3, $f1, $0680 @@ -4227,9 +3857,8 @@ Sfx_PushButton_Ch5: ; f1e4f sound __, 5, $f1, $0780 sound __, 5, $0, 0 endchannel -; f1e66 -Sfx_SecondPartOfItemfinder_Ch5: ; f1e66 +Sfx_SecondPartOfItemfinder_Ch5: dutycycle $2 soundinput $2c sound __, 5, $f2, $0500 @@ -4238,9 +3867,8 @@ Sfx_SecondPartOfItemfinder_Ch5: ; f1e66 soundinput $8 sound __, 2, $0, 0 endchannel -; f1e7b -Sfx_WarpTo_Ch5: ; f1e7b +Sfx_WarpTo_Ch5: dutycycle $1 soundinput $17 sound __, 16, $d7, $0500 @@ -4250,9 +3878,8 @@ Sfx_WarpTo_Ch5: ; f1e7b sound __, 16, $17, $0700 soundinput $8 endchannel -; f1e96 -Sfx_WarpFrom_Ch5: ; f1e96 +Sfx_WarpFrom_Ch5: dutycycle $1 soundinput $17 sound __, 16, $d7, $0700 @@ -4262,33 +3889,29 @@ Sfx_WarpFrom_Ch5: ; f1e96 sound __, 16, $17, $0500 soundinput $8 endchannel -; f1eb1 -Sfx_ChangeDexMode_Ch5: ; f1eb1 +Sfx_ChangeDexMode_Ch5: dutycycle $1 soundinput $16 sound __, 16, $d2, $0500 soundinput $8 endchannel -; f1ebc -Sfx_JumpOverLedge_Ch5: ; f1ebc +Sfx_JumpOverLedge_Ch5: dutycycle $2 soundinput $95 sound __, 16, $f2, $0400 soundinput $8 endchannel -; f1ec7 -Sfx_GrassRustle_Ch8: ; f1ec7 +Sfx_GrassRustle_Ch8: noise __, 3, $f1, $32 noise __, 3, $0, $0 noise __, 3, $f1, $22 noise __, 2, $0, $0 endchannel -; f1ed4 -Sfx_Fly_Ch8: ; f1ed4 +Sfx_Fly_Ch8: noise __, 3, $f1, $12 noise __, 3, $0, $0 noise __, 3, $a1, $12 @@ -4306,9 +3929,8 @@ Sfx_Fly_Ch8: ; f1ed4 noise __, 3, $41, $12 noise __, 3, $0, $0 endchannel -; f1f05 -Sfx_Wrong_Ch5: ; f1f05 +Sfx_Wrong_Ch5: dutycycle $3 soundinput $5a sound __, 5, $f0, $0500 @@ -4317,26 +3939,23 @@ Sfx_Wrong_Ch5: ; f1f05 sound __, 16, $f0, $0500 sound __, 2, $0, 0 endchannel -; f1f1c -Sfx_Wrong_Ch6: ; f1f1c +Sfx_Wrong_Ch6: dutycycle $3 sound __, 5, $f0, $0401 sound __, 5, $0, 0 sound __, 16, $f0, $0401 sound __, 2, $0, 0 endchannel -; f1f2f -Sfx_Squeak_Ch5: ; f1f2f +Sfx_Squeak_Ch5: dutycycle $0 soundinput $17 sound __, 16, $d2, $0700 soundinput $8 endchannel -; f1f3a -Sfx_Strength_Ch8: ; f1f3a +Sfx_Strength_Ch8: noise __, 5, $a2, $23 noise __, 9, $f1, $34 noise __, 16, $0, $0 @@ -4346,9 +3965,8 @@ Sfx_Strength_Ch8: ; f1f3a noise __, 9, $f4, $55 noise __, 9, $f1, $44 endchannel -; f1f53 -Sfx_Boat_Ch5: ; f1f53 +Sfx_Boat_Ch5: dutycycle $2 sound __, 16, $f0, $0500 sound __, 5, $0, 0 @@ -4358,9 +3976,8 @@ Sfx_Boat_Ch5: ; f1f53 sound __, 16, $f0, $0500 sound __, 16, $f2, $0500 endchannel -; f1f72 -Sfx_Boat_Ch6: ; f1f72 +Sfx_Boat_Ch6: dutycycle $3 sound __, 16, $f0, $0482 sound __, 5, $0, 0 @@ -4370,9 +3987,8 @@ Sfx_Boat_Ch6: ; f1f72 sound __, 16, $f0, $0482 sound __, 16, $f2, $0482 endchannel -; f1f91 -Sfx_WallOpen_Ch5: ; f1f91 +Sfx_WallOpen_Ch5: dutycycle $1 soundinput $3a sound __, 5, $f2, $0500 @@ -4384,9 +4000,8 @@ Sfx_WallOpen_Ch5: ; f1f91 sound __, 16, $e2, $0700 soundinput $8 endchannel -; f1fae -Sfx_ElevatorEnd_Ch5: ; f1fae +Sfx_ElevatorEnd_Ch5: dutycycle $2 sound __, 16, $f3, $0730 sound __, 9, $65, $0730 @@ -4395,22 +4010,19 @@ Sfx_ElevatorEnd_Ch5: ; f1fae sound __, 16, $44, $0700 sound __, 16, $24, $0700 endchannel -; f1fc9 -Sfx_ThrowBall_Ch5: ; f1fc9 +Sfx_ThrowBall_Ch5: dutycycle $2 soundinput $2f sound __, 16, $f2, $0780 endchannel -; f1fd2 -Sfx_ThrowBall_Ch6: ; f1fd2 +Sfx_ThrowBall_Ch6: dutycycle $2 sound __, 16, $c2, $0782 endchannel -; f1fd9 -Sfx_Shine_Ch5: ; f1fd9 +Sfx_Shine_Ch5: dutycycle $0 sound __, 1, $d2, $0700 sound __, 1, $d2, $0740 @@ -4419,35 +4031,30 @@ Sfx_Shine_Ch5: ; f1fd9 sound __, 11, $e1, $07e0 sound __, 2, $0, 0 endchannel -; f1ff4 -Sfx_BallPoof_Ch5: ; f1ff4 +Sfx_BallPoof_Ch5: dutycycle $2 soundinput $16 sound __, 16, $f2, $0400 soundinput $8 endchannel -; f1fff -Sfx_BallPoof_Ch8: ; f1fff +Sfx_BallPoof_Ch8: noise __, 16, $a2, $22 endchannel -; f2003 -Sfx_Unknown3A_Ch5: ; f2003 +Sfx_Unknown3A_Ch5: sound __, 16, $d1, $0200 soundinput $8 endchannel -; f200a -Sfx_Unknown3A_Ch8: ; f200a +Sfx_Unknown3A_Ch8: noise __, 5, $f5, $33 noise __, 9, $f4, $22 noise __, 16, $f2, $21 endchannel -; f2014 -Sfx_Run_Ch8: ; f2014 +Sfx_Run_Ch8: noise __, 3, $61, $23 noise __, 3, $a1, $33 noise __, 3, $c1, $33 @@ -4460,9 +4067,8 @@ Sfx_Run_Ch8: ; f2014 noise __, 3, $31, $11 noise __, 9, $41, $33 endchannel -; f2036 -Sfx_SlotMachineStart_Ch5: ; f2036 +Sfx_SlotMachineStart_Ch5: dutycycle $2 soundinput $44 sound __, 16, $f0, $04f0 @@ -4470,16 +4076,14 @@ Sfx_SlotMachineStart_Ch5: ; f2036 sound __, 16, $f2, $0650 soundinput $8 endchannel -; f2047 -Sfx_SlotMachineStart_Ch6: ; f2047 +Sfx_SlotMachineStart_Ch6: dutycycle $2 sound __, 16, $92, $0600 sound __, 16, $92, $0782 endchannel -; f2052 -Sfx_Call_Ch5: ; f2052 +Sfx_Call_Ch5: soundinput $67 sound __, 5, $f7, $07a0 sound __, 5, $f7, $07a0 @@ -4489,107 +4093,92 @@ Sfx_Call_Ch5: ; f2052 soundinput $8 sound __, 5, $0, 0 endchannel -; f206f -Sfx_Peck_Ch8: ; f206f +Sfx_Peck_Ch8: noise __, 3, $a1, $12 endchannel -; f2073 -Sfx_Kinesis_Ch5: ; f2073 +Sfx_Kinesis_Ch5: dutycycle $1 soundinput $af sound __, 16, $f2, $0780 soundinput $8 endchannel -; f207e -Sfx_Lick_Ch5: ; f207e +Sfx_Lick_Ch5: dutycycle $1 soundinput $97 sound __, 16, $f2, $0500 soundinput $8 endchannel -; f2089 -Sfx_Pound_Ch8: ; f2089 +Sfx_Pound_Ch8: noise __, 3, $a1, $22 endchannel -; f208d -Sfx_MovePuzzlePiece_Ch8: ; f208d +Sfx_MovePuzzlePiece_Ch8: noise __, 9, $f1, $54 endchannel -; f2091 -Sfx_CometPunch_Ch8: ; f2091 +Sfx_CometPunch_Ch8: noise __, 16, $8f, $11 noise __, 5, $ff, $12 noise __, 11, $f1, $55 endchannel -; f209b -Sfx_MegaPunch_Ch8: ; f209b +Sfx_MegaPunch_Ch8: noise __, 16, $8f, $34 noise __, 9, $f2, $35 noise __, 11, $f1, $55 endchannel -; f20a5 -Sfx_Scratch_Ch8: ; f20a5 +Sfx_Scratch_Ch8: noise __, 16, $9f, $23 noise __, 9, $f1, $21 endchannel -; f20ac -Sfx_Vicegrip_Ch8: ; f20ac +Sfx_Vicegrip_Ch8: noise __, 3, $e1, $4b noise __, 11, $f1, $44 noise __, 3, $e1, $3a noise __, 7, $f1, $34 endchannel -; f20b9 -Sfx_RazorWind_Ch8: ; f20b9 +Sfx_RazorWind_Ch8: noise __, 3, $f4, $44 noise __, 3, $f4, $14 noise __, 16, $f1, $32 endchannel -; f20c3 -Sfx_Cut_Ch8: ; f20c3 +Sfx_Cut_Ch8: noise __, 5, $8f, $55 noise __, 3, $f4, $44 noise __, 9, $f4, $22 noise __, 16, $f2, $21 endchannel -; f20d0 -Sfx_WingAttack_Ch8: ; f20d0 +Sfx_WingAttack_Ch8: noise __, 9, $4f, $23 noise __, 5, $c4, $22 noise __, 7, $f2, $23 loopchannel 4, Sfx_WingAttack_Ch8 endchannel -; f20de -Sfx_Whirlwind_Ch8: ; f20de +Sfx_Whirlwind_Ch8: noise __, 9, $4f, $33 noise __, 5, $c4, $22 noise __, 7, $f2, $23 noise __, 16, $f2, $22 endchannel -; f20eb -Sfx_Bind_Ch8: ; f20eb +Sfx_Bind_Ch8: noise __, 9, $ff, $32 noise __, 9, $f4, $43 noise __, 9, $f2, $54 noise __, 9, $f1, $65 endchannel -; f20f8 -Sfx_VineWhip_Ch8: ; f20f8 +Sfx_VineWhip_Ch8: noise __, 2, $c2, $33 noise __, 3, $f2, $21 noise __, 2, $e2, $33 @@ -4599,62 +4188,53 @@ Sfx_VineWhip_Ch8: ; f20f8 noise __, 13, $91, $10 noise __, 9, $f2, $41 endchannel -; f2111 -Sfx_DoubleKick_Ch8: ; f2111 +Sfx_DoubleKick_Ch8: noise __, 2, $94, $23 noise __, 2, $b4, $22 noise __, 9, $f1, $44 endchannel -; f211b -Sfx_MegaKick_Ch8: ; f211b +Sfx_MegaKick_Ch8: noise __, 3, $94, $33 noise __, 5, $b4, $22 noise __, 5, $f1, $44 noise __, 9, $f1, $55 endchannel -; f2128 -Sfx_Headbutt_Ch8: ; f2128 +Sfx_Headbutt_Ch8: noise __, 5, $ff, $55 noise __, 9, $f1, $65 endchannel -; f212f -Sfx_HornAttack_Ch8: ; f212f +Sfx_HornAttack_Ch8: noise __, 3, $84, $43 noise __, 3, $c4, $22 noise __, 9, $f2, $34 endchannel -; f2139 -Sfx_Tackle_Ch8: ; f2139 +Sfx_Tackle_Ch8: noise __, 5, $f1, $34 noise __, 16, $f2, $64 endchannel -; f2140 -Sfx_PoisonSting_Ch8: ; f2140 +Sfx_PoisonSting_Ch8: noise __, 3, $f1, $22 noise __, 16, $f2, $12 endchannel -; f2147 -Sfx_Powder_Ch8: ; f2147 +Sfx_Powder_Ch8: noise __, 3, $c2, $1 noise __, 16, $f4, $1 noise __, 16, $f2, $1 endchannel -; f2151 -Sfx_Doubleslap_Ch8: ; f2151 +Sfx_Doubleslap_Ch8: noise __, 9, $f1, $32 noise __, 9, $f1, $33 endchannel -; f2158 -Sfx_Bite_Ch5: ; f2158 +Sfx_Bite_Ch5: dutycycle $0 soundinput $3a sound __, 5, $f2, $0200 @@ -4662,78 +4242,68 @@ Sfx_Bite_Ch5: ; f2158 sound __, 9, $e2, $0200 soundinput $8 endchannel -; f2169 -Sfx_Bite_Ch8: ; f2169 +Sfx_Bite_Ch8: noise __, 1, $d1, $42 noise __, 5, $a1, $32 noise __, 1, $d1, $22 noise __, 7, $a1, $32 endchannel -; f2176 -Sfx_JumpKick_Ch8: ; f2176 +Sfx_JumpKick_Ch8: noise __, 4, $92, $31 noise __, 4, $b2, $32 noise __, 4, $c2, $33 noise __, 9, $f1, $54 endchannel -; f2183 -Sfx_Stomp_Ch8: ; f2183 +Sfx_Stomp_Ch8: noise __, 13, $f1, $54 noise __, 9, $f1, $64 endchannel -; f218a -Sfx_TailWhip_Ch8: ; f218a +Sfx_TailWhip_Ch8: noise __, 3, $f1, $33 noise __, 3, $c1, $32 noise __, 3, $a1, $31 noise __, 16, $82, $32 noise __, 9, $f1, $34 endchannel -; f219a -Sfx_KarateChop_Ch8: ; f219a +Sfx_KarateChop_Ch8: noise __, 3, $d2, $32 noise __, 16, $f2, $43 endchannel -; f21a1 -Sfx_Submission_Ch8: ; f21a1 +Sfx_Submission_Ch8: noise __, 3, $f2, $43 noise __, 5, $b5, $32 noise __, 10, $86, $31 noise __, 8, $64, $0 noise __, 16, $f2, $55 endchannel -; f21b1 -Sfx_WaterGun_Ch5: ; f21b1 +Sfx_WaterGun_Ch5: dutycycle $1 soundinput $97 sound __, 16, $f2, $0700 soundinput $8 endchannel -; f21bc -Sfx_WaterGun_Ch8: ; f21bc +Sfx_WaterGun_Ch8: noise __, 16, $3f, $22 noise __, 16, $f2, $21 endchannel -; f21c3 -Sfx_SwordsDance_Ch8: ; f21c3 +Sfx_SwordsDance_Ch8: noise __, 16, $4f, $41 noise __, 9, $8f, $41 noise __, 9, $cf, $41 noise __, 9, $f2, $42 noise __, 16, $f2, $41 endchannel -; f21d3 -Sfx_Thunder_Ch8: ; f21d3 +Sfx_Thunder_Ch8: noise __, 11, $ff, $50 noise __, 16, $ff, $51 noise __, 9, $f2, $51 @@ -4742,9 +4312,8 @@ Sfx_Thunder_Ch8: ; f21d3 noise __, 9, $ff, $54 noise __, 16, $f2, $54 endchannel -; f21e9 -Sfx_Supersonic_Ch5: ; f21e9 +Sfx_Supersonic_Ch5: dutycycle $2 sound __, 16, $3f, $07c0 .loop @@ -4752,9 +4321,8 @@ Sfx_Supersonic_Ch5: ; f21e9 loopchannel 4, .loop sound __, 16, $d1, $07c0 endchannel -; f21fc -Sfx_Supersonic_Ch6: ; f21fc +Sfx_Supersonic_Ch6: sound_duty 3, 0, 3, 2 sound __, 16, $2f, $07c8 .loop @@ -4762,39 +4330,34 @@ Sfx_Supersonic_Ch6: ; f21fc loopchannel 4, .loop sound __, 16, $c1, $07c8 endchannel -; f220f -Sfx_Supersonic_Ch8: ; f220f +Sfx_Supersonic_Ch8: noise __, 4, $97, $12 noise __, 4, $a1, $11 loopchannel 10, Sfx_Supersonic_Ch8 endchannel -; f221a -Sfx_Leer_Ch5: ; f221a +Sfx_Leer_Ch5: dutycycle $0 sound __, 1, $f1, $07c0 sound __, 1, $f1, $0700 loopchannel 12, Sfx_Leer_Ch5 endchannel -; f2229 -Sfx_Leer_Ch6: ; f2229 +Sfx_Leer_Ch6: sound_duty 3, 0, 3, 2 sound __, 1, $e1, $07c1 sound __, 1, $e1, $0701 loopchannel 12, Sfx_Leer_Ch6 endchannel -; f2238 -Sfx_Leer_Ch8: ; f2238 +Sfx_Leer_Ch8: noise __, 2, $d1, $49 noise __, 2, $d1, $29 loopchannel 6, Sfx_Leer_Ch8 endchannel -; f2243 -Sfx_Ember_Ch5: ; f2243 +Sfx_Ember_Ch5: sound_duty 1, 2, 0, 3 sound __, 12, $f3, $0120 sound __, 10, $d3, $0150 @@ -4802,9 +4365,8 @@ Sfx_Ember_Ch5: ; f2243 sound __, 9, $e3, $0130 sound __, 16, $c2, $0110 endchannel -; f225a -Sfx_Ember_Ch8: ; f225a +Sfx_Ember_Ch8: noise __, 11, $f3, $35 noise __, 15, $f6, $45 loopchannel 4, Sfx_Ember_Ch8 @@ -4812,9 +4374,8 @@ Sfx_Ember_Ch8: ; f225a noise __, 13, $f5, $9c noise __, 16, $f4, $ac endchannel -; f226e -Sfx_Bubblebeam_Ch5: ; f226e +Sfx_Bubblebeam_Ch5: sound_duty 1, 2, 3, 0 sound __, 5, $f4, $0600 sound __, 4, $c4, $0500 @@ -4823,9 +4384,8 @@ Sfx_Bubblebeam_Ch5: ; f226e loopchannel 3, Sfx_Bubblebeam_Ch5 sound __, 9, $d1, $0600 endchannel -; f2289 -Sfx_Bubblebeam_Ch6: ; f2289 +Sfx_Bubblebeam_Ch6: sound_duty 1, 3, 0, 2 sound __, 6, $e4, $05e0 sound __, 5, $b4, $04e0 @@ -4833,18 +4393,16 @@ Sfx_Bubblebeam_Ch6: ; f2289 sound __, 15, $d1, $06a0 loopchannel 3, Sfx_Bubblebeam_Ch6 endchannel -; f22a0 -Sfx_Bubblebeam_Ch8: ; f22a0 +Sfx_Bubblebeam_Ch8: noise __, 6, $c3, $33 noise __, 4, $92, $43 noise __, 11, $b5, $33 noise __, 16, $c3, $32 loopchannel 2, Sfx_Bubblebeam_Ch8 endchannel -; f22b1 -Sfx_HydroPump_Ch5: ; f22b1 +Sfx_HydroPump_Ch5: sound_duty 2, 0, 1, 3 sound __, 4, $81, $0300 sound __, 4, $c1, $0400 @@ -4854,9 +4412,8 @@ Sfx_HydroPump_Ch5: ; f22b1 loopchannel 5, Sfx_HydroPump_Ch5 sound __, 9, $81, $0400 endchannel -; f22d0 -Sfx_HydroPump_Ch8: ; f22d0 +Sfx_HydroPump_Ch8: noise __, 4, $62, $22 noise __, 4, $a2, $32 noise __, 4, $d2, $33 @@ -4865,36 +4422,32 @@ Sfx_HydroPump_Ch8: ; f22d0 loopchannel 5, Sfx_HydroPump_Ch8 noise __, 9, $81, $12 endchannel -; f22e7 -Sfx_Surf_Ch5: ; f22e7 +Sfx_Surf_Ch5: sound_duty 1, 2, 3, 0 sound __, 16, $f4, $0500 sound __, 16, $c4, $0400 sound __, 16, $e2, $05c0 loopchannel 3, Sfx_Surf_Ch5 endchannel -; f22fa -Sfx_Surf_Ch6: ; f22fa +Sfx_Surf_Ch6: sound_duty 1, 3, 0, 2 sound __, 8, $e4, $0430 sound __, 16, $b4, $0330 sound __, 16, $a2, $0438 loopchannel 4, Sfx_Surf_Ch6 endchannel -; f230d -Sfx_Surf_Ch8: ; f230d +Sfx_Surf_Ch8: noise __, 10, $f4, $44 noise __, 10, $f2, $43 noise __, 16, $f4, $42 noise __, 16, $f4, $41 loopchannel 3, Sfx_Surf_Ch8 endchannel -; f231e -Sfx_Psybeam_Ch5: ; f231e +Sfx_Psybeam_Ch5: sound_duty 1, 0, 2, 2 sound __, 11, $f1, $0640 sound __, 11, $f3, $0680 @@ -4902,9 +4455,8 @@ Sfx_Psybeam_Ch5: ; f231e loopchannel 4, Sfx_Psybeam_Ch5 sound __, 11, $f1, $0640 endchannel -; f2335 -Sfx_Psybeam_Ch6: ; f2335 +Sfx_Psybeam_Ch6: sound_duty 3, 0, 3, 2 sound __, 11, $f3, $0571 sound __, 8, $e3, $0531 @@ -4912,16 +4464,14 @@ Sfx_Psybeam_Ch6: ; f2335 loopchannel 4, Sfx_Psybeam_Ch6 sound __, 11, $f1, $0571 endchannel -; f234c -Sfx_Psybeam_Ch8: ; f234c +Sfx_Psybeam_Ch8: noise __, 3, $d1, $4a noise __, 3, $d2, $2a loopchannel 21, Sfx_Psybeam_Ch8 endchannel -; f2357 -Sfx_Charge_Ch5: ; f2357 +Sfx_Charge_Ch5: dutycycle $0 sound __, 3, $f1, $0200 sound __, 4, $f1, $0700 @@ -4929,9 +4479,8 @@ Sfx_Charge_Ch5: ; f2357 sound __, 6, $f1, $07f0 loopchannel 8, Sfx_Charge_Ch5 endchannel -; f236e -Sfx_Charge_Ch6: ; f236e +Sfx_Charge_Ch6: sound_duty 3, 0, 3, 2 sound __, 3, $e1, $0302 sound __, 4, $e1, $07f2 @@ -4939,41 +4488,36 @@ Sfx_Charge_Ch6: ; f236e sound __, 6, $e1, $0702 loopchannel 8, Sfx_Charge_Ch6 endchannel -; f2385 -Sfx_Charge_Ch8: ; f2385 +Sfx_Charge_Ch8: noise __, 3, $d3, $10 noise __, 4, $d3, $11 noise __, 3, $d2, $10 noise __, 6, $d2, $12 loopchannel 9, Sfx_Charge_Ch8 endchannel -; f2396 -Sfx_Thundershock_Ch5: ; f2396 +Sfx_Thundershock_Ch5: sound_duty 3, 2, 2, 0 sound __, 4, $f1, $07f0 sound __, 5, $f2, $0200 loopchannel 8, Sfx_Thundershock_Ch5 endchannel -; f23a5 -Sfx_Thundershock_Ch6: ; f23a5 +Sfx_Thundershock_Ch6: sound_duty 3, 0, 3, 2 sound __, 5, $e2, $0202 sound __, 5, $e1, $07e2 loopchannel 9, Sfx_Thundershock_Ch6 endchannel -; f23b4 -Sfx_Thundershock_Ch8: ; f23b4 +Sfx_Thundershock_Ch8: noise __, 5, $ff, $43 noise __, 5, $f2, $44 loopchannel 9, Sfx_Thundershock_Ch8 endchannel -; f23bf -Sfx_Psychic_Ch5: ; f23bf +Sfx_Psychic_Ch5: dutycycle $2 soundinput $f7 sound __, 9, $c4, $07bd @@ -4984,9 +4528,8 @@ Sfx_Psychic_Ch5: ; f23bf sound __, 16, $f2, $07c0 soundinput $8 endchannel -; f23de -Sfx_Psychic_Ch6: ; f23de +Sfx_Psychic_Ch6: dutycycle $2 sound __, 9, $c4, $0770 sound __, 9, $c4, $0761 @@ -4995,9 +4538,8 @@ Sfx_Psychic_Ch6: ; f23de sound __, 16, $c4, $0764 sound __, 16, $f2, $0764 endchannel -; f23f9 -Sfx_Psychic_Ch8: ; f23f9 +Sfx_Psychic_Ch8: noise __, 16, $3f, $14 noise __, 16, $cf, $13 noise __, 16, $cf, $12 @@ -5005,9 +4547,8 @@ Sfx_Psychic_Ch8: ; f23f9 noise __, 16, $cf, $10 noise __, 16, $c2, $10 endchannel -; f240c -Sfx_Screech_Ch5: ; f240c +Sfx_Screech_Ch5: dutycycle $2 sound __, 16, $ff, $07e0 sound __, 16, $ff, $07e0 @@ -5015,9 +4556,8 @@ Sfx_Screech_Ch5: ; f240c sound __, 16, $ff, $07e0 sound __, 16, $f2, $07e0 endchannel -; f2423 -Sfx_Screech_Ch6: ; f2423 +Sfx_Screech_Ch6: dutycycle $3 sound __, 16, $ff, $07e2 sound __, 16, $ff, $07e1 @@ -5025,23 +4565,20 @@ Sfx_Screech_Ch6: ; f2423 sound __, 16, $ff, $07e1 sound __, 16, $f2, $07e2 endchannel -; f243a -Sfx_BoneClub_Ch5: ; f243a +Sfx_BoneClub_Ch5: dutycycle $2 soundinput $af sound __, 9, $f1, $0700 soundinput $8 endchannel -; f2445 -Sfx_BoneClub_Ch6: ; f2445 +Sfx_BoneClub_Ch6: dutycycle $3 sound __, 9, $f1, $0701 endchannel -; f244c -Sfx_Sharpen_Ch5: ; f244c +Sfx_Sharpen_Ch5: dutycycle $2 sound __, 7, $f1, $0500 sound __, 7, $f1, $0580 @@ -5049,9 +4586,8 @@ Sfx_Sharpen_Ch5: ; f244c sound __, 7, $f1, $0680 sound __, 9, $f1, $0700 endchannel -; f2463 -Sfx_Sharpen_Ch6: ; f2463 +Sfx_Sharpen_Ch6: dutycycle $3 sound __, 7, $e1, $0510 sound __, 7, $e1, $0590 @@ -5059,33 +4595,29 @@ Sfx_Sharpen_Ch6: ; f2463 sound __, 7, $e1, $0690 sound __, 9, $e1, $0710 endchannel -; f247a -Sfx_EggBomb_Ch5: ; f247a +Sfx_EggBomb_Ch5: sound_duty 1, 3, 2, 3 sound __, 9, $ff, $03f8 sound __, 16, $ff, $0400 sound __, 16, $f3, $0400 endchannel -; f2489 -Sfx_EggBomb_Ch6: ; f2489 +Sfx_EggBomb_Ch6: sound_duty 0, 1, 3, 2 sound __, 9, $ef, $03c0 sound __, 16, $ef, $03c0 sound __, 16, $e3, $03c0 endchannel -; f2498 -Sfx_EggBomb_Ch8: ; f2498 +Sfx_EggBomb_Ch8: noise __, 5, $ff, $51 noise __, 9, $ff, $54 noise __, 16, $ff, $55 noise __, 16, $f3, $56 endchannel -; f24a5 -Sfx_Sing_Ch5: ; f24a5 +Sfx_Sing_Ch5: togglesfx vibrato $a, $24 dutycycle $2 @@ -5098,9 +4630,8 @@ Sfx_Sing_Ch5: ; f24a5 octave 5 note G_, 8 endchannel -; f24b6 -Sfx_Sing_Ch6: ; f24b6 +Sfx_Sing_Ch6: togglesfx vibrato $a, $23 dutycycle $2 @@ -5114,9 +4645,8 @@ Sfx_Sing_Ch6: ; f24b6 octave 5 note G_, 8 endchannel -; f24ca -Sfx_HyperBeam_Ch5: ; f24ca +Sfx_HyperBeam_Ch5: dutycycle $0 sound __, 3, $f1, $0780 sound __, 3, $f1, $0700 @@ -5135,9 +4665,8 @@ Sfx_HyperBeam_Ch5: ; f24ca loopchannel 12, .loop sound __, 16, $f1, $0700 endchannel -; f2509 -Sfx_HyperBeam_Ch6: ; f2509 +Sfx_HyperBeam_Ch6: sound_duty 3, 0, 3, 2 sound __, 3, $f1, $0781 sound __, 3, $f1, $0701 @@ -5156,16 +4685,14 @@ Sfx_HyperBeam_Ch6: ; f2509 loopchannel 12, .loop sound __, 16, $f1, $0701 endchannel -; f2548 -Sfx_HyperBeam_Ch8: ; f2548 +Sfx_HyperBeam_Ch8: noise __, 2, $d1, $49 noise __, 2, $d1, $29 loopchannel 26, Sfx_HyperBeam_Ch8 endchannel -; f2553 -Sfx_Unknown60_Ch8: ; f2553 +Sfx_Unknown60_Ch8: noise __, 7, $20, $10 noise __, 7, $2f, $40 noise __, 7, $4f, $41 @@ -5175,9 +4702,8 @@ Sfx_Unknown60_Ch8: ; f2553 noise __, 16, $e7, $43 noise __, 16, $f2, $43 endchannel -; f256c -Sfx_UnknownCB_Ch8: ; f256c +Sfx_UnknownCB_Ch8: noise __, 2, $10, $10 noise __, 3, $20, $10 noise __, 3, $30, $20 @@ -5188,32 +4714,27 @@ Sfx_UnknownCB_Ch8: ; f256c noise __, 9, $80, $22 noise __, 16, $94, $22 endchannel -; f2588 -Sfx_Unknown61_Ch8: ; f2588 +Sfx_Unknown61_Ch8: noise __, 5, $d1, $41 endchannel -; f258c -Sfx_SwitchPockets_Ch8: ; f258c +Sfx_SwitchPockets_Ch8: noise __, 5, $c1, $42 endchannel -; f2590 -Sfx_Unknown63_Ch8: ; f2590 +Sfx_Unknown63_Ch8: noise __, 3, $6f, $21 noise __, 3, $af, $31 noise __, 16, $f2, $41 endchannel -; f259a -Sfx_Burn_Ch8: ; f259a +Sfx_Burn_Ch8: noise __, 3, $d2, $32 noise __, 16, $f2, $43 endchannel -; f25a1 -Sfx_TitleScreenEntrance_Ch8: ; f25a1 +Sfx_TitleScreenEntrance_Ch8: noise __, 3, $70, $22 noise __, 3, $80, $23 noise __, 3, $90, $24 @@ -5221,40 +4742,35 @@ Sfx_TitleScreenEntrance_Ch8: ; f25a1 noise __, 3, $b0, $26 noise __, 16, $c2, $26 endchannel -; f25b4 -Sfx_Unknown66_Ch5: ; f25b4 +Sfx_Unknown66_Ch5: dutycycle $2 sound __, 2, $f2, $06a0 sound __, 2, $f2, $06e0 sound __, 9, $f1, $0700 endchannel -; f25c3 -Sfx_GetCoinFromSlots_Ch5: ; f25c3 +Sfx_GetCoinFromSlots_Ch5: dutycycle $2 sound __, 3, $f1, $0700 sound __, 9, $81, $07e0 endchannel -; f25ce -Sfx_PayDay_Ch5: ; f25ce +Sfx_PayDay_Ch5: dutycycle $3 sound __, 6, $e1, $0700 sound __, 3, $e1, $0780 sound __, 16, $f1, $07c0 endchannel -; f25dd -Sfx_PayDay_Ch6: ; f25dd +Sfx_PayDay_Ch6: dutycycle $2 sound __, 5, $c1, $06c1 sound __, 3, $c1, $0741 sound __, 16, $d1, $0781 endchannel -; f25ec -Sfx_Metronome_Ch5: ; f25ec +Sfx_Metronome_Ch5: dutycycle $2 soundinput $5f sound __, 5, $40, $07e0 @@ -5268,24 +4784,21 @@ Sfx_Metronome_Ch5: ; f25ec sound __, 16, $12, $07e0 soundinput $8 endchannel -; f2617 -Sfx_Unknown5F_Ch5: ; f2617 +Sfx_Unknown5F_Ch5: sound __, 3, $f7, $0601 sound __, 3, $f7, $0701 loopchannel 8, Sfx_Unknown5F_Ch5 endchannel -; f2624 -Sfx_Unknown5F_Ch6: ; f2624 +Sfx_Unknown5F_Ch6: sound __, 2, $f7, $ffff sound __, 3, $f7, $0602 sound __, 3, $f7, $0702 loopchannel 8, Sfx_Unknown5F_Ch5 endchannel -; f2635 -Sfx_Fanfare2_Ch5: ; f2635 +Sfx_Fanfare2_Ch5: togglesfx sfxpriorityon tempo 256 @@ -5309,9 +4822,8 @@ Sfx_Fanfare2_Ch5: ; f2635 note C#, 12 sfxpriorityoff endchannel -; f2658 -Sfx_Fanfare2_Ch6: ; f2658 +Sfx_Fanfare2_Ch6: togglesfx dutycycle $2 notetype $6, $c5 @@ -5330,9 +4842,8 @@ Sfx_Fanfare2_Ch6: ; f2658 notetype $4, $c6 note F_, 12 endchannel -; f2673 -Sfx_Fanfare2_Ch8: ; f2673 +Sfx_Fanfare2_Ch8: togglesfx notetype $6 note C_, 1 @@ -5351,9 +4862,8 @@ Sfx_Fanfare2_Ch8: ; f2673 note F_, 2 note G#, 6 endchannel -; f2687 -Sfx_Fanfare_Ch5: ; f2687 +Sfx_Fanfare_Ch5: togglesfx sfxpriorityon tempo 256 @@ -5382,9 +4892,8 @@ Sfx_Fanfare_Ch5: ; f2687 note C#, 12 sfxpriorityoff endchannel -; f26af -Sfx_Fanfare_Ch6: ; f26af +Sfx_Fanfare_Ch6: togglesfx dutycycle $2 notetype $6, $c4 @@ -5419,9 +4928,8 @@ Sfx_Fanfare_Ch6: ; f26af notetype $4, $c6 note F#, 12 endchannel -; f26d8 -Sfx_Fanfare_Ch8: ; f26d8 +Sfx_Fanfare_Ch8: togglesfx notetype $6 note C_, 1 @@ -5445,23 +4953,21 @@ Sfx_Fanfare_Ch8: ; f26d8 note F_, 4 note F#, 6 endchannel -; f26f1 -Sfx_HangUp_Ch5: ; f26f1 +Sfx_HangUp_Ch5: dutycycle $2 sound __, 5, $b8, $077b sound __, 3, $21, $077b sound C_, 1, $0, 0 -Sfx_NoSignal_Ch5: ; f26ff +Sfx_NoSignal_Ch5: dutycycle $2 sound C_, 5, $e8, $070b sound C_, 13, $0, 0 loopchannel 3, Sfx_NoSignal_Ch5 endchannel -; f270e -Sfx_Sandstorm_Ch8: ; f270e -Sfx_Unknown5F_Ch8: ; f270e +Sfx_Sandstorm_Ch8: +Sfx_Unknown5F_Ch8: noise __, 2, $f8, $41 noise __, 3, $9c, $24 noise __, 1, $0, $0 @@ -5469,9 +4975,8 @@ Sfx_Unknown5F_Ch8: ; f270e noise __, 3, $0, $0 loopchannel 3, Sfx_Sandstorm_Ch8 endchannel -; f2722 -Sfx_Elevator_Ch5: ; f2722 +Sfx_Elevator_Ch5: dutycycle $2 soundinput $5a .loop @@ -5486,55 +4991,45 @@ Sfx_Elevator_Ch5: ; f2722 sound __, 16, $44, $0700 sound __, 16, $24, $0700 endchannel -; f274b -Sfx_Elevator_Ch6: ; f274b -Sfx_Elevator_Ch7: ; f274b +Sfx_Elevator_Ch6: +Sfx_Elevator_Ch7: sound F_, 1, $0, 0 sound E_, 4, $0, 0 endchannel -; f2754 -Sfx_Elevator_Ch8: ; f2754 +Sfx_Elevator_Ch8: noise F_, 1, $0, $0 noise E_, 4, $0, $0 endchannel -; f275b -Sfx_StopSlot: ; f275b +Sfx_StopSlot: musicheader 1, 5, Sfx_StopSlot_Ch5 -; f275e -Sfx_StopSlot_Ch5: ; f275e +Sfx_StopSlot_Ch5: dutycycle $2 sound __, 2, $f8, $0760 sound __, 5, $82, $0760 endchannel -; f2769 -Sfx_GlassTing: ; f2769 +Sfx_GlassTing: musicheader 1, 5, Sfx_GlassTing_Ch5 -; f276c -Sfx_GlassTing_Ch5: ; f276c +Sfx_GlassTing_Ch5: dutycycle $2 sound C#, 1, $d1, $07dc endchannel -; f2773 -Sfx_GlassTing2: ; f2773 +Sfx_GlassTing2: musicheader 2, 5, Sfx_GlassTing2_Ch5 musicheader 1, 6, Sfx_GlassTing2_Ch6 -; f2779 -Sfx_GlassTing2_Ch5: ; f2779 +Sfx_GlassTing2_Ch5: dutycycle $2 sound C_, 1, $f1, $07dc endchannel -; f2780 -Sfx_GlassTing2_Ch6: ; f2780 +Sfx_GlassTing2_Ch6: dutycycle $2 sound C_, 1, $d1, $07dd endchannel -; f2787 diff --git a/audio/sfx_crystal.asm b/audio/sfx_crystal.asm index eb5cae56195..0c283123df3 100644 --- a/audio/sfx_crystal.asm +++ b/audio/sfx_crystal.asm @@ -1,32 +1,27 @@ -Sfx_IntroUnown1: ; 17982d +Sfx_IntroUnown1: musicheader 1, 5, Sfx_IntroUnown1_Ch5 -; 179830 -Sfx_IntroUnown1_Ch5: ; 179830 +Sfx_IntroUnown1_Ch5: vibrato $1, $a3 dutycycle $2 sound __, 9, $39, $0705 sound C#, 1, $e2, $0705 endchannel -; 17983e -Sfx_IntroUnown2: ; 17983e +Sfx_IntroUnown2: musicheader 1, 6, Sfx_IntroUnown2_Ch6 -; 179841 -Sfx_IntroUnown2_Ch6: ; 179841 +Sfx_IntroUnown2_Ch6: vibrato $1, $73 dutycycle $2 sound __, 9, $39, $0758 sound C#, 1, $e2, $0758 endchannel -; 17984f -Sfx_IntroUnown3: ; 17984f +Sfx_IntroUnown3: musicheader 1, 7, Sfx_IntroUnown3_Ch7 -; 179852 -Sfx_IntroUnown3_Ch7: ; 179852 +Sfx_IntroUnown3_Ch7: vibrato $1, $53 sound __, 4, $32, $07c2 sound __, 4, $22, $07c2 @@ -35,13 +30,11 @@ Sfx_IntroUnown3_Ch7: ; 179852 sound __, 7, $22, $07c2 sound __, 7, $32, $07c2 endchannel -; 17986e -Sfx_DittoPopUp: ; 17986e +Sfx_DittoPopUp: musicheader 1, 5, Sfx_DittoPopUp_Ch5 -; 179871 -Sfx_DittoPopUp_Ch5: ; 179871 +Sfx_DittoPopUp_Ch5: dutycycle $2 soundinput $1e sound __, 4, $82, $0700 @@ -50,13 +43,11 @@ Sfx_DittoPopUp_Ch5: ; 179871 sound __, 5, $b1, $0640 sound C_, 1, $31, $0641 endchannel -; 179888 -Sfx_DittoTransform: ; 179888 +Sfx_DittoTransform: musicheader 1, 5, Sfx_DittoTransform_Ch5 -; 17988b -Sfx_DittoTransform_Ch5: ; 17988b +Sfx_DittoTransform_Ch5: dutycycle $1 soundinput $26 sound C_, 5, $3b, $0440 @@ -64,23 +55,19 @@ Sfx_DittoTransform_Ch5: ; 17988b sound __, 5, $67, $04c1 sound __, 5, $42, $04c2 endchannel -; 1798a0 -Sfx_IntroSuicune1: ; 1798a0 +Sfx_IntroSuicune1: musicheader 1, 8, Sfx_IntroSuicune1_Ch8 -; 1798a3 -Sfx_IntroSuicune1_Ch8: ; 1798a3 +Sfx_IntroSuicune1_Ch8: noise __, 2, $58, $59 noise __, 3, $91, $23 endchannel -; 1798aa -Sfx_IntroPichu: ; 1798aa +Sfx_IntroPichu: musicheader 1, 5, Sfx_IntroPichu_Ch5 -; 1798ad -Sfx_IntroPichu_Ch5: ; 1798ad +Sfx_IntroPichu_Ch5: dutycycle $3 soundinput $4d sound __, 2, $88, $0770 @@ -88,13 +75,11 @@ Sfx_IntroPichu_Ch5: ; 1798ad soundinput $17 sound __, 3, $88, $0776 endchannel -; 1798c0 -Sfx_IntroSuicune2: ; 1798c0 +Sfx_IntroSuicune2: musicheader 1, 8, Sfx_IntroSuicune2_Ch8 -; 1798c3 -Sfx_IntroSuicune2_Ch8: ; 1798c3 +Sfx_IntroSuicune2_Ch8: noise __, 2, $a7, $31 noise __, 2, $91, $0 noise __, 2, $92, $21 @@ -112,26 +97,22 @@ Sfx_IntroSuicune2_Ch8: ; 1798c3 noise __, 2, $23, $0 noise __, 2, $13, $10 endchannel -; 1798f4 -Sfx_IntroSuicune3: ; 1798f4 +Sfx_IntroSuicune3: musicheader 1, 8, Sfx_IntroSuicune3_Ch8 -; 1798f7 -Sfx_IntroSuicune3_Ch8: ; 1798f7 +Sfx_IntroSuicune3_Ch8: noise __, 2, $88, $31 noise __, 9, $39, $11 noise __, 5, $a4, $10 noise __, 5, $44, $10 noise __, 5, $24, $10 endchannel -; 179907 -Sfx_DittoBounce: ; 179907 +Sfx_DittoBounce: musicheader 1, 5, Sfx_DittoBounce_Ch5 -; 17990a -Sfx_DittoBounce_Ch5: ; 17990a +Sfx_DittoBounce_Ch5: dutycycle $2 soundinput $2c sound __, 3, $82, $04b0 @@ -139,13 +120,11 @@ Sfx_DittoBounce_Ch5: ; 17990a soundinput $34 sound C_, 1, $b1, $0420 endchannel -; 17991d -Sfx_IntroSuicune4: ; 17991d +Sfx_IntroSuicune4: musicheader 1, 8, Sfx_IntroSuicune4_Ch8 -; 179920 -Sfx_IntroSuicune4_Ch8: ; 179920 +Sfx_IntroSuicune4_Ch8: noise __, 2, $a1, $5c noise __, 1, $0, $0 noise __, 2, $c1, $4d @@ -158,13 +137,11 @@ Sfx_IntroSuicune4_Ch8: ; 179920 noise __, 1, $0, $0 noise C#, 1, $72, $0 endchannel -; 179942 -Sfx_GameFreakPresents: ; 179942 +Sfx_GameFreakPresents: musicheader 1, 5, Sfx_GameFreakPresents_Ch5 -; 179945 -Sfx_GameFreakPresents_Ch5: ; 179945 +Sfx_GameFreakPresents_Ch5: togglesfx dutycycle $2 notetype $2, $b1 @@ -185,13 +162,11 @@ Sfx_GameFreakPresents_Ch5: ; 179945 intensity $31 note G_, 3 endchannel -; 179961 -Sfx_Tingle: ; 179961 +Sfx_Tingle: musicheader 1, 5, Sfx_Tingle_Ch5 -; 179964 -Sfx_Tingle_Ch5: ; 179964 +Sfx_Tingle_Ch5: togglesfx dutycycle $1 pitchoffset 0, B_ @@ -209,28 +184,24 @@ Sfx_Tingle_Ch5: ; 179964 intensity $a1 note G_, 13 endchannel -; 17997c -Sfx_TwoPcBeeps: ; 17997c +Sfx_TwoPcBeeps: musicheader 1, 5, Sfx_TwoPcBeeps_Ch5 -; 17997f -Sfx_TwoPcBeeps_Ch5: ; 17997f +Sfx_TwoPcBeeps_Ch5: dutycycle $2 sound __, 3, $e8, $07c2 sound __, 3, $28, $07c2 sound __, 3, $e8, $07c2 sound __, 3, $28, $07c2 endchannel -; 179992 -Sfx_4NoteDitty: ; 179992 +Sfx_4NoteDitty: musicheader 3, 5, Sfx_4NoteDitty_Ch5 musicheader 1, 6, Sfx_4NoteDitty_Ch6 musicheader 1, 7, Sfx_4NoteDitty_Ch7 -; 17999b -Sfx_4NoteDitty_Ch5: ; 17999b +Sfx_4NoteDitty_Ch5: togglesfx dutycycle $2 notetype $2, $e8 @@ -254,29 +225,25 @@ Sfx_4NoteDitty_Ch5: ; 17999b intensity $43 note C_, 16 endchannel -; 1799bd -Sfx_4NoteDitty_Ch6: ; 1799bd +Sfx_4NoteDitty_Ch6: togglesfx notetype $2, $b8 note __, 9 note __, 16 endchannel -; 1799c4 -Sfx_4NoteDitty_Ch7: ; 1799c4 +Sfx_4NoteDitty_Ch7: togglesfx notetype $2, $b8 note __, 9 note __, 16 endchannel -; 1799cb -Sfx_Twinkle: ; 1799cb +Sfx_Twinkle: musicheader 1, 5, Sfx_Twinkle_Ch5 -; 1799ce -Sfx_Twinkle_Ch5: ; 1799ce +Sfx_Twinkle_Ch5: togglesfx dutycycle $0 pitchoffset 0, D_ @@ -300,4 +267,3 @@ Sfx_Twinkle_Ch5: ; 1799ce octave 5 note G_, 6 endchannel -; 1799ef diff --git a/audio/sfx_pointers.asm b/audio/sfx_pointers.asm index 9cbe1d0eb94..c607e9cae12 100644 --- a/audio/sfx_pointers.asm +++ b/audio/sfx_pointers.asm @@ -1,4 +1,4 @@ -SFX: ; e927c +SFX: ; entries correspond to SFX_* constants dba Sfx_DexFanfare5079 @@ -211,4 +211,3 @@ SFX: ; e927c dba Sfx_TwoPcBeeps dba Sfx_4NoteDitty dba Sfx_Twinkle -; e94e9 diff --git a/audio/wave_samples.asm b/audio/wave_samples.asm index 493cce67993..81fee2119ed 100644 --- a/audio/wave_samples.asm +++ b/audio/wave_samples.asm @@ -1,4 +1,4 @@ -WaveSamples: ; e8db2 +WaveSamples: ; These are streams of 32 nybbles (4-bit values) used as wave patterns. ; Plot them as a line chart to see the wave's shape. dn 0, 2, 4, 6, 8, 10, 12, 14, 15, 15, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5, 4, 4, 3, 3, 2, 2, 1, 1 @@ -11,4 +11,3 @@ WaveSamples: ; e8db2 dn 12, 0, 10, 9, 8, 7, 15, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 15, 1, 0, 2, 4, 6, 8, 10, 12, 14 dn 4, 4, 3, 3, 2, 2, 1, 15, 0, 0, 4, 6, 8, 10, 12, 14, 15, 8, 15, 14, 14, 13, 13, 12, 12, 11, 10, 9, 8, 7, 6, 5 dn 1, 1, 0, 0, 0, 0, 0, 8, 0, 0, 1, 3, 5, 7, 9, 10, 11, 4, 11, 10, 10, 9, 9, 8, 8, 7, 6, 5, 4, 3, 2, 1 -; e8e52 diff --git a/data/battle/ai/constant_damage_effects.asm b/data/battle/ai/constant_damage_effects.asm index 0ce67c191e2..cd812d415cf 100644 --- a/data/battle/ai/constant_damage_effects.asm +++ b/data/battle/ai/constant_damage_effects.asm @@ -2,10 +2,9 @@ ; to calculate damage for these instead of ; BattleCommand_DamageCalc and BattleCommand_Stab. -ConstantDamageEffects: ; 39413 +ConstantDamageEffects: db EFFECT_SUPER_FANG db EFFECT_STATIC_DAMAGE db EFFECT_LEVEL_DAMAGE db EFFECT_PSYWAVE db -1 ; end -; 39418 diff --git a/data/battle/ai/encore_moves.asm b/data/battle/ai/encore_moves.asm index b18f2419dd2..03e028bd174 100644 --- a/data/battle/ai/encore_moves.asm +++ b/data/battle/ai/encore_moves.asm @@ -1,6 +1,6 @@ ; AI_SMART encourages these moves with Encore. -EncoreMoves: ; 38c85 +EncoreMoves: db SWORDS_DANCE db WHIRLWIND db LEER @@ -32,4 +32,3 @@ EncoreMoves: ; 38c85 db COTTON_SPORE db POWDER_SNOW db -1 ; end -; 38ca4 diff --git a/data/battle/ai/rain_dance_moves.asm b/data/battle/ai/rain_dance_moves.asm index 05cf686707f..c00e0b60aa5 100644 --- a/data/battle/ai/rain_dance_moves.asm +++ b/data/battle/ai/rain_dance_moves.asm @@ -1,6 +1,6 @@ ; AI_SMART prefers these moves during rain. -RainDanceMoves: ; 390e7 +RainDanceMoves: db WATER_GUN db HYDRO_PUMP db SURF @@ -13,4 +13,3 @@ RainDanceMoves: ; 390e7 db OCTAZOOKA db WHIRLPOOL db -1 ; end -; 390f3 diff --git a/data/battle/ai/reckless_moves.asm b/data/battle/ai/reckless_moves.asm index 40bc070d8af..67252979bd2 100644 --- a/data/battle/ai/reckless_moves.asm +++ b/data/battle/ai/reckless_moves.asm @@ -1,10 +1,9 @@ ; AI_AGGRESSIVE does not discourage these moves ; even if a stronger one is available. -RecklessMoves: ; 393e2 +RecklessMoves: db EFFECT_SELFDESTRUCT db EFFECT_RAMPAGE db EFFECT_MULTI_HIT db EFFECT_DOUBLE_HIT db -1 ; end -; 393e7 diff --git a/data/battle/ai/residual_moves.asm b/data/battle/ai/residual_moves.asm index 99407e2388c..c99ac0f5ec0 100644 --- a/data/battle/ai/residual_moves.asm +++ b/data/battle/ai/residual_moves.asm @@ -14,4 +14,3 @@ ResidualMoves: db SUBSTITUTE db SPIKES db -1 ; end -; 39453 diff --git a/data/battle/ai/risky_effects.asm b/data/battle/ai/risky_effects.asm index 2ca0bc655d9..529436c48cd 100644 --- a/data/battle/ai/risky_effects.asm +++ b/data/battle/ai/risky_effects.asm @@ -1,8 +1,7 @@ ; AI_RISKY will not use these effects at max HP ; even if they would KO the player. -RiskyEffects: ; 394ff +RiskyEffects: db EFFECT_SELFDESTRUCT db EFFECT_OHKO db -1 ; end -; 39502 diff --git a/data/battle/ai/stall_moves.asm b/data/battle/ai/stall_moves.asm index 5a017dadf74..65838e0f0f8 100644 --- a/data/battle/ai/stall_moves.asm +++ b/data/battle/ai/stall_moves.asm @@ -1,7 +1,7 @@ ; AI_OPPORTUNIST discourages these moves ; when the player's HP is low. -StallMoves: ; 39348 +StallMoves: db SWORDS_DANCE db TAIL_WHIP db LEER @@ -35,4 +35,3 @@ StallMoves: ; 39348 db SUBSTITUTE db FLAME_WHEEL db -1 ; end -; 39369 diff --git a/data/battle/ai/status_only_effects.asm b/data/battle/ai/status_only_effects.asm index daeadb46c13..8748d93b3a7 100644 --- a/data/battle/ai/status_only_effects.asm +++ b/data/battle/ai/status_only_effects.asm @@ -1,10 +1,9 @@ ; AI_BASIC discourages these effects if the player ; already has a status condition. -StatusOnlyEffects: ; 385db +StatusOnlyEffects: db EFFECT_SLEEP db EFFECT_TOXIC db EFFECT_POISON db EFFECT_PARALYZE db -1 ; end -; 385e0 diff --git a/data/battle/ai/sunny_day_moves.asm b/data/battle/ai/sunny_day_moves.asm index 0ec59bc9e44..38d6a8ee7ae 100644 --- a/data/battle/ai/sunny_day_moves.asm +++ b/data/battle/ai/sunny_day_moves.asm @@ -1,6 +1,6 @@ ; AI_SMART prefers these moves during harsh sunlight. -SunnyDayMoves: ; 39134 +SunnyDayMoves: db FIRE_PUNCH db EMBER db FLAMETHROWER @@ -10,4 +10,3 @@ SunnyDayMoves: ; 39134 db MORNING_SUN db SYNTHESIS db -1 ; end -; 3913d diff --git a/data/battle/ai/useful_moves.asm b/data/battle/ai/useful_moves.asm index 3bab9e598aa..456bda2da69 100644 --- a/data/battle/ai/useful_moves.asm +++ b/data/battle/ai/useful_moves.asm @@ -1,6 +1,6 @@ ; AI_SMART knows these moves are usable all-around. -UsefulMoves: ; 39301 +UsefulMoves: db DOUBLE_EDGE db SING db FLAMETHROWER @@ -21,4 +21,3 @@ UsefulMoves: ; 39301 db SOFTBOILED db SUPER_FANG db -1 ; end -; 39315 diff --git a/data/battle/effect_command_pointers.asm b/data/battle/effect_command_pointers.asm index f18e3c23054..1b06eefe7bb 100644 --- a/data/battle/effect_command_pointers.asm +++ b/data/battle/effect_command_pointers.asm @@ -2,181 +2,180 @@ dw 0 ; padding -BattleCommandPointers: ; 3fd28 +BattleCommandPointers: ; entries correspond to macros/scripts/battle_commands.asm - dw BattleCommand_CheckTurn ; 34084 - dw BattleCommand_CheckObedience ; 343db - dw BattleCommand_UsedMoveText ; 34541 - dw BattleCommand_DoTurn ; 34555 - dw BattleCommand_Critical ; 34631 - dw BattleCommand_DamageStats ; 352dc - dw BattleCommand_Stab ; 346d2 - 07 - dw BattleCommand_DamageVariation ; 34cfd - dw BattleCommand_CheckHit ; 34d32 - dw BattleCommand_LowerSub ; 34eee - dw BattleCommand_MoveAnimNoSub ; 34f60 - dw BattleCommand_RaiseSub ; 35004 - dw BattleCommand_FailureText ; 35023 - dw BattleCommand_ApplyDamage ; 3505e - dw BattleCommand_CriticalText ; 35175 - dw BattleCommand_SuperEffectiveText ; 351ad - dw BattleCommand_CheckDestinyBond ; 351c0 - dw BattleCommand_BuildOpponentRage ; 35250 - dw BattleCommand_PoisonTarget ; 35eee - dw BattleCommand_SleepTarget ; 35e5c - dw BattleCommand_DrainTarget ; 35fff - dw BattleCommand_EatDream ; 36008 - dw BattleCommand_BurnTarget ; 3608c - dw BattleCommand_FreezeTarget ; 36102 - dw BattleCommand_ParalyzeTarget ; 36165 - dw BattleCommand_Selfdestruct ; 37380 - dw BattleCommand_MirrorMove ; 373c9 - dw BattleCommand_StatUp ; 361e4 - dw BattleCommand_StatDown ; 362e3 - dw BattleCommand_PayDay ; 3705c - dw BattleCommand_Conversion ; 3707f - dw BattleCommand_ResetStats ; 3710e - dw BattleCommand_StoreEnergy ; 36671 - dw BattleCommand_UnleashEnergy ; 366e5 - dw BattleCommand_ForceSwitch ; 3680f - dw BattleCommand_EndLoop ; 369b6 - dw BattleCommand_FlinchTarget ; 36aa0 - dw BattleCommand_OHKO ; 36af3 - dw BattleCommand_Recoil ; 36cb2 - dw BattleCommand_Mist ; 36c7e - dw BattleCommand_FocusEnergy ; 36c98 - dw BattleCommand_Confuse ; 36d3b - dw BattleCommand_ConfuseTarget ; 36d1d - dw BattleCommand_Heal ; 3713e - dw BattleCommand_Transform ; 371cd - dw BattleCommand_Screen ; 372fc - dw BattleCommand_Poison ; 35f2c - dw BattleCommand_Paralyze ; 36dc7 - dw BattleCommand_Substitute ; 36e7c - dw BattleCommand_RechargeNextTurn ; 36f0b - dw BattleCommand_Mimic ; 36f46 - dw BattleCommand_Metronome ; 37418 - dw BattleCommand_LeechSeed ; 36f9d - dw BattleCommand_Splash ; 36fe1 - dw BattleCommand_Disable ; 36fed - dw BattleCommand_ClearText ; 37e85 - dw BattleCommand_Charge ; 36b4d - dw BattleCommand_CheckCharge ; 36b3a - dw BattleCommand_TrapTarget ; 36c2d - dw BattleCommand3c ; 36c2c - dw BattleCommand_Rampage ; 36751 - dw BattleCommand_CheckRampage ; 3671a - dw BattleCommand_ConstantDamage ; 35726 - dw BattleCommand_Counter ; 35813 - dw BattleCommand_Encore ; 35864 - dw BattleCommand_PainSplit ; 35926 - dw BattleCommand_Snore ; 359d0 - dw BattleCommand_Conversion2 ; 359e6 - dw BattleCommand_LockOn ; 35a53 - dw BattleCommand_Sketch ; 35a74 - dw BattleCommand_DefrostOpponent ; 35b16 - dw BattleCommand_SleepTalk ; 35b33 - dw BattleCommand_DestinyBond ; 35bff - dw BattleCommand_Spite ; 35c0f - dw BattleCommand_FalseSwipe ; 35c94 - dw BattleCommand_HealBell ; 35cc9 - dw BattleCommand_HeldFlinch ; 36ac9 - dw BattleCommand_TripleKick ; 346b2 - dw BattleCommand_KickCounter ; 346cd - dw BattleCommand_Thief ; 37492 - dw BattleCommand_ArenaTrap ; 37517 - dw BattleCommand_Nightmare ; 37536 - dw BattleCommand_Defrost ; 37563 - dw BattleCommand_Curse ; 37588 - dw BattleCommand_Protect ; 37618 - dw BattleCommand_Spikes ; 37683 - dw BattleCommand_Foresight ; 376a0 - dw BattleCommand_PerishSong ; 376c2 - dw BattleCommand_StartSandstorm ; 376f8 - dw BattleCommand_Endure ; 3766f - dw BattleCommand_CheckCurl ; 37718 - dw BattleCommand_RolloutPower ; 37734 - dw BattleCommand5d ; 37791 - dw BattleCommand_FuryCutter ; 37792 - dw BattleCommand_Attract ; 377ce - dw BattleCommand_HappinessPower ; 3784b - dw BattleCommand_Present ; 37874 - dw BattleCommand_DamageCalc ; 35612 - 62 - dw BattleCommand_FrustrationPower ; 3790e - dw BattleCommand_Safeguard ; 37939 - dw BattleCommand_CheckSafeguard ; 37972 - dw BattleCommand_GetMagnitude ; 37991 - dw BattleCommand_BatonPass ; 379c9 - dw BattleCommand_Pursuit ; 37b1d - dw BattleCommand_ClearHazards ; 37b39 - dw BattleCommand_HealMorn ; 37b74 - dw BattleCommand_HealDay ; 37b78 - dw BattleCommand_HealNite ; 37b7c - dw BattleCommand_HiddenPower ; 37be8 - dw BattleCommand_StartRain ; 37bf4 - dw BattleCommand_StartSun ; 37c07 - dw BattleCommand_AttackUp ; 361ac - dw BattleCommand_DefenseUp ; 361b0 - dw BattleCommand_SpeedUp ; 361b4 - dw BattleCommand_SpecialAttackUp ; 361b8 - dw BattleCommand_SpecialDefenseUp ; 361bc - dw BattleCommand_AccuracyUp ; 361c0 - dw BattleCommand_EvasionUp ; 361c4 - dw BattleCommand_AttackUp2 ; 361c8 - dw BattleCommand_DefenseUp2 ; 361cc - dw BattleCommand_SpeedUp2 ; 361d0 - dw BattleCommand_SpecialAttackUp2 ; 361d4 - dw BattleCommand_SpecialDefenseUp2 ; 361d8 - dw BattleCommand_AccuracyUp2 ; 361dc - dw BattleCommand_EvasionUp2 ; 361e0 - dw BattleCommand_AttackDown ; 362ad - dw BattleCommand_DefenseDown ; 362b1 - dw BattleCommand_SpeedDown ; 362b5 - dw BattleCommand_SpecialAttackDown ; 362b9 - dw BattleCommand_SpecialDefenseDown ; 362bd - dw BattleCommand_AccuracyDown ; 362c1 - dw BattleCommand_EvasionDown ; 362c5 - dw BattleCommand_AttackDown2 ; 362c9 - dw BattleCommand_DefenseDown2 ; 362cd - dw BattleCommand_SpeedDown2 ; 362d1 - dw BattleCommand_SpecialAttackDown2 ; 362d5 - dw BattleCommand_SpecialDefenseDown2 ; 362d9 - dw BattleCommand_AccuracyDown2 ; 362dd - dw BattleCommand_EvasionDown2 ; 362e1 - dw BattleCommand_StatUpMessage ; 363b8 - dw BattleCommand_StatDownMessage ; 363e9 - dw BattleCommand_StatUpFailText ; 3644c - dw BattleCommand_StatDownFailText ; 3646a - dw BattleCommand_EffectChance ; 34ecc - dw BattleCommand_StatDownAnim ; 34fdb - dw BattleCommand_StatUpAnim ; 34fd1 - dw BattleCommand_SwitchTurn ; 34ffd - 93 - dw BattleCommand_FakeOut ; 36a82 - dw BattleCommand_BellyDrum ; 37c1a - dw BattleCommand_PsychUp ; 37c55 - dw BattleCommand_Rage ; 36f1d - dw BattleCommand_DoubleFlyingDamage ; 36f25 - dw BattleCommand_DoubleUndergroundDamage ; 36f2f - dw BattleCommand_MirrorCoat ; 37c95 - dw BattleCommand_CheckFutureSight ; 37d0d - dw BattleCommand_FutureSight ; 37d34 - dw BattleCommand_DoubleMinimizeDamage ; 37ce6 - dw BattleCommand_SkipSunCharge ; 37d02 - dw BattleCommand_ThunderAccuracy ; 37d94 - dw BattleCommand_Teleport ; 36778 - dw BattleCommand_BeatUp ; 35461 - dw BattleCommand_RageDamage ; 3527b - dw BattleCommand_ResetTypeMatchup ; 34833 - dw BattleCommand_AllStatsUp ; 36500 - dw BattleCommand_BideFailText ; 35165 - dw BattleCommand_RaiseSubNoAnim ; 365af - dw BattleCommand_LowerSubNoAnim ; 365c3 - dw BattleCommand_BeatUpFailText ; 355b5 - dw BattleCommand_ClearMissDamage ; 355d5 - a9 - dw BattleCommand_MoveDelay ; 37e80 - dw BattleCommand_MoveAnim ; 34f57 - dw BattleCommand_TriStatusChance ; 3658f - dw BattleCommand_SuperEffectiveLoopText ; 351a5 - dw BattleCommand_StartLoop ; 35197 - dw BattleCommand_Curl ; 365a7 -; 3fe86 + dw BattleCommand_CheckTurn + dw BattleCommand_CheckObedience + dw BattleCommand_UsedMoveText + dw BattleCommand_DoTurn + dw BattleCommand_Critical + dw BattleCommand_DamageStats + dw BattleCommand_Stab + dw BattleCommand_DamageVariation + dw BattleCommand_CheckHit + dw BattleCommand_LowerSub + dw BattleCommand_MoveAnimNoSub + dw BattleCommand_RaiseSub + dw BattleCommand_FailureText + dw BattleCommand_ApplyDamage + dw BattleCommand_CriticalText + dw BattleCommand_SuperEffectiveText + dw BattleCommand_CheckDestinyBond + dw BattleCommand_BuildOpponentRage + dw BattleCommand_PoisonTarget + dw BattleCommand_SleepTarget + dw BattleCommand_DrainTarget + dw BattleCommand_EatDream + dw BattleCommand_BurnTarget + dw BattleCommand_FreezeTarget + dw BattleCommand_ParalyzeTarget + dw BattleCommand_Selfdestruct + dw BattleCommand_MirrorMove + dw BattleCommand_StatUp + dw BattleCommand_StatDown + dw BattleCommand_PayDay + dw BattleCommand_Conversion + dw BattleCommand_ResetStats + dw BattleCommand_StoreEnergy + dw BattleCommand_UnleashEnergy + dw BattleCommand_ForceSwitch + dw BattleCommand_EndLoop + dw BattleCommand_FlinchTarget + dw BattleCommand_OHKO + dw BattleCommand_Recoil + dw BattleCommand_Mist + dw BattleCommand_FocusEnergy + dw BattleCommand_Confuse + dw BattleCommand_ConfuseTarget + dw BattleCommand_Heal + dw BattleCommand_Transform + dw BattleCommand_Screen + dw BattleCommand_Poison + dw BattleCommand_Paralyze + dw BattleCommand_Substitute + dw BattleCommand_RechargeNextTurn + dw BattleCommand_Mimic + dw BattleCommand_Metronome + dw BattleCommand_LeechSeed + dw BattleCommand_Splash + dw BattleCommand_Disable + dw BattleCommand_ClearText + dw BattleCommand_Charge + dw BattleCommand_CheckCharge + dw BattleCommand_TrapTarget + dw BattleCommand3c + dw BattleCommand_Rampage + dw BattleCommand_CheckRampage + dw BattleCommand_ConstantDamage + dw BattleCommand_Counter + dw BattleCommand_Encore + dw BattleCommand_PainSplit + dw BattleCommand_Snore + dw BattleCommand_Conversion2 + dw BattleCommand_LockOn + dw BattleCommand_Sketch + dw BattleCommand_DefrostOpponent + dw BattleCommand_SleepTalk + dw BattleCommand_DestinyBond + dw BattleCommand_Spite + dw BattleCommand_FalseSwipe + dw BattleCommand_HealBell + dw BattleCommand_HeldFlinch + dw BattleCommand_TripleKick + dw BattleCommand_KickCounter + dw BattleCommand_Thief + dw BattleCommand_ArenaTrap + dw BattleCommand_Nightmare + dw BattleCommand_Defrost + dw BattleCommand_Curse + dw BattleCommand_Protect + dw BattleCommand_Spikes + dw BattleCommand_Foresight + dw BattleCommand_PerishSong + dw BattleCommand_StartSandstorm + dw BattleCommand_Endure + dw BattleCommand_CheckCurl + dw BattleCommand_RolloutPower + dw BattleCommand5d + dw BattleCommand_FuryCutter + dw BattleCommand_Attract + dw BattleCommand_HappinessPower + dw BattleCommand_Present + dw BattleCommand_DamageCalc + dw BattleCommand_FrustrationPower + dw BattleCommand_Safeguard + dw BattleCommand_CheckSafeguard + dw BattleCommand_GetMagnitude + dw BattleCommand_BatonPass + dw BattleCommand_Pursuit + dw BattleCommand_ClearHazards + dw BattleCommand_HealMorn + dw BattleCommand_HealDay + dw BattleCommand_HealNite + dw BattleCommand_HiddenPower + dw BattleCommand_StartRain + dw BattleCommand_StartSun + dw BattleCommand_AttackUp + dw BattleCommand_DefenseUp + dw BattleCommand_SpeedUp + dw BattleCommand_SpecialAttackUp + dw BattleCommand_SpecialDefenseUp + dw BattleCommand_AccuracyUp + dw BattleCommand_EvasionUp + dw BattleCommand_AttackUp2 + dw BattleCommand_DefenseUp2 + dw BattleCommand_SpeedUp2 + dw BattleCommand_SpecialAttackUp2 + dw BattleCommand_SpecialDefenseUp2 + dw BattleCommand_AccuracyUp2 + dw BattleCommand_EvasionUp2 + dw BattleCommand_AttackDown + dw BattleCommand_DefenseDown + dw BattleCommand_SpeedDown + dw BattleCommand_SpecialAttackDown + dw BattleCommand_SpecialDefenseDown + dw BattleCommand_AccuracyDown + dw BattleCommand_EvasionDown + dw BattleCommand_AttackDown2 + dw BattleCommand_DefenseDown2 + dw BattleCommand_SpeedDown2 + dw BattleCommand_SpecialAttackDown2 + dw BattleCommand_SpecialDefenseDown2 + dw BattleCommand_AccuracyDown2 + dw BattleCommand_EvasionDown2 + dw BattleCommand_StatUpMessage + dw BattleCommand_StatDownMessage + dw BattleCommand_StatUpFailText + dw BattleCommand_StatDownFailText + dw BattleCommand_EffectChance + dw BattleCommand_StatDownAnim + dw BattleCommand_StatUpAnim + dw BattleCommand_SwitchTurn + dw BattleCommand_FakeOut + dw BattleCommand_BellyDrum + dw BattleCommand_PsychUp + dw BattleCommand_Rage + dw BattleCommand_DoubleFlyingDamage + dw BattleCommand_DoubleUndergroundDamage + dw BattleCommand_MirrorCoat + dw BattleCommand_CheckFutureSight + dw BattleCommand_FutureSight + dw BattleCommand_DoubleMinimizeDamage + dw BattleCommand_SkipSunCharge + dw BattleCommand_ThunderAccuracy + dw BattleCommand_Teleport + dw BattleCommand_BeatUp + dw BattleCommand_RageDamage + dw BattleCommand_ResetTypeMatchup + dw BattleCommand_AllStatsUp + dw BattleCommand_BideFailText + dw BattleCommand_RaiseSubNoAnim + dw BattleCommand_LowerSubNoAnim + dw BattleCommand_BeatUpFailText + dw BattleCommand_ClearMissDamage + dw BattleCommand_MoveDelay + dw BattleCommand_MoveAnim + dw BattleCommand_TriStatusChance + dw BattleCommand_SuperEffectiveLoopText + dw BattleCommand_StartLoop + dw BattleCommand_Curl diff --git a/data/battle/held_consumables.asm b/data/battle/held_consumables.asm index c1b28822c4c..bd47c1d83b0 100644 --- a/data/battle/held_consumables.asm +++ b/data/battle/held_consumables.asm @@ -1,6 +1,6 @@ ; Held item effects that are consumed on use -ConsumableEffects: ; 271de +ConsumableEffects: db HELD_BERRY db HELD_2 db HELD_5 @@ -23,4 +23,3 @@ ConsumableEffects: ; 271de db HELD_ESCAPE db HELD_CRITICAL_UP db -1 -; 271f4 diff --git a/data/battle/held_heal_status.asm b/data/battle/held_heal_status.asm index b563351896e..ac11b645b52 100644 --- a/data/battle/held_heal_status.asm +++ b/data/battle/held_heal_status.asm @@ -1,6 +1,6 @@ ; See also data/items/heal_status.asm -HeldStatusHealingEffects: ; 3de44 +HeldStatusHealingEffects: db HELD_HEAL_POISON, 1 << PSN db HELD_HEAL_FREEZE, 1 << FRZ db HELD_HEAL_BURN, 1 << BRN @@ -8,4 +8,3 @@ HeldStatusHealingEffects: ; 3de44 db HELD_HEAL_PARALYZE, 1 << PAR db HELD_HEAL_STATUS, ALL_STATUS db -1 ; end -; 3de51 diff --git a/data/battle/held_stat_up.asm b/data/battle/held_stat_up.asm index a08aa184467..4f28c0d08d9 100644 --- a/data/battle/held_stat_up.asm +++ b/data/battle/held_stat_up.asm @@ -7,4 +7,3 @@ HeldStatUpItems: dbw HELD_ACCURACY_UP, BattleCommand_AccuracyUp dbw HELD_EVASION_UP, BattleCommand_EvasionUp db -1 ; end -; 3df12 diff --git a/data/battle/metronome_exception_moves.asm b/data/battle/metronome_exception_moves.asm index e9cd7f860ee..a5aa4413216 100644 --- a/data/battle/metronome_exception_moves.asm +++ b/data/battle/metronome_exception_moves.asm @@ -1,6 +1,6 @@ ; Metronome cannot turn into these moves. -MetronomeExcepts: ; 37454 +MetronomeExcepts: db NO_MOVE db METRONOME db STRUGGLE @@ -15,4 +15,3 @@ MetronomeExcepts: ; 37454 db SLEEP_TALK db THIEF db -1 -; 37462 diff --git a/data/battle_anims/ball_colors.asm b/data/battle_anims/ball_colors.asm index c3ba9d2b4e1..0453c14b7e4 100644 --- a/data/battle_anims/ball_colors.asm +++ b/data/battle_anims/ball_colors.asm @@ -1,6 +1,6 @@ ; colors of balls thrown in battle -BallColors: ; cd26c (33:526c) +BallColors: db MASTER_BALL, PAL_BATTLE_OB_GREEN db ULTRA_BALL, PAL_BATTLE_OB_YELLOW db GREAT_BALL, PAL_BATTLE_OB_BLUE @@ -13,4 +13,3 @@ BallColors: ; cd26c (33:526c) db MOON_BALL, PAL_BATTLE_OB_GRAY db LOVE_BALL, PAL_BATTLE_OB_RED db -1, PAL_BATTLE_OB_GRAY -; cd284 diff --git a/data/battle_anims/framesets.asm b/data/battle_anims/framesets.asm index 905597cfaa4..35cb3e5a88e 100644 --- a/data/battle_anims/framesets.asm +++ b/data/battle_anims/framesets.asm @@ -1,4 +1,4 @@ -BattleAnimFrameData: ; ce85e +BattleAnimFrameData: ; entries correspond to BATTLEANIMFRAMESET_* constants dw .Frameset_00 ; BATTLEANIMFRAMESET_00 dw .Frameset_01 ; BATTLEANIMFRAMESET_01 @@ -1267,4 +1267,3 @@ BattleAnimFrameData: ; ce85e frame BATTLEANIMOAMSET_D7, 8 endanim -; ceeae diff --git a/data/battle_anims/oam.asm b/data/battle_anims/oam.asm index d4b0b6978e9..1beca2937da 100644 --- a/data/battle_anims/oam.asm +++ b/data/battle_anims/oam.asm @@ -1,4 +1,4 @@ -BattleAnimOAMData: ; ceeae +BattleAnimOAMData: ; entries correspond to BATTLEANIMOAMSET_* constants ; vtile offset, length, pointer dbbw $00, 16, .OAMData_00 ; BATTLEANIMOAMSET_00 @@ -1083,4 +1083,3 @@ BattleAnimOAMData: ; ceeae dsprite -2, 0, 6, 4, $00, $0 dsprite -4, 0, 8, 4, $00, $0 dsprite -2, 0, 10, 4, $00, $0 -; cfcf6 diff --git a/data/battle_anims/object_gfx.asm b/data/battle_anims/object_gfx.asm index 441692b0309..432e513dd93 100644 --- a/data/battle_anims/object_gfx.asm +++ b/data/battle_anims/object_gfx.asm @@ -4,7 +4,7 @@ anim_obj_gfx: MACRO dba \2 ENDM -AnimObjGFX: ; cfcf6 +AnimObjGFX: ; entries correspond to ANIM_GFX_* constants anim_obj_gfx 0, AnimObj00GFX anim_obj_gfx 21, AnimObjHitGFX @@ -48,4 +48,3 @@ AnimObjGFX: ; cfcf6 anim_obj_gfx 24, AnimObjAeroblastGFX anim_obj_gfx 1, NULL anim_obj_gfx 1, NULL -; cfd9e diff --git a/data/battle_anims/objects.asm b/data/battle_anims/objects.asm index 3d46ae2d7f4..0cd19ae0dcf 100644 --- a/data/battle_anims/objects.asm +++ b/data/battle_anims/objects.asm @@ -16,7 +16,7 @@ battleanimobj: MACRO db \6 ; tile offset ENDM -BattleAnimObjects: ; ccb56 +BattleAnimObjects: ; entries correspond to ANIM_OBJ_* constants battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_00, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_00 battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_01, BATTLEANIMFUNC_00, PAL_BATTLE_OB_GRAY, $01 ; ANIM_OBJ_01 @@ -206,4 +206,3 @@ BattleAnimObjects: ; ccb56 battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B6, BATTLEANIMFUNC_00, PAL_BATTLE_OB_PLAYER, $29 ; ANIM_OBJ_ENEMYFEETFOLLOW battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B7, BATTLEANIMFUNC_00, PAL_BATTLE_OB_ENEMY, $28 ; ANIM_OBJ_PLAYERHEADFOLLOW battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B8, BATTLEANIMFUNC_00, PAL_BATTLE_OB_PLAYER, $29 ; ANIM_OBJ_ENEMYHEADFOLLOW -; ccfbe diff --git a/data/battle_tower/classes.asm b/data/battle_tower/classes.asm index 5a148e6ec11..c53197548a3 100644 --- a/data/battle_tower/classes.asm +++ b/data/battle_tower/classes.asm @@ -1,4 +1,4 @@ -BattleTowerTrainers: ; 1f814e +BattleTowerTrainers: ; The trainer class is not used in Crystal 1.0 due to a bug. ; Instead, the sixth character in the trainer's name is used. ; See BattleTowerText in engine/events/battle_tower/trainer_text.asm. @@ -73,4 +73,3 @@ BattleTowerTrainers: ; 1f814e db "DYKSTRA@@@", SWIMMERF db "EATON@@@@@", BIKER db "WONG@@@@@@", FIREBREATHER -; 1f8450 diff --git a/data/battle_tower/parties.asm b/data/battle_tower/parties.asm index c7008a2477e..e4e8f151a95 100644 --- a/data/battle_tower/parties.asm +++ b/data/battle_tower/parties.asm @@ -1,4 +1,4 @@ -BattleTowerMons: ; 1f8450 +BattleTowerMons: ; 10 groups of 21 mons. diff --git a/data/credits_script.asm b/data/credits_script.asm index 810e61c8318..7f349aaada3 100644 --- a/data/credits_script.asm +++ b/data/credits_script.asm @@ -1,4 +1,4 @@ -CreditsScript: ; 10acb4 +CreditsScript: ; Clear the banner. db CREDITS_CLEAR @@ -284,4 +284,3 @@ CreditsScript: ; 10acb4 db CREDITS_WAIT, 20 db CREDITS_END -; 10ae13 diff --git a/data/decorations/attributes.asm b/data/decorations/attributes.asm index a60f441a63a..1be457395e0 100644 --- a/data/decorations/attributes.asm +++ b/data/decorations/attributes.asm @@ -5,7 +5,7 @@ decoration: MACRO db \5 ENDM -DecorationAttributes: ; 26a4f +DecorationAttributes: ; entries correspond to deco constants decoration DECO_PLANT, $00, $0, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, $00 decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BED, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, $00 @@ -60,4 +60,3 @@ DecorationAttributes: ; 26a4f decoration DECO_DOLL, TENTACOOL, SET_UP_DOLL, EVENT_DECO_TENTACOOL_DOLL, SPRITE_TENTACOOL decoration DECO_PLANT, GOLD_TROPHY, SET_UP_DOLL, EVENT_DECO_GOLD_TROPHY, SPRITE_GOLD_TROPHY decoration DECO_PLANT, SILVER_TROPHY, SET_UP_DOLL, EVENT_DECO_SILVER_TROPHY, SPRITE_SILVER_TROPHY -; 26b8d diff --git a/data/decorations/decorations.asm b/data/decorations/decorations.asm index 7b76b8f6a6f..947bca1b904 100644 --- a/data/decorations/decorations.asm +++ b/data/decorations/decorations.asm @@ -1,4 +1,4 @@ -DecorationIDs: ; 26f2b +DecorationIDs: ; see constants/deco_constants.asm db DECO_FEATHERY_BED ; 2 db DECO_PINK_BED ; 3 @@ -52,4 +52,3 @@ TrophyIDs: db DECO_GOLD_TROPHY_DOLL ; 33 db DECO_SILVER_TROPHY_DOLL ; 34 db -1 -; 26f59 diff --git a/data/decorations/mystery_gift_decos.asm b/data/decorations/mystery_gift_decos.asm index 94a5935dea5..3b75c0a5868 100644 --- a/data/decorations/mystery_gift_decos.asm +++ b/data/decorations/mystery_gift_decos.asm @@ -1,4 +1,4 @@ -MysteryGiftDecos: ; 2c74a +MysteryGiftDecos: db DECOFLAG_PIKACHU_DOLL db DECOFLAG_BULBASAUR_DOLL db DECOFLAG_CHARMANDER_DOLL @@ -37,4 +37,3 @@ MysteryGiftDecos: ; 2c74a db DECOFLAG_GRIMER_DOLL db DECOFLAG_UNOWN_DOLL .End -; 2c76f diff --git a/data/decorations/names.asm b/data/decorations/names.asm index 21f7eb2a041..1e3a00140fc 100644 --- a/data/decorations/names.asm +++ b/data/decorations/names.asm @@ -1,4 +1,4 @@ -DecorationNames: ; 26b8d +DecorationNames: ; entries correspond to constants/deco_constants.asm db "CANCEL@" db "PUT IT AWAY@" @@ -26,4 +26,3 @@ DecorationNames: ; 26b8d db "BLUE@" db "YELLOW@" db "GREEN@" -; 26c72 diff --git a/data/default_options.asm b/data/default_options.asm index 7a4f7712828..991827316e4 100644 --- a/data/default_options.asm +++ b/data/default_options.asm @@ -1,4 +1,4 @@ -DefaultOptions: ; 14f7c +DefaultOptions: ; wOptions: med text speed db TEXT_DELAY_MED ; wSaveFileExists: no @@ -14,4 +14,3 @@ DefaultOptions: ; 14f7c db $00 db $00 -; 14f84 diff --git a/data/engine_flags.asm b/data/engine_flags.asm index 7a74276cd97..9099953ca32 100644 --- a/data/engine_flags.asm +++ b/data/engine_flags.asm @@ -4,7 +4,7 @@ engine_flag: MACRO dwb \1 + (\2 / 8), 1 << (\2 % 8) ENDM -EngineFlags: ; 80462 +EngineFlags: ; entries correspond to ENGINE_* constants ; pokegear @@ -198,4 +198,3 @@ EngineFlags: ; 80462 engine_flag wSwarmFlags, SWARMFLAGS_DUNSPARCE_SWARM_F ; $a0 engine_flag wSwarmFlags, SWARMFLAGS_YANMA_SWARM_F -; 80648 diff --git a/data/events/bug_contest_flags.asm b/data/events/bug_contest_flags.asm index 04d748270d2..734bf11f8d5 100644 --- a/data/events/bug_contest_flags.asm +++ b/data/events/bug_contest_flags.asm @@ -1,4 +1,4 @@ -BugCatchingContestantEventFlagTable: ; 139fe +BugCatchingContestantEventFlagTable: ; there are NUM_BUG_CONTESTANTS entries dw EVENT_BUG_CATCHING_CONTESTANT_1A dw EVENT_BUG_CATCHING_CONTESTANT_2A @@ -10,4 +10,3 @@ BugCatchingContestantEventFlagTable: ; 139fe dw EVENT_BUG_CATCHING_CONTESTANT_8A dw EVENT_BUG_CATCHING_CONTESTANT_9A dw EVENT_BUG_CATCHING_CONTESTANT_10A -; 13a12 diff --git a/data/events/bug_contest_winners.asm b/data/events/bug_contest_winners.asm index 7a465edf555..e29ce0436c2 100644 --- a/data/events/bug_contest_winners.asm +++ b/data/events/bug_contest_winners.asm @@ -1,4 +1,4 @@ -BugContestantPointers: ; 13783 +BugContestantPointers: ; there are NUM_BUG_CONTESTANTS + 1 entries dw BugContestant_BugCatcherDon ; this reverts back to the player dw BugContestant_BugCatcherDon @@ -11,7 +11,6 @@ BugContestantPointers: ; 13783 dw BugContestant_BugCatcherJosh dw BugContestant_YoungsterSamuel dw BugContestant_SchoolboyKipp -; 13799 ; contestant format: ; db class, id @@ -78,4 +77,3 @@ BugContestant_SchoolboyKipp: dbw VENONAT, 267 dbw PARAS, 254 dbw KAKUNA, 259 -; 13807 diff --git a/data/events/field_move_blocks.asm b/data/events/field_move_blocks.asm index d97fdc9951a..b7cae3dd791 100644 --- a/data/events/field_move_blocks.asm +++ b/data/events/field_move_blocks.asm @@ -1,4 +1,4 @@ -CutTreeBlockPointers: ; c862 +CutTreeBlockPointers: ; tileset, block list pointer dbw TILESET_JOHTO, .johto dbw TILESET_JOHTO_MODERN, .johto_modern @@ -43,7 +43,7 @@ CutTreeBlockPointers: ; c862 db -1 ; end -WhirlpoolBlockPointers: ; c8a4 +WhirlpoolBlockPointers: dbw TILESET_JOHTO, .johto db -1 ; end diff --git a/data/events/happiness_probabilities.asm b/data/events/happiness_probabilities.asm index 22a7395d90d..0dc08ac7ed4 100644 --- a/data/events/happiness_probabilities.asm +++ b/data/events/happiness_probabilities.asm @@ -1,12 +1,12 @@ -HappinessData_YoungerHaircutBrother: ; 7459 +HappinessData_YoungerHaircutBrother: db $4c, 2, HAPPINESS_YOUNGCUT1 ; 30% chance db $80, 3, HAPPINESS_YOUNGCUT2 ; 20% chance db $ff, 4, HAPPINESS_YOUNGCUT3 ; 50% chance -HappinessData_OlderHaircutBrother: ; 7462 +HappinessData_OlderHaircutBrother: db $9a, 2, HAPPINESS_OLDERCUT1 ; 60% chance db $4c, 3, HAPPINESS_OLDERCUT2 ; 10% chance db $ff, 4, HAPPINESS_OLDERCUT3 ; 30% chance -HappinessData_DaisysGrooming: ; 746b +HappinessData_DaisysGrooming: db $ff, 2, HAPPINESS_GROOMING ; 99.6% chance diff --git a/data/events/magikarp_lengths.asm b/data/events/magikarp_lengths.asm index a631ef71995..1a1040d6c68 100644 --- a/data/events/magikarp_lengths.asm +++ b/data/events/magikarp_lengths.asm @@ -1,4 +1,4 @@ -MagikarpLengths: ; fbca8 +MagikarpLengths: ; [wMagikarpLength] = z * 100 + (bc - x) / y ; First argument is the bc threshold as well as x. ; Second argument is y. @@ -18,4 +18,3 @@ MagikarpLengths: ; fbca8 dwb 65210, 5 dwb 65410, 2 dwb 65510, 1 ; not used -; fbcd2 diff --git a/data/events/npc_trades.asm b/data/events/npc_trades.asm index b019baf7a31..03d40957107 100644 --- a/data/events/npc_trades.asm +++ b/data/events/npc_trades.asm @@ -6,7 +6,7 @@ npctrade: MACRO db \8, \9, 0 ENDM -NPCTrades: ; fce58 +NPCTrades: ; entries correspond to NPCTRADE_* constants npctrade TRADE_DIALOGSET_COLLECTOR, ABRA, MACHOP, "MUSCLE@@@@@", $37, $66, GOLD_BERRY, 37460, "MIKE@@@@@@@", TRADE_GENDER_EITHER npctrade TRADE_DIALOGSET_COLLECTOR, BELLSPROUT, ONIX, "ROCKY@@@@@@", $96, $66, BITTER_BERRY, 48926, "KYLE@@@@@@@", TRADE_GENDER_EITHER @@ -15,4 +15,3 @@ NPCTrades: ; fce58 npctrade TRADE_DIALOGSET_NEWBIE, HAUNTER, XATU, "PAUL@@@@@@@", $96, $86, MYSTERYBERRY, 15616, "CHRIS@@@@@@", TRADE_GENDER_EITHER npctrade TRADE_DIALOGSET_GIRL, CHANSEY, AERODACTYL, "AEROY@@@@@@", $96, $66, GOLD_BERRY, 26491, "KIM@@@@@@@@", TRADE_GENDER_EITHER npctrade TRADE_DIALOGSET_COLLECTOR, DUGTRIO, MAGNETON, "MAGGIE@@@@@", $96, $66, METAL_COAT, 50082, "FOREST@@@@@", TRADE_GENDER_EITHER -; fcf38 diff --git a/data/events/odd_eggs.asm b/data/events/odd_eggs.asm index aa7e8176bec..f006833a7fe 100644 --- a/data/events/odd_eggs.asm +++ b/data/events/odd_eggs.asm @@ -26,10 +26,9 @@ prob_total = 0 ; Tyrogue prob 10 prob 1 -; 1fb56e -OddEggs: ; 1fb56e +OddEggs: OddEgg1: db PICHU diff --git a/data/events/unown_walls.asm b/data/events/unown_walls.asm index d7fa26cbc8b..d0909d139d9 100644 --- a/data/events/unown_walls.asm +++ b/data/events/unown_walls.asm @@ -17,7 +17,7 @@ endr db -1 ; end ENDM -UnownWalls: ; 8aebc +UnownWalls: ; UNOWNWORDS_ESCAPE ; db $08, $44, $04, $00, $2e, $08, -1 unownwall "E", "S", "C", "A", "P", "E" @@ -30,7 +30,6 @@ UnownWalls: ; 8aebc ; UNOWNWORDS_HO_OH ; db $0e, $2c, $64, $2c, $0e, -1 unownwall "H", "O", "-", "O", "H" -; 8aed5 MenuHeaders_UnownWalls: ; 0x8aed5 ; UNOWNWORDS_ESCAPE @@ -45,4 +44,3 @@ MenuHeaders_UnownWalls: ; 0x8aed5 ; UNOWNWORDS_HO_OH db MENU_BACKUP_TILES ; flags menu_coords 4, 4, 15, 9 -; 8aee9 diff --git a/data/growth_rates.asm b/data/growth_rates.asm index 84e600139f0..aee2a16e7b5 100644 --- a/data/growth_rates.asm +++ b/data/growth_rates.asm @@ -9,7 +9,7 @@ growth_rate: MACRO db \4, \5 ENDM -GrowthRates: ; 50efa +GrowthRates: ; 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 @@ -17,4 +17,3 @@ GrowthRates: ; 50efa 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 -; 50f12 diff --git a/data/items/apricorn_balls.asm b/data/items/apricorn_balls.asm index 57e7d04bb6d..814aeab2fc5 100644 --- a/data/items/apricorn_balls.asm +++ b/data/items/apricorn_balls.asm @@ -1,4 +1,4 @@ -ApricornBalls: ; 24ca0 +ApricornBalls: ; apricorn, ball db RED_APRICORN, LEVEL_BALL db BLU_APRICORN, LURE_BALL @@ -8,4 +8,3 @@ ApricornBalls: ; 24ca0 db BLK_APRICORN, HEAVY_BALL db PNK_APRICORN, LOVE_BALL db -1 -; 24caf diff --git a/data/items/attributes.asm b/data/items/attributes.asm index e0198e3ad11..806a2ef28f8 100644 --- a/data/items/attributes.asm +++ b/data/items/attributes.asm @@ -5,7 +5,7 @@ item_attribute: MACRO dn \6, \7 ENDM -ItemAttributes: ; 67c1 +ItemAttributes: ; entries correspond to item ids ; MASTER_BALL item_attribute 0, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE diff --git a/data/items/bargain_shop.asm b/data/items/bargain_shop.asm index e4da9621061..a17db655009 100644 --- a/data/items/bargain_shop.asm +++ b/data/items/bargain_shop.asm @@ -1,4 +1,4 @@ -BargainShopData: ; 15c51 +BargainShopData: db 5 dbw NUGGET, 4500 dbw PEARL, 650 @@ -6,4 +6,3 @@ BargainShopData: ; 15c51 dbw STARDUST, 900 dbw STAR_PIECE, 4600 db -1 -; 15c62 diff --git a/data/items/buena_prizes.asm b/data/items/buena_prizes.asm index baac8a56d7e..b0737aee2c3 100644 --- a/data/items/buena_prizes.asm +++ b/data/items/buena_prizes.asm @@ -1,4 +1,4 @@ -BuenaPrizeItems: ; 8b15e +BuenaPrizeItems: ; there are NUM_BUENA_PRIZES items (see engine/events/buena.asm) db ULTRA_BALL, 2 db FULL_RESTORE, 2 @@ -10,4 +10,3 @@ BuenaPrizeItems: ; 8b15e db CALCIUM, 5 db HP_UP, 5 .End -; 8b170 diff --git a/data/items/catch_rate_items.asm b/data/items/catch_rate_items.asm index d7ef4cf2b76..9c39afac366 100644 --- a/data/items/catch_rate_items.asm +++ b/data/items/catch_rate_items.asm @@ -2,7 +2,7 @@ ; catch rate as an item. However, if the catch rate appears in this table, the ; item associated with the table entry is used instead. -TimeCapsule_CatchRateItems: ; 28785 +TimeCapsule_CatchRateItems: db ITEM_19, LEFTOVERS db ITEM_2D, BITTER_BERRY db ITEM_32, GOLD_BERRY @@ -16,4 +16,3 @@ TimeCapsule_CatchRateItems: ; 28785 db ITEM_FA, BERRY db -1, BERRY db 0 ; end -; 2879e diff --git a/data/items/fruit_trees.asm b/data/items/fruit_trees.asm index 67b8f51ad7e..9c4e4793d1f 100644 --- a/data/items/fruit_trees.asm +++ b/data/items/fruit_trees.asm @@ -1,4 +1,4 @@ -FruitTreeItems: ; 44097 +FruitTreeItems: ; entries correspond to FRUITTREE_* constants db BERRY ; ROUTE_29 db BERRY ; ROUTE_30_1 @@ -30,4 +30,3 @@ FruitTreeItems: ; 44097 db ICE_BERRY ; PEWTER_CITY_1 db MINT_BERRY ; PEWTER_CITY_2 db BURNT_BERRY ; FUCHSIA_CITY -; 440b5 diff --git a/data/items/heal_hp.asm b/data/items/heal_hp.asm index a8467045022..cc3da2367fe 100644 --- a/data/items/heal_hp.asm +++ b/data/items/heal_hp.asm @@ -1,4 +1,4 @@ -HealingHPAmounts: ; f3af +HealingHPAmounts: dbw FRESH_WATER, 50 dbw SODA_POP, 60 dbw LEMONADE, 80 @@ -15,4 +15,3 @@ HealingHPAmounts: ; f3af dbw RAGECANDYBAR, 20 dbw BERRY_JUICE, 20 dbw -1, 0 ; end -; f3df diff --git a/data/items/heal_status.asm b/data/items/heal_status.asm index 29bb872e1d9..b39f2f80d5f 100644 --- a/data/items/heal_status.asm +++ b/data/items/heal_status.asm @@ -1,6 +1,6 @@ ; See also data/battle/held_heal_status.asm -StatusHealingActions: ; f071 +StatusHealingActions: ; item, party menu action text, status db ANTIDOTE, PARTYMENUTEXT_HEAL_PSN, 1 << PSN db BURN_HEAL, PARTYMENUTEXT_HEAL_BRN, 1 << BRN @@ -17,4 +17,3 @@ StatusHealingActions: ; f071 db MINT_BERRY, PARTYMENUTEXT_HEAL_SLP, SLP db MIRACLEBERRY, PARTYMENUTEXT_HEAL_ALL, %11111111 db -1, 0, 0 ; end -; f09e diff --git a/data/items/mail_items.asm b/data/items/mail_items.asm index 64b4216ca00..388613d9825 100644 --- a/data/items/mail_items.asm +++ b/data/items/mail_items.asm @@ -1,4 +1,4 @@ -MailItems: ; b9e80 +MailItems: db FLOWER_MAIL db SURF_MAIL db LITEBLUEMAIL @@ -10,4 +10,3 @@ MailItems: ; b9e80 db MUSIC_MAIL db MIRAGE_MAIL db -1 -; b9e8b diff --git a/data/items/marts.asm b/data/items/marts.asm index a9fad3e69cb..e761e624a04 100644 --- a/data/items/marts.asm +++ b/data/items/marts.asm @@ -1,4 +1,4 @@ -Marts: ; 160a9 +Marts: ; entries correspond to MART_* constants dw MartCherrygrove dw MartCherrygroveDex @@ -35,19 +35,17 @@ Marts: ; 160a9 dw MartIndigoPlateau dw MartUnderground .End -; 160ed -MartCherrygrove: ; 160ed +MartCherrygrove: db 4 ; # items db POTION db ANTIDOTE db PARLYZ_HEAL db AWAKENING db -1 ; end -; 160f3 -MartCherrygroveDex: ; 160f3 +MartCherrygroveDex: db 5 ; # items db POKE_BALL db POTION @@ -55,9 +53,8 @@ MartCherrygroveDex: ; 160f3 db PARLYZ_HEAL db AWAKENING db -1 ; end -; 160fa -MartViolet: ; 160fa +MartViolet: db 10 ; # items db POKE_BALL db POTION @@ -70,9 +67,8 @@ MartViolet: ; 160fa db X_SPEED db FLOWER_MAIL db -1 ; end -; 16106 -MartAzalea: ; 16106 +MartAzalea: db 9 ; # items db CHARCOAL db POKE_BALL @@ -84,9 +80,8 @@ MartAzalea: ; 16106 db PARLYZ_HEAL db FLOWER_MAIL db -1 ; end -; 16111 -MartCianwood: ; 16111 +MartCianwood: db 5 ; # items db POTION db SUPER_POTION @@ -94,9 +89,8 @@ MartCianwood: ; 16111 db FULL_HEAL db REVIVE db -1 ; end -; 16118 -MartGoldenrod2F1: ; 16118 +MartGoldenrod2F1: db 7 ; # items db POTION db SUPER_POTION @@ -106,9 +100,8 @@ MartGoldenrod2F1: ; 16118 db BURN_HEAL db ICE_HEAL db -1 ; end -; 16121 -MartGoldenrod2F2: ; 16121 +MartGoldenrod2F2: db 8 ; # items db POKE_BALL db GREAT_BALL @@ -119,9 +112,8 @@ MartGoldenrod2F2: ; 16121 db POKE_DOLL db FLOWER_MAIL db -1 ; end -; 1612b -MartGoldenrod3F: ; 1612b +MartGoldenrod3F: db 7 ; # items db X_SPEED db X_SPECIAL @@ -131,9 +123,8 @@ MartGoldenrod3F: ; 1612b db GUARD_SPEC db X_ACCURACY db -1 ; end -; 16134 -MartGoldenrod4F: ; 16134 +MartGoldenrod4F: db 5 ; # items db PROTEIN db IRON @@ -141,35 +132,31 @@ MartGoldenrod4F: ; 16134 db CALCIUM db HP_UP db -1 ; end -; 1613b -MartGoldenrod5F1: ; 1613b +MartGoldenrod5F1: db 3 ; # items db TM_THUNDERPUNCH db TM_FIRE_PUNCH db TM_ICE_PUNCH db -1 ; end -; 16140 -MartGoldenrod5F2: ; 16140 +MartGoldenrod5F2: db 4 ; # items db TM_THUNDERPUNCH db TM_FIRE_PUNCH db TM_ICE_PUNCH db TM_HEADBUTT db -1 ; end -; 16146 -MartGoldenrod5F3: ; 16146 +MartGoldenrod5F3: db 4 ; # items db TM_THUNDERPUNCH db TM_FIRE_PUNCH db TM_ICE_PUNCH db TM_ROCK_SMASH db -1 ; end -; 1614c -MartGoldenrod5F4: ; 1614c +MartGoldenrod5F4: db 5 ; # items db TM_THUNDERPUNCH db TM_FIRE_PUNCH @@ -177,9 +164,8 @@ MartGoldenrod5F4: ; 1614c db TM_HEADBUTT db TM_ROCK_SMASH db -1 ; end -; 16153 -MartOlivine: ; 16153 +MartOlivine: db 9 ; # items db GREAT_BALL db SUPER_POTION @@ -191,9 +177,8 @@ MartOlivine: ; 16153 db SUPER_REPEL db SURF_MAIL db -1 ; end -; 1615e -MartEcruteak: ; 1615e +MartEcruteak: db 10 ; # items db POKE_BALL db GREAT_BALL @@ -206,18 +191,16 @@ MartEcruteak: ; 1615e db ICE_HEAL db REVIVE db -1 ; end -; 1616a -MartMahogany1: ; 1616a +MartMahogany1: db 4 ; # items db TINYMUSHROOM db SLOWPOKETAIL db POKE_BALL db POTION db -1 ; end -; 16170 -MartMahogany2: ; 16170 +MartMahogany2: db 9 ; # items db RAGECANDYBAR db GREAT_BALL @@ -229,9 +212,8 @@ MartMahogany2: ; 16170 db REVIVE db FLOWER_MAIL db -1 ; end -; 1617b -MartBlackthorn: ; 1617b +MartBlackthorn: db 9 ; # items db GREAT_BALL db ULTRA_BALL @@ -243,9 +225,8 @@ MartBlackthorn: ; 1617b db X_DEFEND db X_ATTACK db -1 ; end -; 16186 -MartViridian: ; 16186 +MartViridian: db 9 ; # items db ULTRA_BALL db HYPER_POTION @@ -257,9 +238,8 @@ MartViridian: ; 16186 db BURN_HEAL db FLOWER_MAIL db -1 ; end -; 16191 -MartPewter: ; 16191 +MartPewter: db 7 ; # items db GREAT_BALL db SUPER_POTION @@ -269,9 +249,8 @@ MartPewter: ; 16191 db AWAKENING db BURN_HEAL db -1 ; end -; 1619a -MartCerulean: ; 1619a +MartCerulean: db 9 ; # items db GREAT_BALL db ULTRA_BALL @@ -283,9 +262,8 @@ MartCerulean: ; 1619a db DIRE_HIT db SURF_MAIL db -1 ; end -; 161a5 -MartLavender: ; 161a5 +MartLavender: db 8 ; # items db GREAT_BALL db POTION @@ -296,9 +274,8 @@ MartLavender: ; 161a5 db AWAKENING db BURN_HEAL db -1 ; end -; 161af -MartVermilion: ; 161af +MartVermilion: db 8 ; # items db ULTRA_BALL db SUPER_POTION @@ -309,9 +286,8 @@ MartVermilion: ; 161af db BURN_HEAL db LITEBLUEMAIL db -1 ; end -; 161b9 -MartCeladon2F1: ; 161b9 +MartCeladon2F1: db 7 ; # items db POTION db SUPER_POTION @@ -321,9 +297,8 @@ MartCeladon2F1: ; 161b9 db SUPER_REPEL db MAX_REPEL db -1 ; end -; 161c2 -MartCeladon2F2: ; 161c2 +MartCeladon2F2: db 10 ; # items db POKE_BALL db GREAT_BALL @@ -336,9 +311,8 @@ MartCeladon2F2: ; 161c2 db AWAKENING db PARLYZ_HEAL db -1 ; end -; 161ce -MartCeladon3F: ; 161ce +MartCeladon3F: db 5 ; # items db TM_HIDDEN_POWER db TM_SUNNY_DAY @@ -346,17 +320,15 @@ MartCeladon3F: ; 161ce db TM_RAIN_DANCE db TM_SANDSTORM db -1 ; end -; 161d5 -MartCeladon4F: ; 161d5 +MartCeladon4F: db 3 ; # items db POKE_DOLL db LOVELY_MAIL db SURF_MAIL db -1 ; end -; 161da -MartCeladon5F1: ; 161da +MartCeladon5F1: db 5 ; # items db HP_UP db PROTEIN @@ -364,9 +336,8 @@ MartCeladon5F1: ; 161da db CARBOS db CALCIUM db -1 ; end -; 161e1 -MartCeladon5F2: ; 161e1 +MartCeladon5F2: db 7 ; # items db X_ACCURACY db GUARD_SPEC @@ -376,9 +347,8 @@ MartCeladon5F2: ; 161e1 db X_SPEED db X_SPECIAL db -1 ; end -; 161ea -MartFuchsia: ; 161ea +MartFuchsia: db 7 ; # items db GREAT_BALL db ULTRA_BALL @@ -388,9 +358,8 @@ MartFuchsia: ; 161ea db MAX_REPEL db FLOWER_MAIL db -1 ; end -; 161f3 -MartSaffron: ; 161f3 +MartSaffron: db 8 ; # items db GREAT_BALL db ULTRA_BALL @@ -401,9 +370,8 @@ MartSaffron: ; 161f3 db X_DEFEND db FLOWER_MAIL db -1 ; end -; 161fd -MartMtMoon: ; 161fd +MartMtMoon: db 6 ; # items db POKE_DOLL db FRESH_WATER @@ -412,9 +380,8 @@ MartMtMoon: ; 161fd db REPEL db PORTRAITMAIL db -1 ; end -; 16205 -MartIndigoPlateau: ; 16205 +MartIndigoPlateau: db 7 ; # items db ULTRA_BALL db MAX_REPEL @@ -424,20 +391,17 @@ MartIndigoPlateau: ; 16205 db REVIVE db FULL_HEAL db -1 ; end -; 1620e -MartUnderground: ; 1620e +MartUnderground: db 4 ; # items db ENERGYPOWDER db ENERGY_ROOT db HEAL_POWDER db REVIVAL_HERB db -1 ; end -; 16214 -DefaultMart: ; 16214 +DefaultMart: db 2 ; # items db POKE_BALL db POTION db -1 ; end -; 16218 diff --git a/data/items/mom_phone.asm b/data/items/mom_phone.asm index 5a5087c0ed2..407a9a016b4 100644 --- a/data/items/mom_phone.asm +++ b/data/items/mom_phone.asm @@ -5,15 +5,15 @@ momitem: MACRO db \3, \4 ENDM -MomItems_1: ; fd136 +MomItems_1: momitem 0, 600, MOM_ITEM, SUPER_POTION momitem 0, 90, MOM_ITEM, ANTIDOTE momitem 0, 180, MOM_ITEM, POKE_BALL momitem 0, 450, MOM_ITEM, ESCAPE_ROPE momitem 0, 500, MOM_ITEM, GREAT_BALL -.End ; fd15e +.End -MomItems_2: ; fd15e +MomItems_2: momitem 900, 600, MOM_ITEM, SUPER_POTION momitem 4000, 270, MOM_ITEM, REPEL momitem 7000, 600, MOM_ITEM, SUPER_POTION @@ -24,4 +24,4 @@ MomItems_2: ; fd15e momitem 40000, 900, MOM_ITEM, HYPER_POTION momitem 50000, 8000, MOM_DOLL, DECO_PIKACHU_DOLL momitem 100000, 22800, MOM_DOLL, DECO_BIG_SNORLAX_DOLL -.End ; fd1ae +.End diff --git a/data/items/mystery_gift_items.asm b/data/items/mystery_gift_items.asm index 7f7125ef788..242035eac32 100644 --- a/data/items/mystery_gift_items.asm +++ b/data/items/mystery_gift_items.asm @@ -1,4 +1,4 @@ -MysteryGiftItems: ; 2c725 +MysteryGiftItems: db BERRY db PRZCUREBERRY db MINT_BERRY @@ -37,4 +37,3 @@ MysteryGiftItems: ; 2c725 db BLUESKY_MAIL db MIRAGE_MAIL .End -; 2c74a diff --git a/data/items/rooftop_sale.asm b/data/items/rooftop_sale.asm index 87165fa5ac0..9606ef21e72 100644 --- a/data/items/rooftop_sale.asm +++ b/data/items/rooftop_sale.asm @@ -1,4 +1,4 @@ -RooftopSaleMart1: ; 15aee +RooftopSaleMart1: db 5 dbw POKE_BALL, 150 dbw GREAT_BALL, 500 @@ -7,7 +7,7 @@ RooftopSaleMart1: ; 15aee dbw REVIVE, 1200 db -1 -RooftopSaleMart2: ; 15aff +RooftopSaleMart2: db 5 dbw HYPER_POTION, 1000 dbw FULL_RESTORE, 2000 @@ -15,4 +15,3 @@ RooftopSaleMart2: ; 15aff dbw ULTRA_BALL, 1000 dbw PROTEIN, 7800 db -1 -; 15b10 diff --git a/data/items/x_stats.asm b/data/items/x_stats.asm index ac2d0ad2726..2555420984a 100644 --- a/data/items/x_stats.asm +++ b/data/items/x_stats.asm @@ -1,7 +1,6 @@ -XItemStats: ; f504 +XItemStats: ; item, stat db X_ATTACK, ATTACK db X_DEFEND, DEFENSE db X_SPEED, SPEED db X_SPECIAL, SP_ATTACK -; f50c diff --git a/data/maps/flypoints.asm b/data/maps/flypoints.asm index c24cd8d8916..007b59073c4 100644 --- a/data/maps/flypoints.asm +++ b/data/maps/flypoints.asm @@ -3,7 +3,7 @@ flypoint: MACRO db \2, SPAWN_\1 ENDM -Flypoints: ; 91c5e +Flypoints: ; landmark, spawn point const_def ; Johto @@ -35,4 +35,3 @@ KANTO_FLYPOINT EQU const_value flypoint CINNABAR, CINNABAR_ISLAND flypoint INDIGO, INDIGO_PLATEAU db -1 -; 91c8f diff --git a/data/maps/outdoor_sprites.asm b/data/maps/outdoor_sprites.asm index c7e30114a46..64c0cf23847 100644 --- a/data/maps/outdoor_sprites.asm +++ b/data/maps/outdoor_sprites.asm @@ -1,7 +1,7 @@ ; Valid sprite IDs for each map group. ; Maps with environment ROUTE or TOWN can only use these sprites. -OutdoorSprites: ; 144b8 +OutdoorSprites: ; entries correspond to map groups dw OlivineGroupSprites dw MahoganyGroupSprites @@ -29,10 +29,9 @@ OutdoorSprites: ; 144b8 dw NewBarkGroupSprites dw SaffronGroupSprites dw CherrygroveGroupSprites -; 144ec -PalletGroupSprites: ; 144ec +PalletGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -56,9 +55,8 @@ PalletGroupSprites: ; 144ec db SPRITE_SWIMMER_GUY db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 14503 -ViridianGroupSprites: ; 14503 +ViridianGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -82,9 +80,8 @@ ViridianGroupSprites: ; 14503 db SPRITE_SWIMMER_GUY db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 1451a -PewterGroupSprites: ; 1451a +PewterGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -108,9 +105,8 @@ PewterGroupSprites: ; 1451a db SPRITE_SWIMMER_GUY db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 14531 -CinnabarGroupSprites: ; 14531 +CinnabarGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -134,9 +130,8 @@ CinnabarGroupSprites: ; 14531 db SPRITE_SWIMMER_GUY db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 14548 -CeruleanGroupSprites: ; 14548 +CeruleanGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -160,9 +155,8 @@ CeruleanGroupSprites: ; 14548 db SPRITE_MISTY db SPRITE_POKE_BALL db SPRITE_SLOWPOKE -; 1455f -SaffronGroupSprites: ; 1455f +SaffronGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -186,9 +180,8 @@ SaffronGroupSprites: ; 1455f db SPRITE_MISTY db SPRITE_POKE_BALL db SPRITE_SLOWPOKE -; 14576 -CeladonGroupSprites: ; 14576 +CeladonGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -212,9 +205,8 @@ CeladonGroupSprites: ; 14576 db SPRITE_BLUE db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 1458d -LavenderGroupSprites: ; 1458d +LavenderGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -238,9 +230,8 @@ LavenderGroupSprites: ; 1458d db SPRITE_BIKER db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 145a4 -VermilionGroupSprites: ; 145a4 +VermilionGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -264,9 +255,8 @@ VermilionGroupSprites: ; 145a4 db SPRITE_BIKER db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 145bb -FuchsiaGroupSprites: ; 145bb +FuchsiaGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -290,9 +280,8 @@ FuchsiaGroupSprites: ; 145bb db SPRITE_BIKER db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 145d2 -IndigoGroupSprites: ; 145d2 +IndigoGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -316,9 +305,8 @@ IndigoGroupSprites: ; 145d2 db SPRITE_BIKER db SPRITE_POKE_BALL db SPRITE_BOULDER -; 145e9 -NewBarkGroupSprites: ; 145e9 +NewBarkGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -342,9 +330,8 @@ NewBarkGroupSprites: ; 145e9 db SPRITE_COOLTRAINER_F db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 14600 -CherrygroveGroupSprites: ; 14600 +CherrygroveGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -368,9 +355,8 @@ CherrygroveGroupSprites: ; 14600 db SPRITE_COOLTRAINER_F db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 14617 -SilverGroupSprites: ; 14617 +SilverGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -394,9 +380,8 @@ SilverGroupSprites: ; 14617 db SPRITE_COOLTRAINER_F db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 1462e -VioletGroupSprites: ; 1462e +VioletGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -420,9 +405,8 @@ VioletGroupSprites: ; 1462e db SPRITE_WEIRD_TREE db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 14645 -EcruteakGroupSprites: ; 14645 +EcruteakGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -446,9 +430,8 @@ EcruteakGroupSprites: ; 14645 db SPRITE_WEIRD_TREE db SPRITE_POKE_BALL db SPRITE_FRUIT_TREE -; 1465c -AzaleaGroupSprites: ; 1465c +AzaleaGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -472,9 +455,8 @@ AzaleaGroupSprites: ; 1465c db SPRITE_SILVER db SPRITE_FRUIT_TREE db SPRITE_SLOWPOKE -; 14673 -GoldenrodGroupSprites: ; 14673 +GoldenrodGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_POKE_BALL @@ -498,9 +480,8 @@ GoldenrodGroupSprites: ; 14673 db SPRITE_DAY_CARE_MON_2 db SPRITE_FRUIT_TREE db SPRITE_SLOWPOKE -; 1468a -CianwoodGroupSprites: ; 1468a +CianwoodGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -524,9 +505,8 @@ CianwoodGroupSprites: ; 1468a db SPRITE_TAUROS db SPRITE_FRUIT_TREE db SPRITE_ROCK -; 146a1 -OlivineGroupSprites: ; 146a1 +OlivineGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -550,9 +530,8 @@ OlivineGroupSprites: ; 146a1 db SPRITE_TAUROS db SPRITE_FRUIT_TREE db SPRITE_ROCK -; 146b8 -LakeOfRageGroupSprites: ; 146b8 +LakeOfRageGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -576,9 +555,8 @@ LakeOfRageGroupSprites: ; 146b8 db SPRITE_GYARADOS db SPRITE_FRUIT_TREE db SPRITE_POKE_BALL -; 146cf -MahoganyGroupSprites: ; 146cf +MahoganyGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -602,9 +580,8 @@ MahoganyGroupSprites: ; 146cf db SPRITE_FISHER db SPRITE_FRUIT_TREE db SPRITE_POKE_BALL -; 146e6 -BlackthornGroupSprites: ; 146e6 +BlackthornGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -628,9 +605,8 @@ BlackthornGroupSprites: ; 146e6 db SPRITE_FISHER db SPRITE_FRUIT_TREE db SPRITE_POKE_BALL -; 146fd -DungeonsGroupSprites: ; 146fd +DungeonsGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -654,9 +630,8 @@ DungeonsGroupSprites: ; 146fd db SPRITE_SCIENTIST db SPRITE_POKE_BALL db SPRITE_BOULDER -; 14714 -FastShipGroupSprites: ; 14714 +FastShipGroupSprites: db SPRITE_SUICUNE db SPRITE_SILVER_TROPHY db SPRITE_FAMICOM @@ -680,9 +655,8 @@ FastShipGroupSprites: ; 14714 db SPRITE_FAIRY db SPRITE_POKE_BALL db SPRITE_ROCK -; 1472b -CableClubGroupSprites: ; 1472b +CableClubGroupSprites: db SPRITE_OAK db SPRITE_FISHER db SPRITE_TEACHER @@ -694,4 +668,3 @@ CableClubGroupSprites: ; 1472b db SPRITE_FISHING_GURU db SPRITE_POKE_BALL db SPRITE_POKEDEX -; 14736 diff --git a/data/maps/roofs.asm b/data/maps/roofs.asm index 8765cfa6a63..0a27e97cab1 100644 --- a/data/maps/roofs.asm +++ b/data/maps/roofs.asm @@ -6,7 +6,7 @@ const ROOF_OLIVINE ; 3 const ROOF_GOLDENROD ; 4 -MapGroupRoofs: ; 1c021i +MapGroupRoofs: ; entries correspond to map groups ; values are indexes for Roofs (see below) db -1 ; 0 @@ -36,13 +36,11 @@ MapGroupRoofs: ; 1c021i db ROOF_NEW_BARK ; 24 (New Bark) db -1 ; 25 db ROOF_NEW_BARK ; 26 (Cherrygrove) -; 1c03c -Roofs: ; 1c03c +Roofs: ; entries correspond to ROOF_* constants INCBIN "gfx/tilesets/roofs/0.2bpp" INCBIN "gfx/tilesets/roofs/1.2bpp" INCBIN "gfx/tilesets/roofs/2.2bpp" INCBIN "gfx/tilesets/roofs/3.2bpp" INCBIN "gfx/tilesets/roofs/4.2bpp" -; 1c30c diff --git a/data/maps/scenes.asm b/data/maps/scenes.asm index 9e11f3590f0..9c820f9a61e 100644 --- a/data/maps/scenes.asm +++ b/data/maps/scenes.asm @@ -4,7 +4,7 @@ scene_var: MACRO dw \2 ENDM -MapScenes:: ; 4d01e +MapScenes:: scene_var POKECENTER_2F, wPokecenter2FSceneID scene_var TRADE_CENTER, wTradeCenterSceneID scene_var COLOSSEUM, wColosseumSceneID @@ -85,4 +85,3 @@ MapScenes:: ; 4d01e scene_var MOBILE_TRADE_ROOM, wMobileTradeRoomSceneID scene_var MOBILE_BATTLE_ROOM, wMobileBattleRoomSceneID db -1 -; 4d15b diff --git a/data/maps/setup_scripts.asm b/data/maps/setup_scripts.asm index 00b059865c7..218c81e066a 100644 --- a/data/maps/setup_scripts.asm +++ b/data/maps/setup_scripts.asm @@ -1,4 +1,4 @@ -MapSetupScripts: ; 15377 +MapSetupScripts: ; entries correspond to MAPSETUP_* constants (see constants/map_setup_constants.asm) dw MapSetupScript_Warp dw MapSetupScript_Continue @@ -12,14 +12,13 @@ MapSetupScripts: ; 15377 dw MapSetupScript_Submenu dw MapSetupScript_BadWarp dw MapSetupScript_Fly -; 1538f -MapSetupScript_Teleport: ; 1538f +MapSetupScript_Teleport: db map_prolong_sprites -MapSetupScript_Fly: ; 15390 +MapSetupScript_Fly: db map_fade_out_palettes db map_keep_roam -MapSetupScript_Warp: ; 15392 +MapSetupScript_Warp: db map_lcd_off db map_sound_off db map_load_spawn @@ -44,7 +43,7 @@ MapSetupScript_Warp: ; 15392 db map_wildmons db map_end -MapSetupScript_BadWarp: ; 153a9 +MapSetupScript_BadWarp: db map_load_spawn db map_load_attributes db map_change_callback @@ -68,7 +67,7 @@ MapSetupScript_BadWarp: ; 153a9 db map_wildmons db map_end -MapSetupScript_Connection: ; 153bf +MapSetupScript_Connection: db map_animations_off db map_load_connection db map_load_attributes @@ -87,11 +86,11 @@ MapSetupScript_Connection: ; 153bf db map_animations_on db map_end -MapSetupScript_Fall: ; 153d0 +MapSetupScript_Fall: db map_prolong_sprites -MapSetupScript_Door: ; 153d1 +MapSetupScript_Door: db map_fade_out_palettes -MapSetupScript_Train: ; 153d2 +MapSetupScript_Train: db map_load_warp db map_load_attributes db map_warp_face @@ -114,7 +113,7 @@ MapSetupScript_Train: ; 153d2 db map_update_roam db map_end -MapSetupScript_ReloadMap: ; 153e7 +MapSetupScript_ReloadMap: db map_fade db map_clear_bg_palettes db map_lcd_off @@ -132,7 +131,7 @@ MapSetupScript_ReloadMap: ; 153e7 db map_wildmons db map_end -MapSetupScript_LinkReturn: ; 153f7 +MapSetupScript_LinkReturn: db map_fade db map_lcd_off db map_sound_off @@ -151,7 +150,7 @@ MapSetupScript_LinkReturn: ; 153f7 db map_text_scroll_off db map_end -MapSetupScript_Continue: ; 15408 +MapSetupScript_Continue: db map_lcd_off db map_sound_off db map_load_attributes_2 @@ -171,7 +170,7 @@ MapSetupScript_Continue: ; 15408 db map_wildmons db map_end -MapSetupScript_Submenu: ; 1541a +MapSetupScript_Submenu: db map_load_blocks db map_connection_blocks db map_end diff --git a/data/maps/sgb_roof_pal_inds.asm b/data/maps/sgb_roof_pal_inds.asm index c56ddaf7d3b..4b117fe6711 100644 --- a/data/maps/sgb_roof_pal_inds.asm +++ b/data/maps/sgb_roof_pal_inds.asm @@ -1,6 +1,6 @@ ; Crystal does not support SGB, so this is unused. -MapGroupRoofSGBPalInds: ; 8a45 +MapGroupRoofSGBPalInds: ; entries correspond to map groups db PREDEFPAL_00 db PREDEFPAL_OLIVINE @@ -29,4 +29,3 @@ MapGroupRoofSGBPalInds: ; 8a45 db PREDEFPAL_NEW_BARK db PREDEFPAL_SAFFRON db PREDEFPAL_CHERRYGROVE -; 8a60 diff --git a/data/maps/spawn_points.asm b/data/maps/spawn_points.asm index b00a2ac1efe..52baa111c09 100644 --- a/data/maps/spawn_points.asm +++ b/data/maps/spawn_points.asm @@ -38,4 +38,3 @@ SpawnPoints: ; 0x152ab spawn SILVER_CAVE_OUTSIDE, 23, 20 spawn FAST_SHIP_CABINS_SW_SSW_NW, 6, 2 spawn N_A, -1, -1 -; 1531f diff --git a/data/mon_menu.asm b/data/mon_menu.asm index ec9a59a9429..b6130a19917 100644 --- a/data/mon_menu.asm +++ b/data/mon_menu.asm @@ -8,7 +8,7 @@ const MONMENUVALUE_MAIL ; 6 const MONMENUVALUE_ERROR ; 7 -MonMenuOptionStrings: ; 24caf +MonMenuOptionStrings: ; entries correspond to MONMENUVALUE_* constants db "STATS@" db "SWITCH@" @@ -17,9 +17,8 @@ MonMenuOptionStrings: ; 24caf db "MOVE@" db "MAIL@" db "ERROR!@" -; 24cd9 -MonMenuOptions: ; 24cd9 +MonMenuOptions: ; category, item, value; actions are in PokemonActionSubmenu (see engine/start_menu.asm) ; moves db MONMENU_FIELD_MOVE, MONMENUITEM_CUT, CUT @@ -45,4 +44,3 @@ MonMenuOptions: ; 24cd9 db MONMENU_MENUOPTION, MONMENUITEM_MAIL, MONMENUVALUE_MAIL db MONMENU_MENUOPTION, MONMENUITEM_ERROR, MONMENUVALUE_ERROR db -1 -; 24d19 diff --git a/data/moves/animations.asm b/data/moves/animations.asm index 037e5f1d224..cef14f5ab71 100644 --- a/data/moves/animations.asm +++ b/data/moves/animations.asm @@ -1,4 +1,4 @@ -BattleAnimations:: ; c906f +BattleAnimations:: ; entries correspond to constants/move_constants.asm dw BattleAnim_0 dw BattleAnim_Pound @@ -279,17 +279,15 @@ BattleAnimations:: ; c906f dw BattleAnim_Wobble dw BattleAnim_Shake dw BattleAnim_HitConfusion -; c929b -BattleAnim_0: ; c929b -BattleAnim_252: ; c929b -BattleAnim_253: ; c929b -BattleAnim_254: ; c929b -BattleAnim_MirrorMove: ; c929b +BattleAnim_0: +BattleAnim_252: +BattleAnim_253: +BattleAnim_254: +BattleAnim_MirrorMove: anim_ret -; c929c -BattleAnim_SweetScent2: ; c929c +BattleAnim_SweetScent2: anim_2gfx ANIM_GFX_FLOWER, ANIM_GFX_MISC anim_obj ANIM_OBJ_FLOWER, 64, 96, $2 anim_wait 2 @@ -301,7 +299,6 @@ BattleAnim_SweetScent2: ; c929c anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_wait 128 anim_ret -; c92c1 BattleAnim_ThrowPokeBall: anim_if_param_equal NO_ITEM, .TheTrainerBlockedTheBall @@ -320,7 +317,6 @@ BattleAnim_ThrowPokeBall: anim_obj ANIM_OBJ_BALL_POOF, 136, 64, $10 anim_wait 16 anim_jump .Shake -; c92f2 .TheTrainerBlockedTheBall: anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT @@ -330,7 +326,6 @@ BattleAnim_ThrowPokeBall: anim_obj ANIM_OBJ_01, 112, 40, $0 anim_wait 32 anim_ret -; c9305 .UltraBall: anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE @@ -344,7 +339,6 @@ BattleAnim_ThrowPokeBall: anim_obj ANIM_OBJ_BALL_POOF, 136, 64, $10 anim_wait 16 anim_jump .Shake -; c9326 .GreatBall: anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE @@ -358,7 +352,6 @@ BattleAnim_ThrowPokeBall: anim_obj ANIM_OBJ_BALL_POOF, 136, 64, $10 anim_wait 16 anim_jump .Shake -; c9347 .MasterBall: anim_3gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE, ANIM_GFX_SPEED @@ -403,12 +396,10 @@ BattleAnim_ThrowPokeBall: anim_incobj 1 anim_sound 0, 1, SFX_BALL_WOBBLE anim_jump .Loop -; c93bc .Click: anim_clearsprites anim_ret -; c93be .BreakFree: anim_setobj $1, $b @@ -418,9 +409,8 @@ BattleAnim_ThrowPokeBall: anim_bgeffect ANIM_BG_ENTER_MON, $0, $0, $0 anim_wait 32 anim_ret -; c93d1 -BattleAnim_SendOutMon: ; c93d1 +BattleAnim_SendOutMon: anim_if_param_equal $0, .Normal anim_if_param_equal $1, .Shiny anim_if_param_equal $2, .Unknown @@ -488,17 +478,15 @@ BattleAnim_SendOutMon: ; c93d1 anim_bgeffect ANIM_BG_ENTER_MON, $0, $1, $0 anim_wait 32 anim_ret -; c9483 -BattleAnim_ReturnMon: ; c9483 +BattleAnim_ReturnMon: anim_sound 0, 0, SFX_BALL_POOF -BattleAnim_BatonPass_branch_c9486: ; c9486 +BattleAnim_BatonPass_branch_c9486: anim_bgeffect ANIM_BG_RETURN_MON, $0, $1, $0 anim_wait 32 anim_ret -; c948d -BattleAnim_Confused: ; c948d +BattleAnim_Confused: anim_1gfx ANIM_GFX_STATUS anim_sound 0, 0, SFX_KINESIS anim_obj ANIM_OBJ_CHICK, 44, 56, $15 @@ -506,9 +494,8 @@ BattleAnim_Confused: ; c948d anim_obj ANIM_OBJ_CHICK, 44, 56, $bf anim_wait 96 anim_ret -; c94a3 -BattleAnim_Slp: ; c94a3 +BattleAnim_Slp: anim_1gfx ANIM_GFX_STATUS anim_sound 0, 0, SFX_TAIL_WHIP .loop @@ -517,9 +504,8 @@ BattleAnim_Slp: ; c94a3 anim_loop 3, .loop anim_wait 32 anim_ret -; c94b4 -BattleAnim_Brn: ; c94b4 +BattleAnim_Brn: anim_1gfx ANIM_GFX_FIRE .loop anim_sound 0, 0, SFX_BURN @@ -528,9 +514,8 @@ BattleAnim_Brn: ; c94b4 anim_loop 3, .loop anim_wait 6 anim_ret -; c94c5 -BattleAnim_Psn: ; c94c5 +BattleAnim_Psn: anim_1gfx ANIM_GFX_POISON anim_sound 0, 0, SFX_POISON anim_obj ANIM_OBJ_SKULL, 64, 56, $0 @@ -539,9 +524,8 @@ BattleAnim_Psn: ; c94c5 anim_obj ANIM_OBJ_SKULL, 48, 56, $0 anim_wait 8 anim_ret -; c94da -BattleAnim_Sap: ; c94da +BattleAnim_Sap: anim_1gfx ANIM_GFX_CHARGE anim_sound 6, 3, SFX_WATER_GUN anim_obj ANIM_OBJ_ABSORB, 128, 48, $2 @@ -553,9 +537,8 @@ BattleAnim_Sap: ; c94da anim_obj ANIM_OBJ_ABSORB, 136, 32, $4 anim_wait 16 anim_ret -; c94f8 -BattleAnim_Frz: ; c94f8 +BattleAnim_Frz: anim_1gfx ANIM_GFX_ICE anim_obj ANIM_OBJ_FROZEN, 44, 110, $0 anim_sound 0, 0, SFX_SHINE @@ -563,9 +546,8 @@ BattleAnim_Frz: ; c94f8 anim_sound 0, 0, SFX_SHINE anim_wait 16 anim_ret -; c9508 -BattleAnim_Par: ; c9508 +BattleAnim_Par: anim_1gfx ANIM_GFX_STATUS anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_sound 0, 0, SFX_THUNDERSHOCK @@ -573,9 +555,8 @@ BattleAnim_Par: ; c9508 anim_obj ANIM_OBJ_PARALYZED, 76, 88, $c2 anim_wait 128 anim_ret -; c951e -BattleAnim_InLove: ; c951e +BattleAnim_InLove: anim_1gfx ANIM_GFX_OBJECTS anim_sound 0, 0, SFX_LICK anim_obj ANIM_OBJ_HEART, 64, 76, $0 @@ -584,9 +565,8 @@ BattleAnim_InLove: ; c951e anim_obj ANIM_OBJ_HEART, 36, 72, $0 anim_wait 32 anim_ret -; c9533 -BattleAnim_InSandstorm: ; c9533 +BattleAnim_InSandstorm: anim_1gfx ANIM_GFX_POWDER anim_obj ANIM_OBJ_SANDSTORM, 88, 0, $0 anim_wait 8 @@ -599,17 +579,15 @@ BattleAnim_InSandstorm: ; c9533 anim_loop 6, .loop anim_wait 8 anim_ret -; c9550 -BattleAnim_InNightmare: ; c9550 +BattleAnim_InNightmare: anim_1gfx ANIM_GFX_ANGELS anim_sound 0, 0, SFX_BUBBLEBEAM anim_obj ANIM_OBJ_IN_NIGHTMARE, 68, 80, $0 anim_wait 40 anim_ret -; c955c -BattleAnim_InWhirlpool: ; c955c +BattleAnim_InWhirlpool: anim_1gfx ANIM_GFX_WIND anim_bgeffect ANIM_BG_WHIRLPOOL, $0, $0, $0 anim_sound 0, 1, SFX_SURF @@ -620,21 +598,18 @@ BattleAnim_InWhirlpool: ; c955c anim_incbgeffect ANIM_BG_WHIRLPOOL anim_wait 1 anim_ret -; c9574 -BattleAnim_HitConfusion: ; c9574 +BattleAnim_HitConfusion: anim_1gfx ANIM_GFX_HIT anim_sound 0, 0, SFX_POUND anim_obj ANIM_OBJ_04, 44, 96, $0 anim_wait 16 anim_ret -; c9580 -BattleAnim_Miss: ; c9580 +BattleAnim_Miss: anim_ret -; c9581 -BattleAnim_EnemyDamage: ; c9581 +BattleAnim_EnemyDamage: .loop anim_bgeffect ANIM_BG_HIDE_MON, $0, $0, $0 anim_wait 5 @@ -642,45 +617,39 @@ BattleAnim_EnemyDamage: ; c9581 anim_wait 5 anim_loop 3, .loop anim_ret -; c9592 -BattleAnim_EnemyStatDown: ; c9592 +BattleAnim_EnemyStatDown: anim_call BattleAnim_FollowEnemyFeet_1 anim_bgeffect ANIM_BG_VIBRATE_MON, $0, $0, $0 anim_wait 40 anim_call BattleAnim_ShowMon_1 anim_wait 1 anim_ret -; c95a0 -BattleAnim_PlayerStatDown: ; c95a0 +BattleAnim_PlayerStatDown: anim_call BattleAnim_FollowEnemyFeet_1 anim_bgeffect ANIM_BG_WOBBLE_MON, $0, $0, $0 anim_wait 40 anim_call BattleAnim_ShowMon_1 anim_wait 1 anim_ret -; c95ae -BattleAnim_PlayerDamage: ; c95ae +BattleAnim_PlayerDamage: anim_bgeffect ANIM_BG_20, $20, $2, $20 anim_wait 40 anim_ret -; c95b5 -BattleAnim_Wobble: ; c95b5 +BattleAnim_Wobble: anim_bgeffect ANIM_BG_35, $0, $0, $0 anim_wait 40 anim_ret -; c95bc -BattleAnim_Shake: ; c95bc +BattleAnim_Shake: anim_bgeffect ANIM_BG_1F, $20, $2, $40 anim_wait 40 anim_ret -; c95c3 -BattleAnim_Pound: ; c95c3 +BattleAnim_Pound: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_POUND anim_obj ANIM_OBJ_08, 136, 56, $0 @@ -688,9 +657,8 @@ BattleAnim_Pound: ; c95c3 anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 16 anim_ret -; c95d5 -BattleAnim_KarateChop: ; c95d5 +BattleAnim_KarateChop: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_KARATE_CHOP anim_obj ANIM_OBJ_08, 136, 40, $0 @@ -708,9 +676,8 @@ BattleAnim_KarateChop: ; c95d5 anim_obj ANIM_OBJ_01, 136, 48, $0 anim_wait 16 anim_ret -; c9605 -BattleAnim_Doubleslap: ; c9605 +BattleAnim_Doubleslap: anim_1gfx ANIM_GFX_HIT anim_if_param_equal $1, BattleAnim_Doubleslap_branch_c961b anim_sound 0, 1, SFX_DOUBLESLAP @@ -719,18 +686,16 @@ BattleAnim_Doubleslap: ; c9605 anim_obj ANIM_OBJ_01, 144, 48, $0 anim_wait 8 anim_ret -; c961b -BattleAnim_Doubleslap_branch_c961b: ; c961b +BattleAnim_Doubleslap_branch_c961b: anim_sound 0, 1, SFX_DOUBLESLAP anim_obj ANIM_OBJ_08, 120, 48, $0 anim_wait 6 anim_obj ANIM_OBJ_01, 120, 48, $0 anim_wait 8 anim_ret -; c962b -BattleAnim_CometPunch: ; c962b +BattleAnim_CometPunch: anim_1gfx ANIM_GFX_HIT anim_if_param_equal $1, BattleAnim_CometPunch_branch_c9641 anim_sound 0, 1, SFX_COMET_PUNCH @@ -739,19 +704,17 @@ BattleAnim_CometPunch: ; c962b anim_obj ANIM_OBJ_01, 144, 48, $0 anim_wait 8 anim_ret -; c9641 -BattleAnim_CometPunch_branch_c9641: ; c9641 +BattleAnim_CometPunch_branch_c9641: anim_sound 0, 1, SFX_COMET_PUNCH anim_obj ANIM_OBJ_06, 120, 64, $0 anim_wait 6 anim_obj ANIM_OBJ_01, 120, 64, $0 anim_wait 8 anim_ret -; c9651 -BattleAnim_Bide_branch_c9651: ; c9651 -BattleAnim_MegaPunch: ; c9651 +BattleAnim_Bide_branch_c9651: +BattleAnim_MegaPunch: anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $40, $2, $0 anim_wait 48 @@ -765,9 +728,8 @@ BattleAnim_MegaPunch: ; c9651 anim_wait 6 anim_loop 3, .loop anim_ret -; c9677 -BattleAnim_Stomp: ; c9677 +BattleAnim_Stomp: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_STOMP anim_obj ANIM_OBJ_07, 136, 40, $0 @@ -785,9 +747,8 @@ BattleAnim_Stomp: ; c9677 anim_obj ANIM_OBJ_01, 136, 48, $0 anim_wait 16 anim_ret -; c96a7 -BattleAnim_DoubleKick: ; c96a7 +BattleAnim_DoubleKick: anim_1gfx ANIM_GFX_HIT anim_if_param_equal $1, BattleAnim_DoubleKick_branch_c96bd anim_sound 0, 1, SFX_DOUBLE_KICK @@ -796,18 +757,16 @@ BattleAnim_DoubleKick: ; c96a7 anim_obj ANIM_OBJ_01, 144, 48, $0 anim_wait 8 anim_ret -; c96bd -BattleAnim_DoubleKick_branch_c96bd: ; c96bd +BattleAnim_DoubleKick_branch_c96bd: anim_sound 0, 1, SFX_DOUBLE_KICK anim_obj ANIM_OBJ_07, 120, 64, $0 anim_wait 6 anim_obj ANIM_OBJ_01, 120, 64, $0 anim_wait 8 anim_ret -; c96cd -BattleAnim_JumpKick: ; c96cd +BattleAnim_JumpKick: anim_1gfx ANIM_GFX_HIT anim_if_param_equal $1, BattleAnim_JumpKick_branch_c96f1 anim_sound 0, 1, SFX_JUMP_KICK @@ -820,17 +779,15 @@ BattleAnim_JumpKick: ; c96cd anim_obj ANIM_OBJ_04, 136, 48, $0 anim_wait 16 anim_ret -; c96f1 -BattleAnim_JumpKick_branch_c96f1: ; c96f1 +BattleAnim_JumpKick_branch_c96f1: anim_wait 8 anim_sound 0, 0, SFX_DOUBLE_KICK anim_obj ANIM_OBJ_04, 44, 88, $0 anim_wait 16 anim_ret -; c96fc -BattleAnim_HiJumpKick: ; c96fc +BattleAnim_HiJumpKick: anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $40, $2, $0 anim_if_param_equal $1, BattleAnim_HiJumpKick_branch_c971e @@ -843,17 +800,15 @@ BattleAnim_HiJumpKick: ; c96fc anim_obj ANIM_OBJ_04, 136, 48, $0 anim_wait 16 anim_ret -; c971e -BattleAnim_HiJumpKick_branch_c971e: ; c971e +BattleAnim_HiJumpKick_branch_c971e: anim_wait 16 anim_sound 0, 0, SFX_DOUBLE_KICK anim_obj ANIM_OBJ_04, 44, 88, $0 anim_wait 16 anim_ret -; c9729 -BattleAnim_RollingKick: ; c9729 +BattleAnim_RollingKick: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_DOUBLE_KICK anim_obj ANIM_OBJ_07, 112, 56, $0 @@ -862,9 +817,8 @@ BattleAnim_RollingKick: ; c9729 anim_obj ANIM_OBJ_01, 136, 48, $0 anim_wait 16 anim_ret -; c973e -BattleAnim_MegaKick: ; c973e +BattleAnim_MegaKick: anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $40, $2, $0 anim_wait 67 @@ -878,9 +832,8 @@ BattleAnim_MegaKick: ; c973e anim_wait 6 anim_loop 3, .loop anim_ret -; c9764 -BattleAnim_HyperFang: ; c9764 +BattleAnim_HyperFang: anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $20, $1, $0 anim_sound 0, 1, SFX_BITE @@ -889,9 +842,8 @@ BattleAnim_HyperFang: ; c9764 anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 16 anim_ret -; c977b -BattleAnim_SuperFang: ; c977b +BattleAnim_SuperFang: anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $40, $2, $0 anim_wait 48 @@ -905,9 +857,8 @@ BattleAnim_SuperFang: ; c977b anim_wait 6 anim_loop 3, .loop anim_ret -; c97a1 -BattleAnim_Ember: ; c97a1 +BattleAnim_Ember: anim_1gfx ANIM_GFX_FIRE anim_sound 6, 2, SFX_EMBER anim_obj ANIM_OBJ_EMBER, 64, 96, $12 @@ -927,17 +878,15 @@ BattleAnim_Ember: ; c97a1 anim_obj ANIM_OBJ_EMBER, 144, 68, $30 anim_wait 32 anim_ret -; c97d8 -BattleAnim_FirePunch: ; c97d8 +BattleAnim_FirePunch: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_FIRE anim_obj ANIM_OBJ_0A, 136, 56, $43 anim_call BattleAnim_FirePunch_branch_cbbcc anim_wait 16 anim_ret -; c97e5 -BattleAnim_FireSpin: ; c97e5 +BattleAnim_FireSpin: anim_1gfx ANIM_GFX_FIRE .loop anim_sound 6, 2, SFX_EMBER @@ -955,9 +904,8 @@ BattleAnim_FireSpin: ; c97e5 anim_loop 2, .loop anim_wait 96 anim_ret -; c9811 -BattleAnim_DragonRage: ; c9811 +BattleAnim_DragonRage: anim_1gfx ANIM_GFX_FIRE .loop anim_sound 6, 2, SFX_EMBER @@ -966,9 +914,8 @@ BattleAnim_DragonRage: ; c9811 anim_loop 16, .loop anim_wait 64 anim_ret -; c9822 -BattleAnim_Flamethrower: ; c9822 +BattleAnim_Flamethrower: anim_1gfx ANIM_GFX_FIRE anim_sound 6, 2, SFX_EMBER anim_obj ANIM_OBJ_FLAMETHROWER, 64, 92, $3 @@ -993,9 +940,8 @@ BattleAnim_Flamethrower: ; c9822 anim_loop 6, .loop anim_wait 16 anim_ret -; c9861 -BattleAnim_FireBlast: ; c9861 +BattleAnim_FireBlast: anim_1gfx ANIM_GFX_FIRE .loop1 anim_sound 6, 2, SFX_EMBER @@ -1028,17 +974,15 @@ BattleAnim_FireBlast: ; c9861 anim_loop 2, .loop3 anim_wait 32 anim_ret -; c98b0 -BattleAnim_IcePunch: ; c98b0 +BattleAnim_IcePunch: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_ICE anim_obj ANIM_OBJ_0A, 136, 56, $43 anim_call BattleAnim_IcePunch_branch_cbbdf anim_wait 32 anim_ret -; c98bd -BattleAnim_IceBeam: ; c98bd +BattleAnim_IceBeam: anim_1gfx ANIM_GFX_ICE .loop anim_sound 6, 2, SFX_SHINE @@ -1057,9 +1001,8 @@ BattleAnim_IceBeam: ; c98bd anim_sound 0, 1, SFX_SHINE anim_wait 8 anim_ret -; c98e8 -BattleAnim_Blizzard: ; c98e8 +BattleAnim_Blizzard: anim_1gfx ANIM_GFX_ICE .loop anim_sound 6, 2, SFX_SHINE @@ -1081,9 +1024,8 @@ BattleAnim_Blizzard: ; c98e8 anim_sound 0, 1, SFX_SHINE anim_wait 24 anim_ret -; c991e -BattleAnim_Bubble: ; c991e +BattleAnim_Bubble: anim_1gfx ANIM_GFX_BUBBLE anim_sound 32, 2, SFX_WATER_GUN anim_obj ANIM_OBJ_BUBBLE, 64, 92, $c1 @@ -1096,9 +1038,8 @@ BattleAnim_Bubble: ; c991e anim_wait 128 anim_wait 32 anim_ret -; c993d -BattleAnim_Bubblebeam: ; c993d +BattleAnim_Bubblebeam: anim_1gfx ANIM_GFX_BUBBLE .loop anim_sound 16, 2, SFX_BUBBLEBEAM @@ -1122,9 +1063,8 @@ BattleAnim_Bubblebeam: ; c993d anim_bgeffect ANIM_BG_32, $0, $0, $0 anim_wait 8 anim_ret -; c9979 -BattleAnim_WaterGun: ; c9979 +BattleAnim_WaterGun: anim_bgeffect ANIM_BG_30, $0, $0, $0 anim_1gfx ANIM_GFX_WATER anim_call BattleAnim_FollowPlayerHead_1 @@ -1145,9 +1085,8 @@ BattleAnim_WaterGun: ; c9979 anim_bgeffect ANIM_BG_32, $0, $0, $0 anim_wait 16 anim_ret -; c99b4 -BattleAnim_HydroPump: ; c99b4 +BattleAnim_HydroPump: anim_bgeffect ANIM_BG_30, $0, $0, $0 anim_1gfx ANIM_GFX_WATER anim_call BattleAnim_FollowPlayerHead_1 @@ -1183,9 +1122,8 @@ BattleAnim_HydroPump: ; c99b4 anim_bgeffect ANIM_BG_32, $0, $0, $0 anim_wait 16 anim_ret -; c9a2a -BattleAnim_Surf: ; c9a2a +BattleAnim_Surf: anim_1gfx ANIM_GFX_BUBBLE anim_bgeffect ANIM_BG_SURF, $0, $0, $0 anim_obj ANIM_OBJ_SURF, 88, 104, $8 @@ -1196,9 +1134,8 @@ BattleAnim_Surf: ; c9a2a anim_incobj 1 anim_wait 56 anim_ret -; c9a42 -BattleAnim_VineWhip: ; c9a42 +BattleAnim_VineWhip: anim_1gfx ANIM_GFX_WHIP anim_sound 0, 1, SFX_VINE_WHIP anim_obj ANIM_OBJ_40, 116, 52, $80 @@ -1209,9 +1146,8 @@ BattleAnim_VineWhip: ; c9a42 anim_incobj 1 anim_wait 4 anim_ret -; c9a5a -BattleAnim_LeechSeed: ; c9a5a +BattleAnim_LeechSeed: anim_1gfx ANIM_GFX_PLANT anim_sound 16, 2, SFX_VINE_WHIP anim_obj ANIM_OBJ_LEECH_SEED, 48, 80, $20 @@ -1225,9 +1161,8 @@ BattleAnim_LeechSeed: ; c9a5a anim_sound 0, 1, SFX_CHARGE anim_wait 128 anim_ret -; c9a7c -BattleAnim_RazorLeaf: ; c9a7c +BattleAnim_RazorLeaf: anim_1gfx ANIM_GFX_PLANT anim_sound 0, 0, SFX_VINE_WHIP anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $28 @@ -1273,9 +1208,8 @@ BattleAnim_RazorLeaf: ; c9a7c anim_incobj 10 anim_wait 64 anim_ret -; c9af2 -BattleAnim_Solarbeam: ; c9af2 +BattleAnim_Solarbeam: anim_if_param_equal $0, .FireSolarBeam ; charge turn anim_1gfx ANIM_GFX_CHARGE @@ -1293,7 +1227,6 @@ BattleAnim_Solarbeam: ; c9af2 anim_bgeffect ANIM_BG_FLASH_WHITE, $0, $4, $2 anim_wait 64 anim_ret -; c9b30 .FireSolarBeam anim_1gfx ANIM_GFX_BEAM @@ -1301,9 +1234,8 @@ BattleAnim_Solarbeam: ; c9af2 anim_call BattleAnim_Solarbeam_branch_cbb39 anim_wait 48 anim_ret -; c9b3c -BattleAnim_Thunderpunch: ; c9b3c +BattleAnim_Thunderpunch: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_LIGHTNING anim_obj ANIM_OBJ_0A, 136, 56, $43 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $2 @@ -1311,9 +1243,8 @@ BattleAnim_Thunderpunch: ; c9b3c anim_obj ANIM_OBJ_2F, 152, 68, $0 anim_wait 64 anim_ret -; c9b53 -BattleAnim_Thundershock: ; c9b53 +BattleAnim_Thundershock: anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION anim_obj ANIM_OBJ_34, 136, 56, $2 anim_wait 16 @@ -1321,9 +1252,8 @@ BattleAnim_Thundershock: ; c9b53 anim_obj ANIM_OBJ_33, 136, 56, $0 anim_wait 96 anim_ret -; c9b66 -BattleAnim_Thunderbolt: ; c9b66 +BattleAnim_Thunderbolt: anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION anim_obj ANIM_OBJ_LIGHTNING_BOLT, 136, 56, $2 anim_wait 16 @@ -1334,9 +1264,8 @@ BattleAnim_Thunderbolt: ; c9b66 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 anim_wait 64 anim_ret -; c9b84 -BattleAnim_ThunderWave: ; c9b84 +BattleAnim_ThunderWave: anim_1gfx ANIM_GFX_LIGHTNING anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3 anim_sound 0, 1, SFX_THUNDERSHOCK @@ -1346,9 +1275,8 @@ BattleAnim_ThunderWave: ; c9b84 anim_incobj 1 anim_wait 96 anim_ret -; c9b9a -BattleAnim_Thunder: ; c9b9a +BattleAnim_Thunder: anim_1gfx ANIM_GFX_LIGHTNING anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $20 anim_sound 0, 1, SFX_THUNDER @@ -1361,9 +1289,8 @@ BattleAnim_Thunder: ; c9b9a anim_obj ANIM_OBJ_2D, 136, 68, $0 anim_wait 48 anim_ret -; c9bbd -BattleAnim_RazorWind: ; c9bbd +BattleAnim_RazorWind: anim_if_param_equal $1, BattleAnim_RazorWind_branch_c9fb5 anim_1gfx ANIM_GFX_WHIP anim_bgeffect ANIM_BG_06, $0, $1, $0 @@ -1387,9 +1314,8 @@ BattleAnim_RazorWind: ; c9bbd anim_loop 3, .loop anim_wait 24 anim_ret -; c9c00 -BattleAnim_Sonicboom_JP: ; c9c00 +BattleAnim_Sonicboom_JP: anim_2gfx ANIM_GFX_WHIP, ANIM_GFX_HIT .loop anim_sound 3, 0, SFX_RAZOR_WIND @@ -1412,10 +1338,9 @@ BattleAnim_Sonicboom_JP: ; c9c00 anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 16 anim_ret -; c9c36 -BattleAnim_Gust: ; c9c36 -BattleAnim_Sonicboom: ; c9c36 +BattleAnim_Gust: +BattleAnim_Sonicboom: anim_2gfx ANIM_GFX_WIND, ANIM_GFX_HIT .loop anim_sound 0, 1, SFX_RAZOR_WIND @@ -1427,16 +1352,14 @@ BattleAnim_Sonicboom: ; c9c36 anim_obj ANIM_OBJ_01, 128, 32, $18 anim_wait 16 anim_ret -; c9c53 -BattleAnim_Selfdestruct: ; c9c53 +BattleAnim_Selfdestruct: anim_1gfx ANIM_GFX_EXPLOSION anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $24 anim_if_param_equal $1, .loop anim_call BattleAnim_Selfdestruct_branch_cbb8f anim_wait 16 anim_ret -; c9c63 .loop anim_call BattleAnim_Selfdestruct_branch_cbb62 @@ -1445,9 +1368,8 @@ BattleAnim_Selfdestruct: ; c9c53 anim_loop 2, .loop anim_wait 16 anim_ret -; c9c72 -BattleAnim_Explosion: ; c9c72 +BattleAnim_Explosion: anim_1gfx ANIM_GFX_EXPLOSION anim_bgeffect ANIM_BG_1F, $60, $4, $10 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $24 @@ -1455,7 +1377,6 @@ BattleAnim_Explosion: ; c9c72 anim_call BattleAnim_Explosion_branch_cbb8f anim_wait 16 anim_ret -; c9c87 .loop anim_call BattleAnim_Explosion_branch_cbb62 @@ -1464,16 +1385,14 @@ BattleAnim_Explosion: ; c9c72 anim_loop 2, .loop anim_wait 16 anim_ret -; c9c96 -BattleAnim_Acid: ; c9c96 +BattleAnim_Acid: anim_1gfx ANIM_GFX_POISON anim_call BattleAnim_Acid_branch_cbc35 anim_wait 64 anim_ret -; c9c9d -BattleAnim_RockThrow: ; c9c9d +BattleAnim_RockThrow: anim_1gfx ANIM_GFX_ROCKS anim_bgeffect ANIM_BG_1F, $60, $1, $0 anim_sound 0, 1, SFX_STRENGTH @@ -1492,9 +1411,8 @@ BattleAnim_RockThrow: ; c9c9d anim_obj ANIM_OBJ_SMALL_ROCK, 136, 68, $30 anim_wait 96 anim_ret -; c9cd2 -BattleAnim_RockSlide: ; c9cd2 +BattleAnim_RockSlide: anim_1gfx ANIM_GFX_ROCKS anim_bgeffect ANIM_BG_1F, $c0, $1, $0 .loop @@ -1516,9 +1434,8 @@ BattleAnim_RockSlide: ; c9cd2 anim_loop 4, .loop anim_wait 96 anim_ret -; c9d0c -BattleAnim_Sing: ; c9d0c +BattleAnim_Sing: anim_1gfx ANIM_GFX_NOISE anim_sound 16, 2, SFX_SING .loop @@ -1535,12 +1452,11 @@ BattleAnim_Sing: ; c9d0c anim_loop 4, .loop anim_wait 64 anim_ret -; c9d35 -BattleAnim_Poisonpowder: ; c9d35 -BattleAnim_SleepPowder: ; c9d35 -BattleAnim_Spore: ; c9d35 -BattleAnim_StunSpore: ; c9d35 +BattleAnim_Poisonpowder: +BattleAnim_SleepPowder: +BattleAnim_Spore: +BattleAnim_StunSpore: anim_1gfx ANIM_GFX_POWDER .loop anim_sound 0, 1, SFX_POWDER @@ -1561,9 +1477,8 @@ BattleAnim_StunSpore: ; c9d35 anim_loop 2, .loop anim_wait 96 anim_ret -; c9d6a -BattleAnim_HyperBeam: ; c9d6a +BattleAnim_HyperBeam: anim_1gfx ANIM_GFX_BEAM anim_bgeffect ANIM_BG_1F, $30, $4, $10 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $40 @@ -1571,9 +1486,8 @@ BattleAnim_HyperBeam: ; c9d6a anim_call BattleAnim_HyperBeam_branch_cbb39 anim_wait 48 anim_ret -; c9d80 -BattleAnim_AuroraBeam: ; c9d80 +BattleAnim_AuroraBeam: anim_1gfx ANIM_GFX_BEAM anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 @@ -1583,18 +1497,16 @@ BattleAnim_AuroraBeam: ; c9d80 anim_incobj 5 anim_wait 64 anim_ret -; c9d95 -BattleAnim_Vicegrip: ; c9d95 +BattleAnim_Vicegrip: anim_1gfx ANIM_GFX_CUT anim_sound 0, 1, SFX_VICEGRIP anim_obj ANIM_OBJ_37, 152, 40, $0 anim_obj ANIM_OBJ_39, 120, 72, $0 anim_wait 32 anim_ret -; c9da6 -BattleAnim_Scratch: ; c9da6 +BattleAnim_Scratch: anim_1gfx ANIM_GFX_CUT anim_sound 0, 1, SFX_SCRATCH anim_obj ANIM_OBJ_37, 144, 48, $0 @@ -1602,9 +1514,8 @@ BattleAnim_Scratch: ; c9da6 anim_obj ANIM_OBJ_37, 136, 40, $0 anim_wait 32 anim_ret -; c9dbc -BattleAnim_FurySwipes: ; c9dbc +BattleAnim_FurySwipes: anim_1gfx ANIM_GFX_CUT anim_if_param_equal $1, BattleAnim_FurySwipes_branch_c9dd9 anim_sound 0, 1, SFX_SCRATCH @@ -1614,9 +1525,8 @@ BattleAnim_FurySwipes: ; c9dbc anim_sound 0, 1, SFX_SCRATCH anim_wait 32 anim_ret -; c9dd9 -BattleAnim_FurySwipes_branch_c9dd9: ; c9dd9 +BattleAnim_FurySwipes_branch_c9dd9: anim_sound 0, 1, SFX_SCRATCH anim_obj ANIM_OBJ_38, 120, 48, $0 anim_obj ANIM_OBJ_38, 124, 44, $0 @@ -1624,26 +1534,23 @@ BattleAnim_FurySwipes_branch_c9dd9: ; c9dd9 anim_sound 0, 1, SFX_SCRATCH anim_wait 32 anim_ret -; c9df0 -BattleAnim_Cut: ; c9df0 +BattleAnim_Cut: anim_1gfx ANIM_GFX_CUT anim_sound 0, 1, SFX_CUT anim_obj ANIM_OBJ_3A, 152, 40, $0 anim_wait 32 anim_ret -; c9dfc -BattleAnim_Slash: ; c9dfc +BattleAnim_Slash: anim_1gfx ANIM_GFX_CUT anim_sound 0, 1, SFX_CUT anim_obj ANIM_OBJ_3A, 152, 40, $0 anim_obj ANIM_OBJ_3A, 148, 36, $0 anim_wait 32 anim_ret -; c9e0d -BattleAnim_Clamp: ; c9e0d +BattleAnim_Clamp: anim_2gfx ANIM_GFX_CUT, ANIM_GFX_HIT anim_obj ANIM_OBJ_CLAMP, 136, 56, $a0 anim_obj ANIM_OBJ_CLAMP, 136, 56, $20 @@ -1655,9 +1562,8 @@ BattleAnim_Clamp: ; c9e0d anim_obj ANIM_OBJ_01, 128, 64, $18 anim_wait 16 anim_ret -; c9e2e -BattleAnim_Bite: ; c9e2e +BattleAnim_Bite: anim_2gfx ANIM_GFX_CUT, ANIM_GFX_HIT anim_obj ANIM_OBJ_BITE, 136, 56, $98 anim_obj ANIM_OBJ_BITE, 136, 56, $18 @@ -1669,9 +1575,8 @@ BattleAnim_Bite: ; c9e2e anim_obj ANIM_OBJ_01, 128, 64, $18 anim_wait 8 anim_ret -; c9e4f -BattleAnim_Teleport: ; c9e4f +BattleAnim_Teleport: anim_1gfx ANIM_GFX_SPEED anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_TELEPORT, $0, $1, $0 @@ -1684,31 +1589,28 @@ BattleAnim_Teleport: ; c9e4f anim_call BattleAnim_Teleport_branch_cbb12 anim_wait 64 anim_ret -; c9e6f -BattleAnim_Fly: ; c9e6f +BattleAnim_Fly: anim_if_param_equal $1, BattleAnim_Fly_branch_c9e89 anim_if_param_equal $2, BattleAnim_Fly_branch_c9e82 anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_WING_ATTACK anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 32 -BattleAnim_Fly_branch_c9e82: ; c9e82 +BattleAnim_Fly_branch_c9e82: anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 32 anim_ret -; c9e89 -BattleAnim_Fly_branch_c9e89: ; c9e89 +BattleAnim_Fly_branch_c9e89: anim_1gfx ANIM_GFX_SPEED anim_bgeffect ANIM_BG_06, $0, $1, $0 anim_bgeffect ANIM_BG_HIDE_MON, $0, $1, $0 anim_call BattleAnim_Fly_branch_cbb12 anim_wait 64 anim_ret -; c9e9a -BattleAnim_DoubleTeam: ; c9e9a +BattleAnim_DoubleTeam: anim_call BattleAnim_FollowPlayerHead_0 anim_sound 0, 0, SFX_PSYBEAM anim_bgeffect ANIM_BG_DOUBLE_TEAM, $0, $1, $0 @@ -1718,9 +1620,8 @@ BattleAnim_DoubleTeam: ; c9e9a anim_incbgeffect ANIM_BG_DOUBLE_TEAM anim_call BattleAnim_ShowMon_0 anim_ret -; c9eaf -BattleAnim_Recover: ; c9eaf +BattleAnim_Recover: anim_1gfx ANIM_GFX_BUBBLE anim_call BattleAnim_FollowEnemyFeet_0 anim_sound 0, 0, SFX_FULL_HEAL @@ -1737,9 +1638,8 @@ BattleAnim_Recover: ; c9eaf anim_incbgeffect ANIM_BG_18 anim_call BattleAnim_ShowMon_0 anim_ret -; c9eeb -BattleAnim_Absorb: ; c9eeb +BattleAnim_Absorb: anim_1gfx ANIM_GFX_CHARGE anim_obj ANIM_OBJ_3D, 44, 88, $0 .loop @@ -1755,9 +1655,8 @@ BattleAnim_Absorb: ; c9eeb anim_loop 5, .loop anim_wait 32 anim_ret -; c9f13 -BattleAnim_MegaDrain: ; c9f13 +BattleAnim_MegaDrain: anim_1gfx ANIM_GFX_CHARGE anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_1C, $0, $0, $10 @@ -1776,21 +1675,18 @@ BattleAnim_MegaDrain: ; c9f13 anim_if_var_equal $7, .done anim_if_var_equal $2, .spawn anim_jump .loop -; c9f46 .spawn anim_obj ANIM_OBJ_3D, 44, 88, $0 anim_jump .loop -; c9f4e .done anim_wait 32 anim_incbgeffect ANIM_BG_1C anim_call BattleAnim_ShowMon_0 anim_ret -; c9f55 -BattleAnim_EggBomb: ; c9f55 +BattleAnim_EggBomb: anim_2gfx ANIM_GFX_EGG, ANIM_GFX_EXPLOSION anim_sound 0, 0, SFX_SWITCH_POKEMON anim_obj ANIM_OBJ_EGG, 44, 104, $1 @@ -1808,9 +1704,8 @@ BattleAnim_EggBomb: ; c9f55 anim_obj ANIM_OBJ_18, 136, 72, $0 anim_wait 24 anim_ret -; c9f85 -BattleAnim_Softboiled: ; c9f85 +BattleAnim_Softboiled: anim_2gfx ANIM_GFX_EGG, ANIM_GFX_BUBBLE anim_call BattleAnim_FollowEnemyFeet_0 anim_sound 0, 0, SFX_SWITCH_POKEMON @@ -1829,12 +1724,11 @@ BattleAnim_Softboiled: ; c9f85 anim_incbgeffect ANIM_BG_18 anim_call BattleAnim_ShowMon_0 anim_ret -; c9fb5 -BattleAnim_FocusEnergy: ; c9fb5 -BattleAnim_RazorWind_branch_c9fb5: ; c9fb5 -BattleAnim_SkullBash_branch_c9fb5: ; c9fb5 -BattleAnim_SkyAttack_branch_c9fb5: ; c9fb5 +BattleAnim_FocusEnergy: +BattleAnim_RazorWind_branch_c9fb5: +BattleAnim_SkullBash_branch_c9fb5: +BattleAnim_SkyAttack_branch_c9fb5: anim_1gfx ANIM_GFX_SPEED anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_16, $0, $1, $40 @@ -1860,9 +1754,8 @@ BattleAnim_SkyAttack_branch_c9fb5: ; c9fb5 anim_incbgeffect ANIM_BG_16 anim_call BattleAnim_ShowMon_0 anim_ret -; c9ffc -BattleAnim_Bide: ; c9ffc +BattleAnim_Bide: anim_if_param_equal $0, BattleAnim_Bide_branch_c9651 anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 @@ -1872,9 +1765,8 @@ BattleAnim_Bide: ; c9ffc anim_incbgeffect ANIM_BG_1A anim_call BattleAnim_ShowMon_0 anim_ret -; ca014 -BattleAnim_Bind: ; ca014 +BattleAnim_Bind: anim_1gfx ANIM_GFX_ROPE anim_sound 0, 1, SFX_BIND anim_obj ANIM_OBJ_48, 132, 64, $0 @@ -1889,9 +1781,8 @@ BattleAnim_Bind: ; ca014 anim_incobj 3 anim_wait 96 anim_ret -; ca036 -BattleAnim_Wrap: ; ca036 +BattleAnim_Wrap: anim_1gfx ANIM_GFX_ROPE anim_sound 0, 1, SFX_BIND anim_obj ANIM_OBJ_48, 132, 64, $0 @@ -1906,9 +1797,8 @@ BattleAnim_Wrap: ; ca036 anim_incobj 3 anim_wait 96 anim_ret -; ca058 -BattleAnim_Confusion: ; ca058 +BattleAnim_Confusion: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_1 anim_sound 0, 1, SFX_PSYCHIC @@ -1917,9 +1807,8 @@ BattleAnim_Confusion: ; ca058 anim_incbgeffect ANIM_BG_NIGHT_SHADE anim_call BattleAnim_ShowMon_1 anim_ret -; ca06c -BattleAnim_Constrict: ; ca06c +BattleAnim_Constrict: anim_1gfx ANIM_GFX_ROPE anim_sound 0, 1, SFX_BIND anim_obj ANIM_OBJ_49, 132, 64, $0 @@ -1931,18 +1820,16 @@ BattleAnim_Constrict: ; ca06c anim_obj ANIM_OBJ_48, 132, 56, $0 anim_wait 64 anim_ret -; ca08a -BattleAnim_Earthquake: ; ca08a +BattleAnim_Earthquake: anim_bgeffect ANIM_BG_1F, $60, $4, $10 .loop anim_sound 0, 1, SFX_EMBER anim_wait 24 anim_loop 4, .loop anim_ret -; ca098 -BattleAnim_Fissure: ; ca098 +BattleAnim_Fissure: anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $40 anim_bgeffect ANIM_BG_1F, $60, $4, $0 .loop @@ -1950,9 +1837,8 @@ BattleAnim_Fissure: ; ca098 anim_wait 24 anim_loop 4, .loop anim_ret -; ca0ab -BattleAnim_Growl: ; ca0ab +BattleAnim_Growl: anim_1gfx ANIM_GFX_NOISE anim_enemyfeetobj anim_bgeffect ANIM_BG_06, $0, $2, $0 @@ -1973,9 +1859,8 @@ BattleAnim_Growl: ; ca0ab anim_incobj 10 anim_wait 8 anim_ret -; ca0d7 -BattleAnim_Roar: ; ca0d7 +BattleAnim_Roar: anim_1gfx ANIM_GFX_NOISE anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_cry $1 @@ -1989,9 +1874,8 @@ BattleAnim_Roar: ; ca0d7 anim_wait 64 .done anim_ret -; ca0f4 -BattleAnim_Supersonic: ; ca0f4 +BattleAnim_Supersonic: anim_1gfx ANIM_GFX_PSYCHIC .loop anim_sound 6, 2, SFX_SUPERSONIC @@ -2000,9 +1884,8 @@ BattleAnim_Supersonic: ; ca0f4 anim_loop 10, .loop anim_wait 64 anim_ret -; ca105 -BattleAnim_Screech: ; ca105 +BattleAnim_Screech: anim_1gfx ANIM_GFX_PSYCHIC anim_bgeffect ANIM_BG_1F, $8, $1, $20 anim_sound 6, 2, SFX_SCREECH @@ -2012,9 +1895,8 @@ BattleAnim_Screech: ; ca105 anim_loop 2, .loop anim_wait 64 anim_ret -; ca11b -BattleAnim_ConfuseRay: ; ca11b +BattleAnim_ConfuseRay: anim_1gfx ANIM_GFX_SPEED anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_08, $0, $4, $0 @@ -2033,17 +1915,15 @@ BattleAnim_ConfuseRay: ; ca11b anim_loop 8, .loop anim_wait 32 anim_ret -; ca15e -BattleAnim_Leer: ; ca15e +BattleAnim_Leer: anim_1gfx ANIM_GFX_BEAM anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_call BattleAnim_Leer_branch_cbadc anim_wait 16 anim_ret -; ca16a -BattleAnim_Reflect: ; ca16a +BattleAnim_Reflect: anim_1gfx ANIM_GFX_REFLECT anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 @@ -2055,9 +1935,8 @@ BattleAnim_Reflect: ; ca16a anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 anim_wait 64 anim_ret -; ca18e -BattleAnim_LightScreen: ; ca18e +BattleAnim_LightScreen: anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_REFLECT anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_sound 0, 0, SFX_FLASH @@ -2081,9 +1960,8 @@ BattleAnim_LightScreen: ; ca18e anim_obj ANIM_OBJ_SHINY, 72, 80, $38 anim_wait 64 anim_ret -; ca1d5 -BattleAnim_Amnesia: ; ca1d5 +BattleAnim_Amnesia: anim_1gfx ANIM_GFX_STATUS anim_sound 0, 0, SFX_LICK anim_obj ANIM_OBJ_AMNESIA, 64, 80, $2 @@ -2093,9 +1971,8 @@ BattleAnim_Amnesia: ; ca1d5 anim_obj ANIM_OBJ_AMNESIA, 72, 80, $0 anim_wait 64 anim_ret -; ca1ed -BattleAnim_DizzyPunch: ; ca1ed +BattleAnim_DizzyPunch: anim_2gfx ANIM_GFX_STATUS, ANIM_GFX_HIT anim_sound 0, 1, SFX_MEGA_PUNCH anim_obj ANIM_OBJ_00, 136, 40, $0 @@ -2107,9 +1984,8 @@ BattleAnim_DizzyPunch: ; ca1ed anim_obj ANIM_OBJ_CHICK, 136, 24, $bf anim_wait 96 anim_ret -; ca212 -BattleAnim_Rest: ; ca212 +BattleAnim_Rest: anim_1gfx ANIM_GFX_STATUS anim_sound 0, 0, SFX_TAIL_WHIP .loop @@ -2118,9 +1994,8 @@ BattleAnim_Rest: ; ca212 anim_loop 3, .loop anim_wait 32 anim_ret -; ca223 -BattleAnim_AcidArmor: ; ca223 +BattleAnim_AcidArmor: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_0 anim_bgeffect ANIM_BG_ACID_ARMOR, $0, $1, $8 @@ -2129,9 +2004,8 @@ BattleAnim_AcidArmor: ; ca223 anim_incbgeffect ANIM_BG_ACID_ARMOR anim_call BattleAnim_ShowMon_0 anim_ret -; ca237 -BattleAnim_Splash: ; ca237 +BattleAnim_Splash: anim_1gfx ANIM_GFX_HIT anim_sound 0, 0, SFX_VICEGRIP anim_call BattleAnim_FollowPlayerHead_0 @@ -2140,9 +2014,8 @@ BattleAnim_Splash: ; ca237 anim_incbgeffect ANIM_BG_BOUNCE_DOWN anim_call BattleAnim_ShowMon_0 anim_ret -; ca24b -BattleAnim_Dig: ; ca24b +BattleAnim_Dig: anim_2gfx ANIM_GFX_SAND, ANIM_GFX_HIT anim_if_param_equal $0, .hit anim_if_param_equal $2, .fail @@ -2169,15 +2042,13 @@ BattleAnim_Dig: ; ca24b anim_bgeffect ANIM_BG_ENTER_MON, $0, $1, $0 anim_wait 32 anim_ret -; ca28d -BattleAnim_SandAttack: ; ca28d +BattleAnim_SandAttack: anim_1gfx ANIM_GFX_SAND anim_call BattleAnim_SandAttack_branch_cbc5b anim_ret -; ca293 -BattleAnim_StringShot: ; ca293 +BattleAnim_StringShot: anim_1gfx ANIM_GFX_WEB anim_bgeffect ANIM_BG_07, $0, $2, $0 anim_sound 6, 2, SFX_MENU @@ -2199,9 +2070,8 @@ BattleAnim_StringShot: ; ca293 anim_obj ANIM_OBJ_STRING_SHOT, 132, 56, $2 anim_wait 64 anim_ret -; ca2d1 -BattleAnim_Headbutt: ; ca2d1 +BattleAnim_Headbutt: anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $14, $2, $0 anim_wait 32 @@ -2213,9 +2083,8 @@ BattleAnim_Headbutt: ; ca2d1 anim_wait 8 anim_call BattleAnim_ShowMon_0 anim_ret -; ca2ef -BattleAnim_Tackle: ; ca2ef +BattleAnim_Tackle: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_0 anim_bgeffect ANIM_BG_TACKLE, $0, $1, $0 @@ -2225,9 +2094,8 @@ BattleAnim_Tackle: ; ca2ef anim_wait 8 anim_call BattleAnim_ShowMon_0 anim_ret -; ca307 -BattleAnim_BodySlam: ; ca307 +BattleAnim_BodySlam: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_0 anim_bgeffect ANIM_BG_BOUNCE_DOWN, $0, $1, $0 @@ -2244,9 +2112,8 @@ BattleAnim_BodySlam: ; ca307 anim_wait 3 anim_call BattleAnim_ShowMon_0 anim_ret -; ca331 -BattleAnim_TakeDown: ; ca331 +BattleAnim_TakeDown: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_TACKLE, $0, $1, $0 @@ -2261,9 +2128,8 @@ BattleAnim_TakeDown: ; ca331 anim_wait 3 anim_call BattleAnim_ShowMon_0 anim_ret -; ca35c -BattleAnim_DoubleEdge: ; ca35c +BattleAnim_DoubleEdge: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $10 @@ -2277,9 +2143,8 @@ BattleAnim_DoubleEdge: ; ca35c anim_wait 3 anim_call BattleAnim_ShowMon_0 anim_ret -; ca382 -BattleAnim_Submission: ; ca382 +BattleAnim_Submission: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_1 anim_bgeffect ANIM_BG_26, $0, $0, $0 @@ -2294,9 +2159,8 @@ BattleAnim_Submission: ; ca382 anim_incbgeffect ANIM_BG_26 anim_call BattleAnim_ShowMon_1 anim_ret -; ca3a8 -BattleAnim_Whirlwind: ; ca3a8 +BattleAnim_Whirlwind: anim_1gfx ANIM_GFX_WIND .loop anim_sound 0, 0, SFX_RAZOR_WIND @@ -2319,9 +2183,8 @@ BattleAnim_Whirlwind: ; ca3a8 anim_wait 64 .done anim_ret -; ca3d8 -BattleAnim_Hypnosis: ; ca3d8 +BattleAnim_Hypnosis: anim_1gfx ANIM_GFX_PSYCHIC .loop anim_sound 6, 2, SFX_SUPERSONIC @@ -2331,9 +2194,8 @@ BattleAnim_Hypnosis: ; ca3d8 anim_loop 3, .loop anim_wait 56 anim_ret -; ca3ee -BattleAnim_Haze: ; ca3ee +BattleAnim_Haze: anim_1gfx ANIM_GFX_HAZE anim_sound 0, 1, SFX_SURF .loop @@ -2343,9 +2205,8 @@ BattleAnim_Haze: ; ca3ee anim_loop 5, .loop anim_wait 96 anim_ret -; ca404 -BattleAnim_Mist: ; ca404 +BattleAnim_Mist: anim_obp0 $54 anim_1gfx ANIM_GFX_HAZE anim_sound 0, 0, SFX_SURF @@ -2355,9 +2216,8 @@ BattleAnim_Mist: ; ca404 anim_loop 10, .loop anim_wait 96 anim_ret -; ca417 -BattleAnim_Smog: ; ca417 +BattleAnim_Smog: anim_1gfx ANIM_GFX_HAZE anim_sound 0, 1, SFX_BUBBLEBEAM .loop @@ -2366,9 +2226,8 @@ BattleAnim_Smog: ; ca417 anim_loop 10, .loop anim_wait 96 anim_ret -; ca428 -BattleAnim_PoisonGas: ; ca428 +BattleAnim_PoisonGas: anim_1gfx ANIM_GFX_HAZE anim_sound 16, 2, SFX_BUBBLEBEAM .loop @@ -2377,9 +2236,8 @@ BattleAnim_PoisonGas: ; ca428 anim_loop 10, .loop anim_wait 128 anim_ret -; ca439 -BattleAnim_HornAttack: ; ca439 +BattleAnim_HornAttack: anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_obj ANIM_OBJ_HORN, 72, 80, $1 anim_wait 16 @@ -2387,9 +2245,8 @@ BattleAnim_HornAttack: ; ca439 anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 16 anim_ret -; ca44c -BattleAnim_FuryAttack: ; ca44c +BattleAnim_FuryAttack: anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_obj ANIM_OBJ_HORN, 72, 72, $2 anim_wait 8 @@ -2407,9 +2264,8 @@ BattleAnim_FuryAttack: ; ca44c anim_obj ANIM_OBJ_04, 132, 48, $0 anim_wait 8 anim_ret -; ca47d -BattleAnim_HornDrill: ; ca47d +BattleAnim_HornDrill: anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $40 anim_obj ANIM_OBJ_HORN, 72, 80, $3 @@ -2429,9 +2285,8 @@ BattleAnim_HornDrill: ; ca47d anim_wait 8 anim_loop 3, .loop anim_ret -; ca4b4 -BattleAnim_PoisonSting: ; ca4b4 +BattleAnim_PoisonSting: anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_obj ANIM_OBJ_60, 64, 92, $14 anim_wait 16 @@ -2439,9 +2294,8 @@ BattleAnim_PoisonSting: ; ca4b4 anim_obj ANIM_OBJ_05, 136, 56, $0 anim_wait 16 anim_ret -; ca4c7 -BattleAnim_Twineedle: ; ca4c7 +BattleAnim_Twineedle: anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_sound 0, 1, SFX_POISON_STING anim_obj ANIM_OBJ_60, 64, 92, $14 @@ -2452,9 +2306,8 @@ BattleAnim_Twineedle: ; ca4c7 anim_obj ANIM_OBJ_05, 128, 48, $0 anim_wait 16 anim_ret -; ca4e7 -BattleAnim_PinMissile: ; ca4e7 +BattleAnim_PinMissile: anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT .loop anim_obj ANIM_OBJ_60, 64, 92, $28 @@ -2472,9 +2325,8 @@ BattleAnim_PinMissile: ; ca4e7 anim_loop 3, .loop anim_wait 16 anim_ret -; ca51a -BattleAnim_SpikeCannon: ; ca51a +BattleAnim_SpikeCannon: anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT .loop anim_obj ANIM_OBJ_60, 64, 92, $18 @@ -2492,9 +2344,8 @@ BattleAnim_SpikeCannon: ; ca51a anim_loop 3, .loop anim_wait 16 anim_ret -; ca54d -BattleAnim_Transform: ; ca54d +BattleAnim_Transform: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_0 anim_transform @@ -2506,9 +2357,8 @@ BattleAnim_Transform: ; ca54d anim_wait 48 anim_call BattleAnim_ShowMon_0 anim_ret -; ca564 -BattleAnim_PetalDance: ; ca564 +BattleAnim_PetalDance: anim_sound 0, 0, SFX_MENU anim_2gfx ANIM_GFX_FLOWER, ANIM_GFX_HIT .loop @@ -2521,9 +2371,8 @@ BattleAnim_PetalDance: ; ca564 anim_obj ANIM_OBJ_00, 136, 56, $0 anim_wait 16 anim_ret -; ca580 -BattleAnim_Barrage: ; ca580 +BattleAnim_Barrage: anim_2gfx ANIM_GFX_EGG, ANIM_GFX_EXPLOSION anim_sound 6, 2, SFX_THROW_BALL anim_obj ANIM_OBJ_SLUDGE_BOMB, 64, 92, $10 @@ -2532,9 +2381,8 @@ BattleAnim_Barrage: ; ca580 anim_obj ANIM_OBJ_18, 136, 56, $0 anim_wait 16 anim_ret -; ca596 -BattleAnim_PayDay: ; ca596 +BattleAnim_PayDay: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_STATUS anim_sound 0, 1, SFX_POUND anim_obj ANIM_OBJ_01, 128, 56, $0 @@ -2543,9 +2391,8 @@ BattleAnim_PayDay: ; ca596 anim_obj ANIM_OBJ_PAY_DAY, 120, 76, $1 anim_wait 64 anim_ret -; ca5ac -BattleAnim_Mimic: ; ca5ac +BattleAnim_Mimic: anim_1gfx ANIM_GFX_SPEED anim_obp0 $fc anim_sound 63, 3, SFX_LICK @@ -2560,9 +2407,8 @@ BattleAnim_Mimic: ; ca5ac anim_wait 128 anim_wait 48 anim_ret -; ca5de -BattleAnim_LovelyKiss: ; ca5de +BattleAnim_LovelyKiss: anim_2gfx ANIM_GFX_OBJECTS, ANIM_GFX_ANGELS anim_bgeffect ANIM_BG_07, $0, $2, $0 anim_obj ANIM_OBJ_LOVELY_KISS, 152, 40, $0 @@ -2571,9 +2417,8 @@ BattleAnim_LovelyKiss: ; ca5de anim_obj ANIM_OBJ_HEART, 128, 40, $0 anim_wait 40 anim_ret -; ca5f6 -BattleAnim_Bonemerang: ; ca5f6 +BattleAnim_Bonemerang: anim_2gfx ANIM_GFX_MISC, ANIM_GFX_HIT anim_sound 6, 2, SFX_HYDRO_PUMP anim_obj ANIM_OBJ_BONEMERANG, 88, 56, $1c @@ -2582,9 +2427,8 @@ BattleAnim_Bonemerang: ; ca5f6 anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 24 anim_ret -; ca60c -BattleAnim_Swift: ; ca60c +BattleAnim_Swift: anim_1gfx ANIM_GFX_OBJECTS anim_sound 6, 2, SFX_METRONOME anim_obj ANIM_OBJ_SWIFT, 64, 88, $4 @@ -2594,9 +2438,8 @@ BattleAnim_Swift: ; ca60c anim_obj ANIM_OBJ_SWIFT, 64, 76, $4 anim_wait 64 anim_ret -; ca624 -BattleAnim_Crabhammer: ; ca624 +BattleAnim_Crabhammer: anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $40, $2, $0 anim_wait 48 @@ -2607,9 +2450,8 @@ BattleAnim_Crabhammer: ; ca624 anim_wait 12 anim_loop 3, .loop anim_ret -; ca63f -BattleAnim_SkullBash: ; ca63f +BattleAnim_SkullBash: anim_if_param_equal $1, BattleAnim_SkullBash_branch_c9fb5 anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $14, $2, $0 @@ -2625,9 +2467,8 @@ BattleAnim_SkullBash: ; ca63f anim_loop 3, .loop anim_call BattleAnim_ShowMon_0 anim_ret -; ca66a -BattleAnim_Kinesis: ; ca66a +BattleAnim_Kinesis: anim_2gfx ANIM_GFX_MISC, ANIM_GFX_NOISE anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_obj ANIM_OBJ_KINESIS, 80, 76, $0 @@ -2641,9 +2482,8 @@ BattleAnim_Kinesis: ; ca66a anim_sound 0, 0, SFX_KINESIS_2 anim_wait 32 anim_ret -; ca68b -BattleAnim_Peck: ; ca68b +BattleAnim_Peck: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_PECK anim_obj ANIM_OBJ_02, 128, 48, $0 @@ -2652,9 +2492,8 @@ BattleAnim_Peck: ; ca68b anim_obj ANIM_OBJ_02, 136, 56, $0 anim_wait 16 anim_ret -; ca6a0 -BattleAnim_DrillPeck: ; ca6a0 +BattleAnim_DrillPeck: anim_1gfx ANIM_GFX_HIT .loop anim_sound 0, 1, SFX_PECK @@ -2672,9 +2511,8 @@ BattleAnim_DrillPeck: ; ca6a0 anim_loop 5, .loop anim_wait 16 anim_ret -; ca6cc -BattleAnim_Guillotine: ; ca6cc +BattleAnim_Guillotine: anim_1gfx ANIM_GFX_CUT anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $10 anim_bgeffect ANIM_BG_1F, $40, $2, $0 @@ -2688,9 +2526,8 @@ BattleAnim_Guillotine: ; ca6cc anim_obj ANIM_OBJ_39, 120, 72, $0 anim_wait 32 anim_ret -; ca700 -BattleAnim_Flash: ; ca700 +BattleAnim_Flash: anim_1gfx ANIM_GFX_SPEED anim_sound 0, 1, SFX_FLASH anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $20 @@ -2712,9 +2549,8 @@ BattleAnim_Flash: ; ca700 anim_obj ANIM_OBJ_FLASH, 136, 56, $38 anim_wait 32 anim_ret -; ca73c -BattleAnim_Substitute: ; ca73c +BattleAnim_Substitute: anim_sound 0, 0, SFX_SURF anim_if_param_equal $3, BattleAnim_Substitute_branch_ca77c anim_if_param_equal $2, BattleAnim_Substitute_branch_ca76e @@ -2727,36 +2563,32 @@ BattleAnim_Substitute: ; ca73c anim_bgeffect ANIM_BG_ENTER_MON, $0, $1, $0 anim_wait 32 anim_ret -; ca760 -BattleAnim_Substitute_branch_ca760: ; ca760 +BattleAnim_Substitute_branch_ca760: anim_bgeffect ANIM_BG_27, $0, $1, $0 anim_wait 48 anim_dropsub anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 32 anim_ret -; ca76e -BattleAnim_Substitute_branch_ca76e: ; ca76e +BattleAnim_Substitute_branch_ca76e: anim_bgeffect ANIM_BG_27, $0, $1, $0 anim_wait 48 anim_raisesub anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 32 anim_ret -; ca77c -BattleAnim_Substitute_branch_ca77c: ; ca77c +BattleAnim_Substitute_branch_ca77c: anim_bgeffect ANIM_BG_HIDE_MON, $0, $1, $0 anim_wait 48 anim_dropsub anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 32 anim_ret -; ca78a -BattleAnim_Minimize: ; ca78a +BattleAnim_Minimize: anim_sound 0, 0, SFX_SURF anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_0 @@ -2768,9 +2600,8 @@ BattleAnim_Minimize: ; ca78a anim_wait 48 anim_call BattleAnim_ShowMon_0 anim_ret -; ca7a1 -BattleAnim_SkyAttack: ; ca7a1 +BattleAnim_SkyAttack: anim_if_param_equal $1, BattleAnim_SkyAttack_branch_c9fb5 anim_1gfx ANIM_GFX_SKY_ATTACK anim_bgeffect ANIM_BG_27, $0, $1, $0 @@ -2788,9 +2619,8 @@ BattleAnim_SkyAttack: ; ca7a1 anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 16 anim_ret -; ca7cc -BattleAnim_NightShade: ; ca7cc +BattleAnim_NightShade: anim_1gfx ANIM_GFX_HIT anim_bgp $1b anim_obp1 $1b @@ -2802,17 +2632,15 @@ BattleAnim_NightShade: ; ca7cc anim_incbgeffect ANIM_BG_NIGHT_SHADE anim_call BattleAnim_ShowMon_1 anim_ret -; ca7e5 -BattleAnim_Lick: ; ca7e5 +BattleAnim_Lick: anim_1gfx ANIM_GFX_WATER anim_sound 0, 1, SFX_LICK anim_obj ANIM_OBJ_LICK, 136, 56, $0 anim_wait 64 anim_ret -; ca7f1 -BattleAnim_TriAttack: ; ca7f1 +BattleAnim_TriAttack: anim_3gfx ANIM_GFX_FIRE, ANIM_GFX_ICE, ANIM_GFX_LIGHTNING anim_call BattleAnim_TriAttack_branch_cbbcc anim_wait 16 @@ -2823,9 +2651,8 @@ BattleAnim_TriAttack: ; ca7f1 anim_obj ANIM_OBJ_2F, 152, 68, $0 anim_wait 16 anim_ret -; ca80c -BattleAnim_Withdraw: ; ca80c +BattleAnim_Withdraw: anim_1gfx ANIM_GFX_REFLECT anim_call BattleAnim_FollowPlayerHead_0 anim_bgeffect ANIM_BG_WITHDRAW, $0, $1, $50 @@ -2838,9 +2665,8 @@ BattleAnim_Withdraw: ; ca80c anim_incbgeffect ANIM_BG_WITHDRAW anim_call BattleAnim_ShowMon_0 anim_ret -; ca829 -BattleAnim_Psybeam: ; ca829 +BattleAnim_Psybeam: anim_1gfx ANIM_GFX_PSYCHIC anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_08, $0, $4, $0 @@ -2851,9 +2677,8 @@ BattleAnim_Psybeam: ; ca829 anim_loop 10, .loop anim_wait 48 anim_ret -; ca844 -BattleAnim_DreamEater: ; ca844 +BattleAnim_DreamEater: anim_1gfx ANIM_GFX_BUBBLE anim_bgp $1b anim_obp0 $27 @@ -2862,27 +2687,24 @@ BattleAnim_DreamEater: ; ca844 anim_wait 128 anim_wait 48 anim_ret -; ca853 -BattleAnim_LeechLife: ; ca853 +BattleAnim_LeechLife: anim_1gfx ANIM_GFX_BUBBLE anim_sound 6, 3, SFX_WATER_GUN anim_call BattleAnim_LeechLife_branch_cbab3 anim_wait 128 anim_wait 48 anim_ret -; ca85e -BattleAnim_Harden: ; ca85e +BattleAnim_Harden: anim_1gfx ANIM_GFX_REFLECT anim_obp0 $0 anim_call BattleAnim_FollowEnemyFeet_0 anim_call BattleAnim_Harden_branch_cbc43 anim_call BattleAnim_ShowMon_0 anim_ret -; ca86c -BattleAnim_Psywave: ; ca86c +BattleAnim_Psywave: anim_1gfx ANIM_GFX_PSYCHIC anim_bgeffect ANIM_BG_PSYCHIC, $0, $0, $0 .loop @@ -2900,18 +2722,16 @@ BattleAnim_Psywave: ; ca86c anim_incbgeffect ANIM_BG_PSYCHIC anim_wait 4 anim_ret -; ca897 -BattleAnim_Glare: ; ca897 +BattleAnim_Glare: anim_1gfx ANIM_GFX_BEAM anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $20 anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_call BattleAnim_Glare_branch_cbadc anim_wait 16 anim_ret -; ca8a8 -BattleAnim_Thrash: ; ca8a8 +BattleAnim_Thrash: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_POUND anim_obj ANIM_OBJ_08, 120, 72, $0 @@ -2926,9 +2746,8 @@ BattleAnim_Thrash: ; ca8a8 anim_obj ANIM_OBJ_00, 152, 40, $0 anim_wait 16 anim_ret -; ca8d5 -BattleAnim_Growth: ; ca8d5 +BattleAnim_Growth: anim_bgeffect ANIM_BG_WHITE_HUES, $0, $8, $0 anim_1gfx ANIM_GFX_CHARGE anim_sound 0, 0, SFX_SWORDS_DANCE @@ -2942,9 +2761,8 @@ BattleAnim_Growth: ; ca8d5 anim_obj ANIM_OBJ_GROWTH, 48, 108, $38 anim_wait 64 anim_ret -; ca909 -BattleAnim_Conversion2: ; ca909 +BattleAnim_Conversion2: anim_1gfx ANIM_GFX_EXPLOSION anim_sound 63, 3, SFX_SHARPEN anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $0 @@ -2958,9 +2776,8 @@ BattleAnim_Conversion2: ; ca909 anim_wait 128 anim_wait 48 anim_ret -; ca939 -BattleAnim_Smokescreen: ; ca939 +BattleAnim_Smokescreen: anim_3gfx ANIM_GFX_HAZE, ANIM_GFX_EGG, ANIM_GFX_SMOKE anim_sound 6, 2, SFX_THROW_BALL anim_obj ANIM_OBJ_SMOKESCREEN, 64, 92, $6c @@ -2976,9 +2793,8 @@ BattleAnim_Smokescreen: ; ca939 anim_loop 5, .loop anim_wait 128 anim_ret -; ca960 -BattleAnim_Strength: ; ca960 +BattleAnim_Strength: anim_2gfx ANIM_GFX_ROCKS, ANIM_GFX_HIT anim_bgeffect ANIM_BG_20, $10, $1, $20 anim_sound 0, 0, SFX_STRENGTH @@ -2990,9 +2806,8 @@ BattleAnim_Strength: ; ca960 anim_obj ANIM_OBJ_00, 132, 40, $0 anim_wait 16 anim_ret -; ca97e -BattleAnim_SwordsDance: ; ca97e +BattleAnim_SwordsDance: anim_1gfx ANIM_GFX_WHIP anim_sound 0, 0, SFX_SWORDS_DANCE anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $0 @@ -3002,9 +2817,8 @@ BattleAnim_SwordsDance: ; ca97e anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $34 anim_wait 56 anim_ret -; ca99e -BattleAnim_QuickAttack: ; ca99e +BattleAnim_QuickAttack: anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_HIT anim_sound 0, 0, SFX_MENU anim_bgeffect ANIM_BG_HIDE_MON, $0, $1, $0 @@ -3021,9 +2835,8 @@ BattleAnim_QuickAttack: ; ca99e anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 16 anim_ret -; ca9d8 -BattleAnim_Meditate: ; ca9d8 +BattleAnim_Meditate: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 anim_sound 0, 0, SFX_PSYBEAM @@ -3033,9 +2846,8 @@ BattleAnim_Meditate: ; ca9d8 anim_wait 48 anim_call BattleAnim_ShowMon_0 anim_ret -; ca9ed -BattleAnim_Sharpen: ; ca9ed +BattleAnim_Sharpen: anim_1gfx ANIM_GFX_SHAPES anim_obp0 $e4 anim_call BattleAnim_FollowEnemyFeet_0 @@ -3047,9 +2859,8 @@ BattleAnim_Sharpen: ; ca9ed anim_incbgeffect ANIM_BG_18 anim_call BattleAnim_ShowMon_0 anim_ret -; caa0a -BattleAnim_DefenseCurl: ; caa0a +BattleAnim_DefenseCurl: anim_1gfx ANIM_GFX_SHAPES anim_obp0 $e4 anim_call BattleAnim_FollowEnemyFeet_0 @@ -3061,9 +2872,8 @@ BattleAnim_DefenseCurl: ; caa0a anim_incbgeffect ANIM_BG_18 anim_call BattleAnim_ShowMon_0 anim_ret -; caa27 -BattleAnim_SeismicToss: ; caa27 +BattleAnim_SeismicToss: anim_2gfx ANIM_GFX_GLOBE, ANIM_GFX_HIT anim_bgeffect ANIM_BG_20, $10, $1, $20 anim_sound 0, 0, SFX_STRENGTH @@ -3075,9 +2885,8 @@ BattleAnim_SeismicToss: ; caa27 anim_obj ANIM_OBJ_00, 132, 40, $0 anim_wait 16 anim_ret -; caa45 -BattleAnim_Rage: ; caa45 +BattleAnim_Rage: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_1A, $0, $1, $20 @@ -3095,9 +2904,8 @@ BattleAnim_Rage: ; caa45 anim_obj ANIM_OBJ_00, 152, 40, $0 anim_wait 16 anim_ret -; caa74 -BattleAnim_Agility: ; caa74 +BattleAnim_Agility: anim_1gfx ANIM_GFX_WIND anim_obp0 $fc anim_call BattleAnim_FollowEnemyFeet_0 @@ -3117,9 +2925,8 @@ BattleAnim_Agility: ; caa74 anim_incbgeffect ANIM_BG_18 anim_call BattleAnim_ShowMon_0 anim_ret -; caab2 -BattleAnim_BoneClub: ; caab2 +BattleAnim_BoneClub: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_MISC anim_obj ANIM_OBJ_BONE_CLUB, 64, 88, $2 anim_wait 32 @@ -3127,9 +2934,8 @@ BattleAnim_BoneClub: ; caab2 anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 16 anim_ret -; caac5 -BattleAnim_Barrier: ; caac5 +BattleAnim_Barrier: anim_1gfx ANIM_GFX_REFLECT anim_enemyfeetobj anim_bgeffect ANIM_BG_06, $0, $2, $0 @@ -3141,9 +2947,8 @@ BattleAnim_Barrier: ; caac5 anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 anim_wait 32 anim_ret -; caae1 -BattleAnim_Waterfall: ; caae1 +BattleAnim_Waterfall: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_0 anim_bgeffect ANIM_BG_25, $0, $1, $0 @@ -3165,9 +2970,8 @@ BattleAnim_Waterfall: ; caae1 anim_obj ANIM_OBJ_01, 136, 24, $0 anim_wait 8 anim_ret -; cab1d -BattleAnim_PsychicM: ; cab1d +BattleAnim_PsychicM: anim_1gfx ANIM_GFX_PSYCHIC anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 anim_bgeffect ANIM_BG_PSYCHIC, $0, $0, $0 @@ -3180,16 +2984,14 @@ BattleAnim_PsychicM: ; cab1d anim_incbgeffect ANIM_BG_PSYCHIC anim_wait 4 anim_ret -; cab3b -BattleAnim_Sludge: ; cab3b +BattleAnim_Sludge: anim_1gfx ANIM_GFX_POISON anim_call BattleAnim_Sludge_branch_cbc15 anim_wait 56 anim_ret -; cab42 -BattleAnim_Toxic: ; cab42 +BattleAnim_Toxic: anim_1gfx ANIM_GFX_POISON anim_bgeffect ANIM_BG_BLACK_HUES, $0, $8, $0 anim_call BattleAnim_Toxic_branch_cbc35 @@ -3197,9 +2999,8 @@ BattleAnim_Toxic: ; cab42 anim_call BattleAnim_Toxic_branch_cbc15 anim_wait 64 anim_ret -; cab52 -BattleAnim_Metronome: ; cab52 +BattleAnim_Metronome: anim_2gfx ANIM_GFX_MISC, ANIM_GFX_SPEED anim_sound 0, 0, SFX_METRONOME anim_obj ANIM_OBJ_7A, 72, 88, $0 @@ -3209,9 +3010,8 @@ BattleAnim_Metronome: ; cab52 anim_loop 5, .loop anim_wait 48 anim_ret -; cab69 -BattleAnim_Counter: ; cab69 +BattleAnim_Counter: anim_1gfx ANIM_GFX_HIT .loop anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $2 @@ -3232,9 +3032,8 @@ BattleAnim_Counter: ; cab69 anim_loop 3, .loop anim_wait 16 anim_ret -; cabaa -BattleAnim_LowKick: ; cabaa +BattleAnim_LowKick: anim_1gfx ANIM_GFX_HIT anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 anim_sound 0, 1, SFX_DOUBLE_KICK @@ -3252,9 +3051,8 @@ BattleAnim_LowKick: ; cabaa anim_obj ANIM_OBJ_00, 140, 64, $0 anim_wait 16 anim_ret -; cabe6 -BattleAnim_WingAttack: ; cabe6 +BattleAnim_WingAttack: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_WING_ATTACK anim_obj ANIM_OBJ_01, 148, 56, $0 @@ -3269,18 +3067,16 @@ BattleAnim_WingAttack: ; cabe6 anim_obj ANIM_OBJ_01, 124, 56, $0 anim_wait 16 anim_ret -; cac13 -BattleAnim_Slam: ; cac13 +BattleAnim_Slam: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_WING_ATTACK anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $2 anim_obj ANIM_OBJ_01, 124, 40, $0 anim_wait 16 anim_ret -; cac24 -BattleAnim_Disable: ; cac24 +BattleAnim_Disable: anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_STATUS anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_obj ANIM_OBJ_DISABLE, 132, 56, $0 @@ -3290,9 +3086,8 @@ BattleAnim_Disable: ; cac24 anim_obj ANIM_OBJ_PARALYZED, 160, 56, $c2 anim_wait 96 anim_ret -; cac41 -BattleAnim_TailWhip: ; cac41 +BattleAnim_TailWhip: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_0 anim_sound 0, 0, SFX_TAIL_WHIP @@ -3301,17 +3096,15 @@ BattleAnim_TailWhip: ; cac41 anim_incbgeffect ANIM_BG_26 anim_call BattleAnim_ShowMon_0 anim_ret -; cac55 -BattleAnim_Struggle: ; cac55 +BattleAnim_Struggle: anim_1gfx ANIM_GFX_HIT anim_sound 0, 1, SFX_POUND anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 16 anim_ret -; cac61 -BattleAnim_Sketch: ; cac61 +BattleAnim_Sketch: anim_1gfx ANIM_GFX_OBJECTS anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_1A, $0, $1, $20 @@ -3322,9 +3115,8 @@ BattleAnim_Sketch: ; cac61 anim_call BattleAnim_ShowMon_0 anim_wait 1 anim_ret -; cac7b -BattleAnim_TripleKick: ; cac7b +BattleAnim_TripleKick: anim_1gfx ANIM_GFX_HIT anim_if_param_equal $1, BattleAnim_TripleKick_branch_cac95 anim_if_param_equal $2, BattleAnim_TripleKick_branch_caca5 @@ -3334,27 +3126,24 @@ BattleAnim_TripleKick: ; cac7b anim_obj ANIM_OBJ_01, 144, 48, $0 anim_wait 8 anim_ret -; cac95 -BattleAnim_TripleKick_branch_cac95: ; cac95 +BattleAnim_TripleKick_branch_cac95: anim_sound 0, 1, SFX_DOUBLE_KICK anim_obj ANIM_OBJ_07, 120, 64, $0 anim_wait 6 anim_obj ANIM_OBJ_01, 120, 64, $0 anim_wait 8 anim_ret -; caca5 -BattleAnim_TripleKick_branch_caca5: ; caca5 +BattleAnim_TripleKick_branch_caca5: anim_sound 0, 1, SFX_DOUBLE_KICK anim_obj ANIM_OBJ_07, 132, 32, $0 anim_wait 6 anim_obj ANIM_OBJ_01, 132, 32, $0 anim_wait 8 anim_ret -; cacb5 -BattleAnim_Thief: ; cacb5 +BattleAnim_Thief: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_TACKLE, $0, $1, $0 @@ -3369,9 +3158,8 @@ BattleAnim_Thief: ; cacb5 anim_obj ANIM_OBJ_THIEF, 120, 76, $1 anim_wait 64 anim_ret -; cacd9 -BattleAnim_SpiderWeb: ; cacd9 +BattleAnim_SpiderWeb: anim_1gfx ANIM_GFX_WEB anim_bgeffect ANIM_BG_07, $0, $2, $0 anim_obj ANIM_OBJ_SPIDER_WEB, 132, 48, $0 @@ -3383,9 +3171,8 @@ BattleAnim_SpiderWeb: ; cacd9 anim_obj ANIM_OBJ_STRING_SHOT, 64, 84, $0 anim_wait 64 anim_ret -; cacfb -BattleAnim_MindReader: ; cacfb +BattleAnim_MindReader: anim_1gfx ANIM_GFX_MISC anim_sound 0, 1, SFX_MIND_READER .loop @@ -3397,9 +3184,8 @@ BattleAnim_MindReader: ; cacfb anim_loop 2, .loop anim_wait 32 anim_ret -; cad1b -BattleAnim_Nightmare: ; cad1b +BattleAnim_Nightmare: anim_1gfx ANIM_GFX_ANGELS anim_bgp $1b anim_obp0 $f @@ -3408,9 +3194,8 @@ BattleAnim_Nightmare: ; cad1b anim_sound 0, 1, SFX_NIGHTMARE anim_wait 96 anim_ret -; cad30 -BattleAnim_FlameWheel: ; cad30 +BattleAnim_FlameWheel: anim_1gfx ANIM_GFX_FIRE .loop anim_sound 0, 0, SFX_EMBER @@ -3432,9 +3217,8 @@ BattleAnim_FlameWheel: ; cad30 anim_incobj 9 anim_wait 8 anim_ret -; cad6b -BattleAnim_Snore: ; cad6b +BattleAnim_Snore: anim_2gfx ANIM_GFX_STATUS, ANIM_GFX_NOISE anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0 anim_wait 32 @@ -3446,9 +3230,8 @@ BattleAnim_Snore: ; cad6b anim_loop 2, .loop anim_wait 8 anim_ret -; cad86 -BattleAnim_Curse: ; cad86 +BattleAnim_Curse: anim_if_param_equal $1, .NotGhost anim_2gfx ANIM_GFX_HIT, ANIM_GFX_OBJECTS anim_obj ANIM_OBJ_CURSE, 68, 72, $0 @@ -3460,9 +3243,8 @@ BattleAnim_Curse: ; cad86 anim_obj ANIM_OBJ_04, 44, 96, $0 anim_wait 16 anim_ret -; cada3 -.NotGhost: ; cada3 +.NotGhost: anim_1gfx ANIM_GFX_SPEED anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_19, $0, $1, $40 @@ -3492,9 +3274,8 @@ BattleAnim_Curse: ; cad86 anim_incbgeffect ANIM_BG_16 anim_call BattleAnim_ShowMon_0 anim_ret -; cadf1 -BattleAnim_Flail: ; cadf1 +BattleAnim_Flail: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 anim_sound 0, 0, SFX_SUBMISSION @@ -3509,9 +3290,8 @@ BattleAnim_Flail: ; cadf1 anim_incbgeffect ANIM_BG_2C anim_call BattleAnim_ShowMon_0 anim_ret -; cae17 -BattleAnim_Conversion: ; cae17 +BattleAnim_Conversion: anim_1gfx ANIM_GFX_EXPLOSION anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 anim_sound 63, 3, SFX_SHARPEN @@ -3525,9 +3305,8 @@ BattleAnim_Conversion: ; cae17 anim_obj ANIM_OBJ_CONVERSION, 48, 88, $38 anim_wait 128 anim_ret -; cae4b -BattleAnim_Aeroblast: ; cae4b +BattleAnim_Aeroblast: anim_2gfx ANIM_GFX_BEAM, ANIM_GFX_AEROBLAST anim_bgp $1b anim_bgeffect ANIM_BG_1F, $50, $4, $10 @@ -3546,21 +3325,19 @@ BattleAnim_Aeroblast: ; cae4b anim_obj ANIM_OBJ_28, 126, 62, $0 anim_wait 48 anim_ret -; cae84 -BattleAnim_CottonSpore: ; cae84 +BattleAnim_CottonSpore: anim_obp0 $54 anim_1gfx ANIM_GFX_MISC anim_sound 0, 1, SFX_POWDER -.loop ; cae8b +.loop anim_obj ANIM_OBJ_COTTON_SPORE, 132, 32, $0 anim_wait 8 anim_loop 5, .loop anim_wait 96 anim_ret -; cae97 -BattleAnim_Reversal: ; cae97 +BattleAnim_Reversal: anim_2gfx ANIM_GFX_SHINE, ANIM_GFX_HIT anim_bgeffect ANIM_BG_07, $0, $0, $0 anim_sound 0, 1, SFX_MEGA_PUNCH @@ -3582,19 +3359,17 @@ BattleAnim_Reversal: ; cae97 anim_obj ANIM_OBJ_FORESIGHT, 152, 40, $0 anim_wait 24 anim_ret -; caed6 -BattleAnim_Spite: ; caed6 +BattleAnim_Spite: anim_1gfx ANIM_GFX_ANGELS anim_obj ANIM_OBJ_SPITE, 132, 16, $0 anim_sound 0, 1, SFX_SPITE anim_wait 96 anim_ret -; caee2 -BattleAnim_PowderSnow: ; caee2 +BattleAnim_PowderSnow: anim_1gfx ANIM_GFX_ICE -.loop ; caee4 +.loop anim_sound 6, 2, SFX_SHINE anim_obj ANIM_OBJ_POWDER_SNOW, 64, 88, $23 anim_wait 2 @@ -3610,9 +3385,8 @@ BattleAnim_PowderSnow: ; caee2 anim_call BattleAnim_PowderSnow_branch_cbbdf anim_wait 32 anim_ret -; caf0e -BattleAnim_Protect: ; caf0e +BattleAnim_Protect: anim_1gfx ANIM_GFX_OBJECTS anim_bgeffect ANIM_BG_07, $0, $2, $0 anim_obj ANIM_OBJ_PROTECT, 80, 80, $0 @@ -3623,9 +3397,8 @@ BattleAnim_Protect: ; caf0e anim_sound 0, 0, SFX_PROTECT anim_wait 96 anim_ret -; caf33 -BattleAnim_MachPunch: ; caf33 +BattleAnim_MachPunch: anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_HIT anim_bgeffect ANIM_BG_HIDE_MON, $0, $1, $0 anim_sound 0, 0, SFX_MENU @@ -3644,18 +3417,16 @@ BattleAnim_MachPunch: ; caf33 anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 16 anim_ret -; caf73 -BattleAnim_ScaryFace: ; caf73 +BattleAnim_ScaryFace: anim_1gfx ANIM_GFX_BEAM anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_call BattleAnim_ScaryFace_branch_cbadc anim_wait 64 anim_ret -; caf84 -BattleAnim_FaintAttack: ; caf84 +BattleAnim_FaintAttack: anim_1gfx ANIM_GFX_HIT anim_sound 0, 0, SFX_CURSE anim_call BattleAnim_FollowEnemyFeet_0 @@ -3674,9 +3445,8 @@ BattleAnim_FaintAttack: ; caf84 anim_call BattleAnim_ShowMon_0 anim_wait 4 anim_ret -; cafb4 -BattleAnim_SweetKiss: ; cafb4 +BattleAnim_SweetKiss: anim_2gfx ANIM_GFX_OBJECTS, ANIM_GFX_ANGELS anim_bgeffect ANIM_BG_07, $0, $2, $0 anim_obj ANIM_OBJ_SWEET_KISS, 96, 40, $0 @@ -3686,9 +3456,8 @@ BattleAnim_SweetKiss: ; cafb4 anim_obj ANIM_OBJ_HEART, 120, 40, $0 anim_wait 40 anim_ret -; cafcf -BattleAnim_BellyDrum: ; cafcf +BattleAnim_BellyDrum: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_NOISE anim_sound 0, 0, SFX_BELLY_DRUM anim_obj ANIM_OBJ_AA, 64, 104, $0 @@ -3727,9 +3496,8 @@ BattleAnim_BellyDrum: ; cafcf anim_obj ANIM_OBJ_AB, 64, 92, $f8 anim_wait 12 anim_ret -; cb051 -BattleAnim_SludgeBomb: ; cb051 +BattleAnim_SludgeBomb: anim_2gfx ANIM_GFX_EGG, ANIM_GFX_POISON anim_bgeffect ANIM_BG_BLACK_HUES, $0, $8, $0 anim_sound 6, 2, SFX_SLUDGE_BOMB @@ -3738,16 +3506,14 @@ BattleAnim_SludgeBomb: ; cb051 anim_call BattleAnim_SludgeBomb_branch_cbc15 anim_wait 64 anim_ret -; cb067 -BattleAnim_MudSlap: ; cb067 +BattleAnim_MudSlap: anim_1gfx ANIM_GFX_SAND anim_obp0 $fc anim_call BattleAnim_MudSlap_branch_cbc5b anim_ret -; cb06f -BattleAnim_Octazooka: ; cb06f +BattleAnim_Octazooka: anim_3gfx ANIM_GFX_HAZE, ANIM_GFX_EGG, ANIM_GFX_SMOKE anim_sound 6, 2, SFX_SLUDGE_BOMB anim_obj ANIM_OBJ_OCTAZOOKA, 64, 92, $4 @@ -3762,9 +3528,8 @@ BattleAnim_Octazooka: ; cb06f anim_wait 128 .done anim_ret -; cb092 -BattleAnim_Spikes: ; cb092 +BattleAnim_Spikes: anim_1gfx ANIM_GFX_MISC anim_sound 6, 2, SFX_MENU anim_obj ANIM_OBJ_SPIKES, 48, 88, $20 @@ -3776,9 +3541,8 @@ BattleAnim_Spikes: ; cb092 anim_obj ANIM_OBJ_SPIKES, 48, 88, $28 anim_wait 64 anim_ret -; cb0b0 -BattleAnim_ZapCannon: ; cb0b0 +BattleAnim_ZapCannon: anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION anim_bgp $1b anim_obp0 $30 @@ -3791,9 +3555,8 @@ BattleAnim_ZapCannon: ; cb0b0 anim_obj ANIM_OBJ_31, 136, 56, $0 anim_wait 128 anim_ret -; cb0d0 -BattleAnim_Foresight: ; cb0d0 +BattleAnim_Foresight: anim_1gfx ANIM_GFX_SHINE anim_call BattleAnim_FollowEnemyFeet_1 anim_bgeffect ANIM_BG_07, $0, $0, $0 @@ -3806,9 +3569,8 @@ BattleAnim_Foresight: ; cb0d0 anim_call BattleAnim_ShowMon_1 anim_wait 8 anim_ret -; cb0f0 -BattleAnim_DestinyBond: ; cb0f0 +BattleAnim_DestinyBond: anim_1gfx ANIM_GFX_ANGELS anim_bgp $1b anim_obp0 $0 @@ -3817,17 +3579,15 @@ BattleAnim_DestinyBond: ; cb0f0 anim_obj ANIM_OBJ_DESTINY_BOND, 44, 120, $2 anim_wait 128 anim_ret -; cb104 -BattleAnim_DestinyBond_branch_cb104: ; cb104 +BattleAnim_DestinyBond_branch_cb104: anim_obj ANIM_OBJ_DESTINY_BOND, 132, 76, $0 anim_sound 0, 1, SFX_KINESIS anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0 anim_wait 32 anim_ret -; cb113 -BattleAnim_PerishSong: ; cb113 +BattleAnim_PerishSong: anim_1gfx ANIM_GFX_NOISE anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 @@ -3842,9 +3602,8 @@ BattleAnim_PerishSong: ; cb113 anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $38 anim_wait 112 anim_ret -; cb14c -BattleAnim_IcyWind: ; cb14c +BattleAnim_IcyWind: anim_1gfx ANIM_GFX_SPEED anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 @@ -3870,18 +3629,16 @@ BattleAnim_IcyWind: ; cb14c anim_incobj 7 anim_wait 1 anim_ret -; cb18c -BattleAnim_Detect: ; cb18c +BattleAnim_Detect: anim_1gfx ANIM_GFX_SHINE anim_bgeffect ANIM_BG_07, $0, $0, $0 anim_sound 0, 0, SFX_FORESIGHT anim_obj ANIM_OBJ_FORESIGHT, 64, 88, $0 anim_wait 24 anim_ret -; cb19d -BattleAnim_BoneRush: ; cb19d +BattleAnim_BoneRush: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_MISC anim_sound 0, 1, SFX_BONE_CLUB anim_obj ANIM_OBJ_BONE_RUSH, 132, 56, $2 @@ -3893,9 +3650,8 @@ BattleAnim_BoneRush: ; cb19d anim_obj ANIM_OBJ_01, 144, 64, $0 anim_wait 16 anim_ret -; cb1bc -BattleAnim_LockOn: ; cb1bc +BattleAnim_LockOn: anim_1gfx ANIM_GFX_MISC anim_sound 0, 1, SFX_MIND_READER .loop @@ -3907,9 +3663,8 @@ BattleAnim_LockOn: ; cb1bc anim_loop 2, .loop anim_wait 32 anim_ret -; cb1dc -BattleAnim_Outrage: ; cb1dc +BattleAnim_Outrage: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_1A, $0, $1, $20 @@ -3928,9 +3683,8 @@ BattleAnim_Outrage: ; cb1dc anim_obj ANIM_OBJ_00, 152, 40, $0 anim_wait 16 anim_ret -; cb210 -BattleAnim_Sandstorm: ; cb210 +BattleAnim_Sandstorm: anim_1gfx ANIM_GFX_POWDER anim_obj ANIM_OBJ_SANDSTORM, 88, 0, $0 anim_wait 8 @@ -3943,9 +3697,8 @@ BattleAnim_Sandstorm: ; cb210 anim_loop 16, .loop anim_wait 8 anim_ret -; cb22d -BattleAnim_GigaDrain: ; cb22d +BattleAnim_GigaDrain: anim_2gfx ANIM_GFX_BUBBLE, ANIM_GFX_CHARGE anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_1C, $0, $0, $10 @@ -3973,9 +3726,8 @@ BattleAnim_GigaDrain: ; cb22d anim_loop 2, .loop anim_wait 32 anim_ret -; cb274 -BattleAnim_Endure: ; cb274 +BattleAnim_Endure: anim_1gfx ANIM_GFX_SPEED anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_1A, $0, $1, $20 @@ -4001,9 +3753,8 @@ BattleAnim_Endure: ; cb274 anim_incbgeffect ANIM_BG_1A anim_call BattleAnim_ShowMon_0 anim_ret -; cb2bb -BattleAnim_Charm: ; cb2bb +BattleAnim_Charm: anim_1gfx ANIM_GFX_OBJECTS anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_26, $0, $1, $0 @@ -4014,9 +3765,8 @@ BattleAnim_Charm: ; cb2bb anim_call BattleAnim_ShowMon_0 anim_wait 4 anim_ret -; cb2d5 -BattleAnim_Rollout: ; cb2d5 +BattleAnim_Rollout: anim_1gfx ANIM_GFX_HIT anim_sound 0, 0, SFX_SPARK anim_call BattleAnim_FollowPlayerHead_0 @@ -4028,9 +3778,8 @@ BattleAnim_Rollout: ; cb2d5 anim_wait 8 anim_call BattleAnim_ShowMon_0 anim_ret -; cb2f5 -BattleAnim_FalseSwipe: ; cb2f5 +BattleAnim_FalseSwipe: anim_2gfx ANIM_GFX_SHINE, ANIM_GFX_CUT anim_bgeffect ANIM_BG_07, $0, $0, $0 anim_sound 0, 1, SFX_CUT @@ -4039,9 +3788,8 @@ BattleAnim_FalseSwipe: ; cb2f5 anim_obj ANIM_OBJ_GLIMMER, 136, 40, $0 anim_wait 32 anim_ret -; cb30d -BattleAnim_Swagger: ; cb30d +BattleAnim_Swagger: anim_2gfx ANIM_GFX_MISC, ANIM_GFX_WIND .loop anim_sound 0, 0, SFX_MENU @@ -4053,9 +3801,8 @@ BattleAnim_Swagger: ; cb30d anim_obj ANIM_OBJ_ANGER, 104, 40, $0 anim_wait 40 anim_ret -; cb328 -BattleAnim_MilkDrink: ; cb328 +BattleAnim_MilkDrink: anim_2gfx ANIM_GFX_MISC, ANIM_GFX_BUBBLE anim_call BattleAnim_FollowEnemyFeet_0 anim_obj ANIM_OBJ_MILK_DRINK, 74, 104, $0 @@ -4070,9 +3817,8 @@ BattleAnim_MilkDrink: ; cb328 anim_incbgeffect ANIM_BG_18 anim_call BattleAnim_ShowMon_0 anim_ret -; cb34d -BattleAnim_Spark: ; cb34d +BattleAnim_Spark: anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION anim_sound 0, 0, SFX_ZAP_CANNON anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3 @@ -4093,9 +3839,8 @@ BattleAnim_Spark: ; cb34d anim_obj ANIM_OBJ_33, 136, 56, $0 anim_wait 32 anim_ret -; cb386 -BattleAnim_FuryCutter: ; cb386 +BattleAnim_FuryCutter: anim_1gfx ANIM_GFX_CUT .loop anim_sound 0, 1, SFX_CUT @@ -4109,9 +3854,8 @@ BattleAnim_FuryCutter: ; cb386 anim_wait 16 anim_jumpuntil .loop anim_ret -; cb3a1 -BattleAnim_SteelWing: ; cb3a1 +BattleAnim_SteelWing: anim_1gfx ANIM_GFX_REFLECT anim_obp0 $0 anim_sound 0, 0, SFX_RAGE @@ -4133,9 +3877,8 @@ BattleAnim_SteelWing: ; cb3a1 anim_obj ANIM_OBJ_01, 124, 56, $0 anim_wait 16 anim_ret -; cb3df -BattleAnim_MeanLook: ; cb3df +BattleAnim_MeanLook: anim_1gfx ANIM_GFX_PSYCHIC anim_obp0 $e0 anim_sound 0, 1, SFX_MEAN_LOOK @@ -4150,9 +3893,8 @@ BattleAnim_MeanLook: ; cb3df anim_obj ANIM_OBJ_MEAN_LOOK, 132, 48, $0 anim_wait 128 anim_ret -; cb405 -BattleAnim_Attract: ; cb405 +BattleAnim_Attract: anim_1gfx ANIM_GFX_OBJECTS .loop anim_sound 0, 0, SFX_ATTRACT @@ -4162,9 +3904,8 @@ BattleAnim_Attract: ; cb405 anim_wait 128 anim_wait 64 anim_ret -; cb417 -BattleAnim_SleepTalk: ; cb417 +BattleAnim_SleepTalk: anim_1gfx ANIM_GFX_STATUS .loop anim_sound 0, 0, SFX_STRENGTH @@ -4173,9 +3914,8 @@ BattleAnim_SleepTalk: ; cb417 anim_loop 2, .loop anim_wait 32 anim_ret -; cb428 -BattleAnim_HealBell: ; cb428 +BattleAnim_HealBell: anim_2gfx ANIM_GFX_MISC, ANIM_GFX_NOISE anim_obj ANIM_OBJ_84, 72, 56, $0 anim_wait 32 @@ -4198,9 +3938,8 @@ BattleAnim_HealBell: ; cb428 anim_loop 4, .loop anim_wait 64 anim_ret -; cb464 -BattleAnim_Return: ; cb464 +BattleAnim_Return: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowPlayerHead_0 anim_bgeffect ANIM_BG_BOUNCE_DOWN, $0, $1, $0 @@ -4215,9 +3954,8 @@ BattleAnim_Return: ; cb464 anim_wait 8 anim_call BattleAnim_ShowMon_0 anim_ret -; cb488 -BattleAnim_Present: ; cb488 +BattleAnim_Present: anim_2gfx ANIM_GFX_STATUS, ANIM_GFX_BUBBLE anim_sound 0, 1, SFX_PRESENT anim_obj ANIM_OBJ_PRESENT, 64, 88, $6c @@ -4244,9 +3982,8 @@ BattleAnim_Present: ; cb488 anim_loop 8, .loop2 anim_wait 128 anim_ret -; cb4c1 -BattleAnim_Frustration: ; cb4c1 +BattleAnim_Frustration: anim_1gfx ANIM_GFX_MISC anim_sound 0, 0, SFX_KINESIS_2 anim_obj ANIM_OBJ_ANGER, 72, 80, $0 @@ -4268,9 +4005,8 @@ BattleAnim_Frustration: ; cb4c1 anim_wait 1 anim_call BattleAnim_ShowMon_0 anim_ret -; cb4f9 -BattleAnim_Safeguard: ; cb4f9 +BattleAnim_Safeguard: anim_1gfx ANIM_GFX_MISC anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $0 @@ -4281,9 +4017,8 @@ BattleAnim_Safeguard: ; cb4f9 anim_sound 0, 0, SFX_PROTECT anim_wait 96 anim_ret -; cb51e -BattleAnim_PainSplit: ; cb51e +BattleAnim_PainSplit: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_OBJECTS anim_call BattleAnim_FollowPlayerHead_0 anim_bgeffect ANIM_BG_25, $0, $1, $0 @@ -4295,9 +4030,8 @@ BattleAnim_PainSplit: ; cb51e anim_call BattleAnim_ShowMon_0 anim_wait 1 anim_ret -; cb53d -BattleAnim_SacredFire: ; cb53d +BattleAnim_SacredFire: anim_1gfx ANIM_GFX_FIRE anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 @@ -4320,9 +4054,8 @@ BattleAnim_SacredFire: ; cb53d anim_incobj 9 anim_wait 8 anim_ret -; cb57d -BattleAnim_Magnitude: ; cb57d +BattleAnim_Magnitude: anim_1gfx ANIM_GFX_ROCKS .loop anim_bgeffect ANIM_BG_1F, $e, $4, $0 @@ -4340,9 +4073,8 @@ BattleAnim_Magnitude: ; cb57d anim_jumpuntil .loop anim_wait 96 anim_ret -; cb5aa -BattleAnim_Dynamicpunch: ; cb5aa +BattleAnim_Dynamicpunch: anim_2gfx ANIM_GFX_HIT, ANIM_GFX_EXPLOSION anim_sound 0, 1, SFX_COMET_PUNCH anim_obj ANIM_OBJ_0A, 136, 56, $43 @@ -4351,9 +4083,8 @@ BattleAnim_Dynamicpunch: ; cb5aa anim_call BattleAnim_Dynamicpunch_branch_cbb8f anim_wait 16 anim_ret -; cb5c0 -BattleAnim_Megahorn: ; cb5c0 +BattleAnim_Megahorn: anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT anim_bgeffect ANIM_BG_1F, $40, $2, $0 anim_wait 48 @@ -4364,9 +4095,8 @@ BattleAnim_Megahorn: ; cb5c0 anim_obj ANIM_OBJ_00, 136, 56, $0 anim_wait 16 anim_ret -; cb5de -BattleAnim_Dragonbreath: ; cb5de +BattleAnim_Dragonbreath: anim_1gfx ANIM_GFX_FIRE anim_sound 6, 2, SFX_EMBER .loop @@ -4375,18 +4105,16 @@ BattleAnim_Dragonbreath: ; cb5de anim_loop 10, .loop anim_wait 64 anim_ret -; cb5ef -BattleAnim_BatonPass: ; cb5ef +BattleAnim_BatonPass: anim_1gfx ANIM_GFX_MISC anim_obj ANIM_OBJ_BATON_PASS, 44, 104, $20 anim_sound 0, 0, SFX_BATON_PASS anim_call BattleAnim_BatonPass_branch_c9486 anim_wait 64 anim_ret -; cb5fe -BattleAnim_Encore: ; cb5fe +BattleAnim_Encore: anim_1gfx ANIM_GFX_OBJECTS anim_obj ANIM_OBJ_99, 64, 80, $90 anim_obj ANIM_OBJ_99, 64, 80, $10 @@ -4397,18 +4125,16 @@ BattleAnim_Encore: ; cb5fe anim_obj ANIM_OBJ_9A, 64, 72, $34 anim_wait 16 anim_ret -; cb61b -BattleAnim_Pursuit: ; cb61b +BattleAnim_Pursuit: anim_1gfx ANIM_GFX_HIT anim_if_param_equal $1, BattleAnim_Pursuit_branch_cb62b anim_sound 0, 1, SFX_COMET_PUNCH anim_obj ANIM_OBJ_01, 136, 56, $0 anim_wait 16 anim_ret -; cb62b -BattleAnim_Pursuit_branch_cb62b: ; cb62b +BattleAnim_Pursuit_branch_cb62b: anim_bgeffect ANIM_BG_HIDE_MON, $0, $0, $0 anim_wait 4 anim_call BattleAnim_FollowEnemyFeet_1 @@ -4427,9 +4153,8 @@ BattleAnim_Pursuit_branch_cb62b: ; cb62b anim_call BattleAnim_ShowMon_1 anim_wait 1 anim_ret -; cb65e -BattleAnim_RapidSpin: ; cb65e +BattleAnim_RapidSpin: anim_2gfx ANIM_GFX_WIND, ANIM_GFX_HIT anim_obp0 $e4 .loop @@ -4450,9 +4175,8 @@ BattleAnim_RapidSpin: ; cb65e anim_incobj 6 anim_wait 1 anim_ret -; cb68e -BattleAnim_SweetScent: ; cb68e +BattleAnim_SweetScent: anim_2gfx ANIM_GFX_FLOWER, ANIM_GFX_MISC anim_sound 0, 0, SFX_SWEET_SCENT anim_obj ANIM_OBJ_FLOWER, 64, 96, $2 @@ -4466,9 +4190,8 @@ BattleAnim_SweetScent: ; cb68e anim_obj ANIM_OBJ_COTTON, 136, 40, $3f anim_wait 128 anim_ret -; cb6b6 -BattleAnim_IronTail: ; cb6b6 +BattleAnim_IronTail: anim_1gfx ANIM_GFX_REFLECT anim_obp0 $0 anim_sound 0, 0, SFX_RAGE @@ -4485,9 +4208,8 @@ BattleAnim_IronTail: ; cb6b6 anim_incbgeffect ANIM_BG_26 anim_call BattleAnim_ShowMon_0 anim_ret -; cb6dc -BattleAnim_MetalClaw: ; cb6dc +BattleAnim_MetalClaw: anim_1gfx ANIM_GFX_REFLECT anim_obp0 $0 anim_sound 0, 0, SFX_RAGE @@ -4502,9 +4224,8 @@ BattleAnim_MetalClaw: ; cb6dc anim_obj ANIM_OBJ_37, 136, 40, $0 anim_wait 32 anim_ret -; cb703 -BattleAnim_VitalThrow: ; cb703 +BattleAnim_VitalThrow: anim_1gfx ANIM_GFX_HIT anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_2F, $0, $1, $0 @@ -4525,9 +4246,8 @@ BattleAnim_VitalThrow: ; cb703 anim_obj ANIM_OBJ_03, 132, 56, $0 anim_wait 16 anim_ret -; cb739 -BattleAnim_MorningSun: ; cb739 +BattleAnim_MorningSun: anim_1gfx ANIM_GFX_SHINE anim_bgeffect ANIM_BG_07, $0, $0, $0 anim_sound 0, 0, SFX_MORNING_SUN @@ -4539,14 +4259,12 @@ BattleAnim_MorningSun: ; cb739 anim_if_param_equal 0, .zero anim_call BattleAnim_MorningSun_branch_cbc6a anim_ret -; cb756 .zero anim_call BattleAnim_MorningSun_branch_cbc80 anim_ret -; cb75a -BattleAnim_Synthesis: ; cb75a +BattleAnim_Synthesis: anim_1gfx ANIM_GFX_SHINE anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_18, $0, $1, $40 @@ -4558,14 +4276,12 @@ BattleAnim_Synthesis: ; cb75a anim_if_param_equal $1, .one anim_call BattleAnim_Synthesis_branch_cbc6a anim_ret -; cb77a .one anim_call BattleAnim_Synthesis_branch_cbc80 anim_ret -; cb77e -BattleAnim_Crunch: ; cb77e +BattleAnim_Crunch: anim_2gfx ANIM_GFX_CUT, ANIM_GFX_HIT anim_bgp $1b anim_obp0 $c0 @@ -4580,9 +4296,8 @@ BattleAnim_Crunch: ; cb77e anim_obj ANIM_OBJ_00, 128, 64, $18 anim_wait 8 anim_ret -; cb7a8 -BattleAnim_Moonlight: ; cb7a8 +BattleAnim_Moonlight: anim_1gfx ANIM_GFX_SHINE anim_bgp $1b anim_bgeffect ANIM_BG_07, $0, $0, $0 @@ -4601,9 +4316,8 @@ BattleAnim_Moonlight: ; cb7a8 .three anim_call BattleAnim_Moonlight_branch_cbc80 anim_ret -; cb7db -BattleAnim_HiddenPower: ; cb7db +BattleAnim_HiddenPower: anim_1gfx ANIM_GFX_CHARGE anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_1A, $0, $1, $20 @@ -4636,9 +4350,8 @@ BattleAnim_HiddenPower: ; cb7db anim_obj ANIM_OBJ_00, 136, 56, $0 anim_wait 32 anim_ret -; cb83a -BattleAnim_CrossChop: ; cb83a +BattleAnim_CrossChop: anim_1gfx ANIM_GFX_CUT anim_sound 0, 1, SFX_CUT anim_obj ANIM_OBJ_A0, 152, 40, $0 @@ -4650,9 +4363,8 @@ BattleAnim_CrossChop: ; cb83a anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $10 anim_wait 16 anim_ret -; cb85a -BattleAnim_Twister: ; cb85a +BattleAnim_Twister: anim_2gfx ANIM_GFX_WIND, ANIM_GFX_HIT .loop1 anim_sound 0, 0, SFX_RAZOR_WIND @@ -4694,9 +4406,8 @@ BattleAnim_Twister: ; cb85a anim_incobj 9 anim_wait 32 anim_ret -; cb8b3 -BattleAnim_RainDance: ; cb8b3 +BattleAnim_RainDance: anim_1gfx ANIM_GFX_WATER anim_bgp $f8 anim_obp0 $7c @@ -4708,9 +4419,8 @@ BattleAnim_RainDance: ; cb8b3 anim_obj ANIM_OBJ_RAIN, 88, 0, $2 anim_wait 128 anim_ret -; cb8cf -BattleAnim_SunnyDay: ; cb8cf +BattleAnim_SunnyDay: anim_1gfx ANIM_GFX_WATER anim_bgp $90 anim_sound 0, 1, SFX_MORNING_SUN @@ -4721,9 +4431,8 @@ BattleAnim_SunnyDay: ; cb8cf anim_obj ANIM_OBJ_RAIN, 88, 0, $2 anim_wait 128 anim_ret -; cb8e9 -BattleAnim_MirrorCoat: ; cb8e9 +BattleAnim_MirrorCoat: anim_2gfx ANIM_GFX_REFLECT, ANIM_GFX_SPEED anim_bgeffect ANIM_BG_06, $0, $2, $0 .loop @@ -4740,9 +4449,8 @@ BattleAnim_MirrorCoat: ; cb8e9 anim_loop 3, .loop anim_wait 32 anim_ret -; cb917 -BattleAnim_PsychUp: ; cb917 +BattleAnim_PsychUp: anim_1gfx ANIM_GFX_STATUS anim_call BattleAnim_FollowEnemyFeet_0 anim_bgeffect ANIM_BG_1A, $0, $1, $20 @@ -4756,9 +4464,8 @@ BattleAnim_PsychUp: ; cb917 anim_call BattleAnim_ShowMon_0 anim_wait 16 anim_ret -; cb940 -BattleAnim_Extremespeed: ; cb940 +BattleAnim_Extremespeed: anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_CUT anim_bgeffect ANIM_BG_HIDE_MON, $0, $1, $0 anim_sound 0, 0, SFX_MENU @@ -4775,9 +4482,8 @@ BattleAnim_Extremespeed: ; cb940 anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 16 anim_ret -; cb97a -BattleAnim_Ancientpower: ; cb97a +BattleAnim_Ancientpower: anim_2gfx ANIM_GFX_ROCKS, ANIM_GFX_HIT anim_sound 0, 0, SFX_SPARK anim_obj ANIM_OBJ_ANCIENTPOWER, 64, 108, $20 @@ -4804,9 +4510,8 @@ BattleAnim_Ancientpower: ; cb97a anim_obj ANIM_OBJ_00, 136, 56, $0 anim_wait 6 anim_ret -; cb9c6 -BattleAnim_ShadowBall: ; cb9c6 +BattleAnim_ShadowBall: anim_2gfx ANIM_GFX_EGG, ANIM_GFX_SMOKE anim_bgp $1b anim_sound 6, 2, SFX_SLUDGE_BOMB @@ -4815,9 +4520,8 @@ BattleAnim_ShadowBall: ; cb9c6 anim_obj ANIM_OBJ_BALL_POOF, 132, 56, $10 anim_wait 24 anim_ret -; cb9db -BattleAnim_FutureSight: ; cb9db +BattleAnim_FutureSight: anim_1gfx ANIM_GFX_WIND anim_bgeffect ANIM_BG_06, $0, $2, $0 anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 @@ -4836,9 +4540,8 @@ BattleAnim_FutureSight: ; cb9db anim_loop 4, .loop anim_incbgeffect ANIM_BG_PSYCHIC anim_ret -; cba1b -BattleAnim_RockSmash: ; cba1b +BattleAnim_RockSmash: anim_2gfx ANIM_GFX_ROCKS, ANIM_GFX_HIT anim_sound 0, 1, SFX_SPARK anim_obj ANIM_OBJ_01, 128, 56, $0 @@ -4860,9 +4563,8 @@ BattleAnim_RockSmash: ; cba1b anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $90 anim_wait 32 anim_ret -; cba6a -BattleAnim_Whirlpool: ; cba6a +BattleAnim_Whirlpool: anim_1gfx ANIM_GFX_WIND anim_bgeffect ANIM_BG_WHIRLPOOL, $0, $0, $0 anim_sound 0, 1, SFX_SURF @@ -4875,9 +4577,8 @@ BattleAnim_Whirlpool: ; cba6a anim_incbgeffect ANIM_BG_WHIRLPOOL anim_wait 1 anim_ret -; cba84 -BattleAnim_BeatUp: ; cba84 +BattleAnim_BeatUp: anim_if_param_equal $0, .current_mon anim_sound 0, 0, SFX_BALL_POOF anim_bgeffect ANIM_BG_RETURN_MON, $0, $1, $0 @@ -4896,11 +4597,10 @@ BattleAnim_BeatUp: ; cba84 anim_wait 8 anim_call BattleAnim_ShowMon_0 anim_ret -; cbab3 -BattleAnim_DreamEater_branch_cbab3: ; cbab3 -BattleAnim_GigaDrain_branch_cbab3: ; cbab3 -BattleAnim_LeechLife_branch_cbab3: ; cbab3 +BattleAnim_DreamEater_branch_cbab3: +BattleAnim_GigaDrain_branch_cbab3: +BattleAnim_LeechLife_branch_cbab3: anim_obj ANIM_OBJ_71, 132, 44, $0 anim_obj ANIM_OBJ_71, 132, 44, $8 anim_obj ANIM_OBJ_71, 132, 44, $10 @@ -4910,11 +4610,10 @@ BattleAnim_LeechLife_branch_cbab3: ; cbab3 anim_obj ANIM_OBJ_71, 132, 44, $30 anim_obj ANIM_OBJ_71, 132, 44, $38 anim_ret -; cbadc -BattleAnim_Glare_branch_cbadc: ; cbadc -BattleAnim_Leer_branch_cbadc: ; cbadc -BattleAnim_ScaryFace_branch_cbadc: ; cbadc +BattleAnim_Glare_branch_cbadc: +BattleAnim_Leer_branch_cbadc: +BattleAnim_ScaryFace_branch_cbadc: anim_sound 6, 2, SFX_LEER anim_obj ANIM_OBJ_4E, 72, 84, $0 anim_obj ANIM_OBJ_4E, 64, 80, $0 @@ -4927,10 +4626,9 @@ BattleAnim_ScaryFace_branch_cbadc: ; cbadc anim_obj ANIM_OBJ_4F, 130, 54, $0 anim_obj ANIM_OBJ_4F, 122, 50, $0 anim_ret -; cbb12 -BattleAnim_Fly_branch_cbb12: ; cbb12 -BattleAnim_Teleport_branch_cbb12: ; cbb12 +BattleAnim_Fly_branch_cbb12: +BattleAnim_Teleport_branch_cbb12: anim_sound 0, 0, SFX_WARP_TO anim_obj ANIM_OBJ_44, 44, 108, $0 anim_obj ANIM_OBJ_44, 44, 100, $0 @@ -4940,11 +4638,10 @@ BattleAnim_Teleport_branch_cbb12: ; cbb12 anim_obj ANIM_OBJ_44, 44, 68, $0 anim_obj ANIM_OBJ_44, 44, 60, $0 anim_ret -; cbb39 -BattleAnim_AuroraBeam_branch_cbb39: ; cbb39 -BattleAnim_HyperBeam_branch_cbb39: ; cbb39 -BattleAnim_Solarbeam_branch_cbb39: ; cbb39 +BattleAnim_AuroraBeam_branch_cbb39: +BattleAnim_HyperBeam_branch_cbb39: +BattleAnim_Solarbeam_branch_cbb39: anim_sound 0, 0, SFX_HYPER_BEAM anim_obj ANIM_OBJ_27, 64, 92, $0 anim_wait 4 @@ -4958,10 +4655,9 @@ BattleAnim_Solarbeam_branch_cbb39: ; cbb39 anim_obj ANIM_OBJ_27, 112, 68, $0 anim_obj ANIM_OBJ_28, 126, 62, $0 anim_ret -; cbb62 -BattleAnim_Explosion_branch_cbb62: ; cbb62 -BattleAnim_Selfdestruct_branch_cbb62: ; cbb62 +BattleAnim_Explosion_branch_cbb62: +BattleAnim_Selfdestruct_branch_cbb62: anim_sound 0, 0, SFX_EGG_BOMB anim_obj ANIM_OBJ_17, 24, 64, $0 anim_wait 5 @@ -4977,12 +4673,11 @@ BattleAnim_Selfdestruct_branch_cbb62: ; cbb62 anim_sound 0, 0, SFX_EGG_BOMB anim_obj ANIM_OBJ_17, 40, 84, $0 anim_ret -; cbb8f -BattleAnim_Dynamicpunch_branch_cbb8f: ; cbb8f -BattleAnim_Explosion_branch_cbb8f: ; cbb8f -BattleAnim_Present_branch_cbb8f: ; cbb8f -BattleAnim_Selfdestruct_branch_cbb8f: ; cbb8f +BattleAnim_Dynamicpunch_branch_cbb8f: +BattleAnim_Explosion_branch_cbb8f: +BattleAnim_Present_branch_cbb8f: +BattleAnim_Selfdestruct_branch_cbb8f: anim_sound 0, 1, SFX_EGG_BOMB anim_obj ANIM_OBJ_17, 148, 32, $0 anim_wait 5 @@ -4998,19 +4693,17 @@ BattleAnim_Selfdestruct_branch_cbb8f: ; cbb8f anim_sound 0, 1, SFX_EGG_BOMB anim_obj ANIM_OBJ_17, 132, 52, $0 anim_ret -; cbbbc -BattleAnim_Growl_branch_cbbbc: ; cbbbc -BattleAnim_Roar_branch_cbbbc: ; cbbbc -BattleAnim_Snore_branch_cbbbc: ; cbbbc +BattleAnim_Growl_branch_cbbbc: +BattleAnim_Roar_branch_cbbbc: +BattleAnim_Snore_branch_cbbbc: anim_obj ANIM_OBJ_4B, 64, 76, $0 anim_obj ANIM_OBJ_4B, 64, 88, $1 anim_obj ANIM_OBJ_4B, 64, 100, $2 anim_ret -; cbbcc -BattleAnim_FirePunch_branch_cbbcc: ; cbbcc -BattleAnim_TriAttack_branch_cbbcc: ; cbbcc +BattleAnim_FirePunch_branch_cbbcc: +BattleAnim_TriAttack_branch_cbbcc: anim_sound 0, 1, SFX_EMBER .loop anim_obj ANIM_OBJ_BURNED, 136, 56, $10 @@ -5018,11 +4711,10 @@ BattleAnim_TriAttack_branch_cbbcc: ; cbbcc anim_wait 4 anim_loop 4, .loop anim_ret -; cbbdf -BattleAnim_IcePunch_branch_cbbdf: ; cbbdf -BattleAnim_PowderSnow_branch_cbbdf: ; cbbdf -BattleAnim_TriAttack_branch_cbbdf: ; cbbdf +BattleAnim_IcePunch_branch_cbbdf: +BattleAnim_PowderSnow_branch_cbbdf: +BattleAnim_TriAttack_branch_cbbdf: anim_sound 0, 1, SFX_SHINE anim_obj ANIM_OBJ_12, 128, 42, $0 anim_wait 6 @@ -5041,11 +4733,10 @@ BattleAnim_TriAttack_branch_cbbdf: ; cbbdf anim_sound 0, 1, SFX_SHINE anim_obj ANIM_OBJ_12, 128, 70, $0 anim_ret -; cbc15 -BattleAnim_SludgeBomb_branch_cbc15: ; cbc15 -BattleAnim_Sludge_branch_cbc15: ; cbc15 -BattleAnim_Toxic_branch_cbc15: ; cbc15 +BattleAnim_SludgeBomb_branch_cbc15: +BattleAnim_Sludge_branch_cbc15: +BattleAnim_Toxic_branch_cbc15: .loop anim_sound 0, 1, SFX_UNKNOWN_7F anim_obj ANIM_OBJ_1A, 132, 72, $0 @@ -5058,22 +4749,20 @@ BattleAnim_Toxic_branch_cbc15: ; cbc15 anim_wait 8 anim_loop 5, .loop anim_ret -; cbc35 -BattleAnim_Acid_branch_cbc35: ; cbc35 -BattleAnim_Toxic_branch_cbc35: ; cbc35 +BattleAnim_Acid_branch_cbc35: +BattleAnim_Toxic_branch_cbc35: .loop anim_sound 6, 2, SFX_BUBBLEBEAM anim_obj ANIM_OBJ_19, 64, 92, $10 anim_wait 5 anim_loop 8, .loop anim_ret -; cbc43 -BattleAnim_Harden_branch_cbc43: ; cbc43 -BattleAnim_IronTail_branch_cbc43: ; cbc43 -BattleAnim_MetalClaw_branch_cbc43: ; cbc43 -BattleAnim_SteelWing_branch_cbc43: ; cbc43 +BattleAnim_Harden_branch_cbc43: +BattleAnim_IronTail_branch_cbc43: +BattleAnim_MetalClaw_branch_cbc43: +BattleAnim_SteelWing_branch_cbc43: anim_sound 0, 0, SFX_SHINE anim_bgeffect ANIM_BG_17, $0, $1, $40 anim_wait 8 @@ -5083,10 +4772,9 @@ BattleAnim_SteelWing_branch_cbc43: ; cbc43 anim_wait 64 anim_incbgeffect ANIM_BG_17 anim_ret -; cbc5b -BattleAnim_MudSlap_branch_cbc5b: ; cbc5b -BattleAnim_SandAttack_branch_cbc5b: ; cbc5b +BattleAnim_MudSlap_branch_cbc5b: +BattleAnim_SandAttack_branch_cbc5b: .loop anim_sound 6, 2, SFX_MENU anim_obj ANIM_OBJ_58, 64, 92, $4 @@ -5094,11 +4782,10 @@ BattleAnim_SandAttack_branch_cbc5b: ; cbc5b anim_loop 8, .loop anim_wait 32 anim_ret -; cbc6a -BattleAnim_Moonlight_branch_cbc6a: ; cbc6a -BattleAnim_MorningSun_branch_cbc6a: ; cbc6a -BattleAnim_Synthesis_branch_cbc6a: ; cbc6a +BattleAnim_Moonlight_branch_cbc6a: +BattleAnim_MorningSun_branch_cbc6a: +BattleAnim_Synthesis_branch_cbc6a: anim_sound 0, 0, SFX_METRONOME anim_obj ANIM_OBJ_GLIMMER, 44, 64, $0 anim_wait 5 @@ -5107,11 +4794,10 @@ BattleAnim_Synthesis_branch_cbc6a: ; cbc6a anim_obj ANIM_OBJ_GLIMMER, 56, 104, $0 anim_wait 21 anim_ret -; cbc80 -BattleAnim_Moonlight_branch_cbc80: ; cbc80 -BattleAnim_MorningSun_branch_cbc80: ; cbc80 -BattleAnim_Synthesis_branch_cbc80: ; cbc80 +BattleAnim_Moonlight_branch_cbc80: +BattleAnim_MorningSun_branch_cbc80: +BattleAnim_Synthesis_branch_cbc80: anim_sound 0, 0, SFX_METRONOME .loop anim_obj ANIM_OBJ_GLIMMER, 24, 64, $0 @@ -5127,50 +4813,43 @@ BattleAnim_Synthesis_branch_cbc80: ; cbc80 anim_loop 2, .loop anim_wait 16 anim_ret -; cbca7 -BattleAnim_FollowEnemyFeet_0: ; cbca7 +BattleAnim_FollowEnemyFeet_0: anim_enemyfeetobj anim_bgeffect ANIM_BG_FEET_FOLLOW, $0, $0, $0 anim_wait 6 anim_ret -; cbcaf -BattleAnim_FollowPlayerHead_0: ; cbcaf +BattleAnim_FollowPlayerHead_0: anim_playerheadobj anim_bgeffect ANIM_BG_HEAD_FOLLOW, $0, $0, $0 anim_wait 6 anim_ret -; cbcb7 -BattleAnim_ShowMon_0: ; cbcb7 +BattleAnim_ShowMon_0: anim_wait 1 anim_bgeffect ANIM_BG_SHOW_MON, $0, $0, $0 anim_wait 5 anim_incobj 1 anim_wait 1 anim_ret -; cbcc2 -BattleAnim_FollowEnemyFeet_1: ; cbcc2 +BattleAnim_FollowEnemyFeet_1: anim_enemyfeetobj anim_bgeffect ANIM_BG_FEET_FOLLOW, $0, $1, $0 anim_wait 6 anim_ret -; cbcca -BattleAnim_FollowPlayerHead_1: ; cbcca +BattleAnim_FollowPlayerHead_1: anim_playerheadobj anim_bgeffect ANIM_BG_HEAD_FOLLOW, $0, $1, $0 anim_wait 4 anim_ret -; cbcd2 -BattleAnim_ShowMon_1: ; cbcd2 +BattleAnim_ShowMon_1: anim_wait 1 anim_bgeffect ANIM_BG_SHOW_MON, $0, $1, $0 anim_wait 4 anim_incobj 1 anim_wait 1 anim_ret -; cbcdd diff --git a/data/moves/descriptions.asm b/data/moves/descriptions.asm index 7f35132cf48..1d2e5b37f25 100644 --- a/data/moves/descriptions.asm +++ b/data/moves/descriptions.asm @@ -1,4 +1,4 @@ -MoveDescriptions:: ; 2cb52 +MoveDescriptions:: ; entries correspond to move ids (see constants/move_constants.asm) dw PoundDescription dw KarateChopDescription @@ -256,7 +256,6 @@ MoveDescriptions:: ; 2cb52 dw MoveFEDescription dw MoveFFDescription dw Move00Description -; 2cd52 MoveFCDescription: MoveFDDescription: @@ -1268,4 +1267,3 @@ WhirlpoolDescription: BeatUpDescription: db "Party #MON join" next "in the attack.@" -; 2ed44 diff --git a/data/moves/effects_pointers.asm b/data/moves/effects_pointers.asm index a12092881d7..94834de71ad 100644 --- a/data/moves/effects_pointers.asm +++ b/data/moves/effects_pointers.asm @@ -1,4 +1,4 @@ -MoveEffectsPointers: ; 271f4 +MoveEffectsPointers: ; entries correspond to EFFECT_* constants dw NormalHit dw DoSleep diff --git a/data/moves/effects_priorities.asm b/data/moves/effects_priorities.asm index 6faa6d032f8..dfdb636a747 100644 --- a/data/moves/effects_priorities.asm +++ b/data/moves/effects_priorities.asm @@ -1,4 +1,4 @@ -MoveEffectPriorities: ; 3c5df +MoveEffectPriorities: db EFFECT_PROTECT, 3 db EFFECT_ENDURE, 3 db EFFECT_PRIORITY_HIT, 2 @@ -6,4 +6,3 @@ MoveEffectPriorities: ; 3c5df db EFFECT_COUNTER, 0 db EFFECT_MIRROR_COAT, 0 db -1 -; 3c5ec diff --git a/data/moves/grammar.asm b/data/moves/grammar.asm index fe637180cc6..f247480836c 100644 --- a/data/moves/grammar.asm +++ b/data/moves/grammar.asm @@ -2,7 +2,7 @@ ; Each move is given an identifier for what usedmovetext to use (0-4). ; Made redundant in English localization, where all are just "[mon]¯used [move]!" -MoveGrammar: ; 105e7a +MoveGrammar: ; 0: originally "[mon]の¯[move]¯つかった!" ("[mon]¯used¯[move]!") db SWORDS_DANCE db GROWTH @@ -99,4 +99,3 @@ MoveGrammar: ; 105e7a ; 4: originally "[mon]の¯[move]!" ("[mon]'s¯[move]!") ; Any move not listed above uses this grammar. db -1 ; end -; 105ed0 diff --git a/data/moves/moves.asm b/data/moves/moves.asm index b576fbaff05..b310ba000cc 100644 --- a/data/moves/moves.asm +++ b/data/moves/moves.asm @@ -10,7 +10,7 @@ move: MACRO db \7 percent ; effect chance ENDM -Moves: ; 41afb +Moves: ; entries correspond to constants/move_constants.asm move POUND, EFFECT_NORMAL_HIT, 40, NORMAL, 100, 35, 0 move KARATE_CHOP, EFFECT_NORMAL_HIT, 50, FIGHTING, 100, 25, 0 diff --git a/data/moves/tmhm_moves.asm b/data/moves/tmhm_moves.asm index fd610d5fa3c..339f6a5a6c5 100644 --- a/data/moves/tmhm_moves.asm +++ b/data/moves/tmhm_moves.asm @@ -1,4 +1,4 @@ -TMHMMoves: ; 1167a +TMHMMoves: ; entries correspond to *_TMNUM enums (see constants/item_constants.asm) ; TMs db DYNAMICPUNCH @@ -64,4 +64,3 @@ TMHMMoves: ; 1167a db THUNDERBOLT db ICE_BEAM db 0 ; end -; 116b7 diff --git a/data/party_menu_qualities.asm b/data/party_menu_qualities.asm index c0c1b3df9b4..3d09ed49d1c 100644 --- a/data/party_menu_qualities.asm +++ b/data/party_menu_qualities.asm @@ -19,7 +19,7 @@ endr ENDM -PartyMenuQualityPointers: ; 503b2 +PartyMenuQualityPointers: ; entries correspond to PARTYMENUACTION_* constants dw .Default ; PARTYMENUACTION_CHOOSE_POKEMON dw .Default ; PARTYMENUACTION_HEALING_ITEM @@ -31,11 +31,9 @@ PartyMenuQualityPointers: ; 503b2 dw .Gender ; PARTYMENUACTION_GIVE_MON_FEMALE dw .Default ; PARTYMENUACTION_GIVE_ITEM dw .Mobile ; PARTYMENUACTION_MOBILE -; 503c6 .Default: partymenuqualities NICKNAMES, HP_BAR, HP_DIGITS, LEVEL, STATUS .TMHM: partymenuqualities NICKNAMES, TMHM_COMPAT, LEVEL, STATUS .EvoStone: partymenuqualities NICKNAMES, EVO_STONE_COMPAT, LEVEL, STATUS .Gender: partymenuqualities NICKNAMES, GENDER, LEVEL, STATUS .Mobile: partymenuqualities NICKNAMES, MOBILE_SELECTION, LEVEL, STATUS -; 503e0 diff --git a/data/phone/non_trainer_names.asm b/data/phone/non_trainer_names.asm index 184a9311361..d7648fa7ffe 100644 --- a/data/phone/non_trainer_names.asm +++ b/data/phone/non_trainer_names.asm @@ -1,4 +1,4 @@ -NonTrainerCallerNames: ; 903d6 +NonTrainerCallerNames: ; entries correspond to PHONECONTACT_* constants dw .none dw .mom @@ -13,4 +13,3 @@ NonTrainerCallerNames: ; 903d6 .elm: db "PROF.ELM:@" .bikeshop: db "BIKE SHOP:@" .buena: db "BUENA: DISC JOCKEY@" -; 90423 diff --git a/data/phone/permanent_numbers.asm b/data/phone/permanent_numbers.asm index a5101f2b64e..98c6212dbcb 100644 --- a/data/phone/permanent_numbers.asm +++ b/data/phone/permanent_numbers.asm @@ -1,5 +1,4 @@ -PermanentNumbers: ; 90066 +PermanentNumbers: db PHONECONTACT_MOM db PHONECONTACT_ELM db -1 ; end -; 90069 diff --git a/data/phone/phone_contacts.asm b/data/phone/phone_contacts.asm index 349fa2e02ce..a7a77450754 100644 --- a/data/phone/phone_contacts.asm +++ b/data/phone/phone_contacts.asm @@ -8,7 +8,7 @@ phone: MACRO dba \7 ENDM -PhoneContacts: ; 9045f +PhoneContacts: ; entries correspond to PHONE_* constants phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript phone TRAINER_NONE, PHONECONTACT_MOM, PLAYERS_HOUSE_1F, ANYTIME, MomPhoneScript, 0, UnusedPhoneScript @@ -48,4 +48,3 @@ PhoneContacts: ; 9045f phone HIKER, PARRY1, ROUTE_45, ANYTIME, ParryPhoneScript1, ANYTIME, ParryPhoneScript2 phone PICNICKER, ERIN1, ROUTE_46, ANYTIME, ErinPhoneScript1, ANYTIME, ErinPhoneScript2 phone TRAINER_NONE, PHONECONTACT_BUENA, GOLDENROD_DEPT_STORE_ROOF, ANYTIME, BuenaPhoneScript1, ANYTIME, BuenaPhoneScript2 -; 90627 diff --git a/data/phone/special_calls.asm b/data/phone/special_calls.asm index 5dba36fc99e..224ca225880 100644 --- a/data/phone/special_calls.asm +++ b/data/phone/special_calls.asm @@ -5,7 +5,7 @@ specialcall: MACRO dba \3 ENDM -SpecialPhoneCallList: ; 90627 +SpecialPhoneCallList: ; entries correspond to SPECIALCALL_* constants specialcall SpecialCallOnlyWhenOutside, PHONECONTACT_ELM, ElmPhoneScript2 specialcall SpecialCallOnlyWhenOutside, PHONECONTACT_ELM, ElmPhoneScript2 @@ -15,4 +15,3 @@ SpecialPhoneCallList: ; 90627 specialcall SpecialCallWhereverYouAre, PHONECONTACT_BIKESHOP, BikeShopPhoneScript specialcall SpecialCallWhereverYouAre, PHONECONTACT_MOM, MomPhoneLectureScript specialcall SpecialCallOnlyWhenOutside, PHONECONTACT_ELM, ElmPhoneScript2 -; 90657 diff --git a/data/player_names.asm b/data/player_names.asm index 3c5a34c77a1..6263cb8282b 100644 --- a/data/player_names.asm +++ b/data/player_names.asm @@ -1,15 +1,15 @@ -ChrisNameMenuHeader: ; 882b5 +ChrisNameMenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 10, TEXTBOX_Y - 1 dw .MaleNames db 1 ; ???? db 0 ; default option -.MaleNames: ; 882be +.MaleNames: db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags db 5 ; items db "NEW NAME@" -MalePlayerNameArray: ; 882c9 +MalePlayerNameArray: db "CHRIS@" db "MAT@" db "ALLAN@" @@ -17,18 +17,18 @@ MalePlayerNameArray: ; 882c9 db 2 ; displacement db " NAME @" ; title -KrisNameMenuHeader: ; 882e5 +KrisNameMenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 10, TEXTBOX_Y - 1 dw .FemaleNames db 1 ; ???? db 0 ; default option -.FemaleNames: ; 882ee +.FemaleNames: db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags db 5 ; items db "NEW NAME@" -FemalePlayerNameArray: ; 882f9 +FemalePlayerNameArray: db "KRIS@" db "AMANDA@" db "JUANA@" diff --git a/data/pokemon/cries.asm b/data/pokemon/cries.asm index e6f729361b5..a57eac98c1c 100644 --- a/data/pokemon/cries.asm +++ b/data/pokemon/cries.asm @@ -3,7 +3,7 @@ mon_cry: MACRO dw \1, \2, \3 ENDM -PokemonCries:: ; f2787 +PokemonCries:: ; entries correspond to constants/pokemon_constants.asm mon_cry CRY_BULBASAUR, $080, $081 ; BULBASAUR mon_cry CRY_BULBASAUR, $020, $100 ; IVYSAUR @@ -260,4 +260,3 @@ PokemonCries:: ; f2787 mon_cry CRY_NIDORAN_M, 0, 0 ; 253 mon_cry CRY_NIDORAN_M, 0, 0 ; 254 mon_cry CRY_NIDORAN_M, 0, 0 ; 255 -; f2d81 diff --git a/data/pokemon/ezchat_order.asm b/data/pokemon/ezchat_order.asm index 8cb860028d1..cb9a60d9822 100644 --- a/data/pokemon/ezchat_order.asm +++ b/data/pokemon/ezchat_order.asm @@ -93,4 +93,3 @@ EZChat_SortedPokemon: .ro: db VULPIX, -1 .wa: db JUMPLUFF, TOTODILE, MACHOP ;, -1 .end: db -1 -; 11d67e diff --git a/data/pokemon/gen1_base_special.asm b/data/pokemon/gen1_base_special.asm index 9998692ab18..306ce31d9c8 100644 --- a/data/pokemon/gen1_base_special.asm +++ b/data/pokemon/gen1_base_special.asm @@ -1,6 +1,6 @@ ; The original base Special stat for each Pokémon from Red/Blue -KantoMonSpecials: ; fb656 +KantoMonSpecials: db 65 ; BULBASAUR db 80 ; IVYSAUR db 100 ; VENUSAUR @@ -152,4 +152,3 @@ KantoMonSpecials: ; fb656 db 100 ; DRAGONITE db 154 ; MEWTWO db 100 ; MEW -; fb6ed diff --git a/data/pokemon/gen1_order.asm b/data/pokemon/gen1_order.asm index e40ba02734b..45efcafa016 100644 --- a/data/pokemon/gen1_order.asm +++ b/data/pokemon/gen1_order.asm @@ -1,4 +1,4 @@ -Pokered_MonIndices: ; fb91c +Pokered_MonIndices: db RHYDON db KANGASKHAN db NIDORAN_M @@ -252,4 +252,3 @@ Pokered_MonIndices: ; fb91c db QWILFISH db WOBBUFFET db WOBBUFFET -; fba18 diff --git a/data/pokemon/menu_icons.asm b/data/pokemon/menu_icons.asm index 360b206a241..f378cbfbeb8 100644 --- a/data/pokemon/menu_icons.asm +++ b/data/pokemon/menu_icons.asm @@ -1,6 +1,6 @@ ; party menu icons -MonMenuIcons: ; 8eac4 +MonMenuIcons: db ICON_BULBASAUR ; BULBASAUR db ICON_BULBASAUR ; IVYSAUR db ICON_BULBASAUR ; VENUSAUR @@ -252,4 +252,3 @@ MonMenuIcons: ; 8eac4 db ICON_LUGIA ; LUGIA db ICON_HO_OH ; HO_OH db ICON_HUMANSHAPE ; CELEBI -; 8ebbf diff --git a/data/pokemon/palettes.asm b/data/pokemon/palettes.asm index ec2cc3c0bb8..a3507c2037a 100644 --- a/data/pokemon/palettes.asm +++ b/data/pokemon/palettes.asm @@ -1,4 +1,4 @@ -PokemonPalettes: ; a8ce +PokemonPalettes: ; entries correspond to Pokémon species, two apiece ; 000 @@ -534,5 +534,3 @@ INCLUDE "gfx/pokemon/egg/shiny.pal" ; 255 shiny RGB 23, 23, 23 RGB 17, 17, 17 - -; b0ce diff --git a/data/pokemon/unown_words.asm b/data/pokemon/unown_words.asm index 0b7d93ac259..5b54b84edc1 100644 --- a/data/pokemon/unown_words.asm +++ b/data/pokemon/unown_words.asm @@ -7,7 +7,7 @@ endr db -1 ENDM -UnownWords: ; fba5a +UnownWords: ; entries correspond to UNOWN_* form constants dw UnownWordA dw UnownWordA @@ -36,7 +36,6 @@ UnownWords: ; fba5a dw UnownWordX dw UnownWordY dw UnownWordZ -; fba90 UnownWordA: unownword "ANGRY" UnownWordB: unownword "BEAR" @@ -64,4 +63,3 @@ UnownWordW: unownword "WANT" UnownWordX: unownword "XXXXX" UnownWordY: unownword "YIELD" UnownWordZ: unownword "ZOOM" -; fbb32 diff --git a/data/predef_pointers.asm b/data/predef_pointers.asm index 87906597a79..1693f22aad9 100644 --- a/data/predef_pointers.asm +++ b/data/predef_pointers.asm @@ -6,7 +6,7 @@ add_predef: MACRO dab \1 ENDM -PredefPointers:: ; 856b +PredefPointers:: add_predef LearnMove ; $0 add_predef DummyPredef1 add_predef HealParty ; this is both a special and a predef @@ -82,4 +82,3 @@ PredefPointers:: ; 856b add_predef Unused_HOF_AnimateAlignedFrontpic ; $48 add_predef HOF_AnimateFrontpic dbw -1, InexplicablyEmptyFunction ; ??? -; 864c diff --git a/data/special_pointers.asm b/data/special_pointers.asm index 50e52246eb7..2b62dc6a3a1 100644 --- a/data/special_pointers.asm +++ b/data/special_pointers.asm @@ -6,7 +6,7 @@ add_special: MACRO dba \1 ENDM -SpecialsPointers:: ; c029 +SpecialsPointers:: add_special WarpToSpawnPoint ; $0 ; Communications @@ -182,4 +182,3 @@ SpecialsPointers:: ; c029 add_special InitialSetDSTFlag add_special InitialClearDSTFlag add_special DummySpecial_c224 ; $a8 -; c224 diff --git a/data/sprite_anims/framesets.asm b/data/sprite_anims/framesets.asm index d768ec21a6e..666f2b2e23b 100644 --- a/data/sprite_anims/framesets.asm +++ b/data/sprite_anims/framesets.asm @@ -1,4 +1,4 @@ -SpriteAnimFrameData: ; 8d6e6 +SpriteAnimFrameData: ; entries correspond to SPRITE_ANIM_FRAMESET_* constants dw .Frameset_00 dw .Frameset_PartyMon @@ -66,7 +66,6 @@ SpriteAnimFrameData: ; 8d6e6 dw .Frameset_IntroUnownF dw .Frameset_CelebiLeft dw .Frameset_CelebiRight -; 8d76a .Frameset_00: frame SPRITE_ANIM_OAMSET_RED_WALK_1, 32 @@ -496,4 +495,3 @@ SpriteAnimFrameData: ; 8d6e6 frame SPRITE_ANIM_OAMSET_CELEBI_1, 8, OAM_X_FLIP frame SPRITE_ANIM_OAMSET_CELEBI_2, 8, OAM_X_FLIP endanim -; 8d94d diff --git a/data/sprite_anims/oam.asm b/data/sprite_anims/oam.asm index bfd5cbcd324..4fa15350420 100644 --- a/data/sprite_anims/oam.asm +++ b/data/sprite_anims/oam.asm @@ -1,4 +1,4 @@ -SpriteAnimOAMData: ; 8d94d +SpriteAnimOAMData: ; entries correspond to SPRITE_ANIM_OAMSET_* constants ; vtile offset, pointer dbw $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_RED_WALK_1 @@ -1126,4 +1126,3 @@ SpriteAnimOAMData: ; 8d94d dsprite 0, 0, -1, 4, $51, 1 dsprite 0, 0, 0, 4, $52, 1 dsprite 0, 0, 1, 4, $53, 1 -; 8e706 diff --git a/data/sprite_anims/sequences.asm b/data/sprite_anims/sequences.asm index 36a0f4afc93..77171bb8ffa 100644 --- a/data/sprite_anims/sequences.asm +++ b/data/sprite_anims/sequences.asm @@ -1,4 +1,4 @@ -SpriteAnimSeqData: ; 8d1c4 +SpriteAnimSeqData: ; entries correspond to SPRITE_ANIM_INDEX_* constants ; frameset sequence, tile db SPRITE_ANIM_FRAMESET_PARTY_MON, SPRITE_ANIM_SEQ_PARTY_MON, $00 ; SPRITE_ANIM_INDEX_PARTY_MON @@ -46,4 +46,3 @@ SpriteAnimSeqData: ; 8d1c4 db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F, SPRITE_ANIM_SEQ_INTRO_UNOWN_F, $00 ; SPRITE_ANIM_INDEX_INTRO_UNOWN_F db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY, SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY, $00 ; SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY db SPRITE_ANIM_FRAMESET_CELEBI_LEFT, SPRITE_ANIM_SEQ_NULL, $00 ; SPRITE_ANIM_INDEX_CELEBI -; 8d24b diff --git a/data/sprites/emotes.asm b/data/sprites/emotes.asm index 2e25e52b559..76ca2f0b951 100644 --- a/data/sprites/emotes.asm +++ b/data/sprites/emotes.asm @@ -5,7 +5,7 @@ emote: MACRO dw vTiles1 tile \3 ENDM -Emotes: ; 144d +Emotes: ; entries correspond to EMOTE_* constants emote ShockEmote, 4, $78 emote QuestionEmote, 4, $78 @@ -19,4 +19,3 @@ Emotes: ; 144d emote FishingRodGFX, 2, $7c emote BoulderDustGFX, 2, $7e emote GrassRustleGFX, 1, $7e -; 14495 diff --git a/data/sprites/facings.asm b/data/sprites/facings.asm index c321ca46279..6e8c304b183 100644 --- a/data/sprites/facings.asm +++ b/data/sprites/facings.asm @@ -1,4 +1,4 @@ -Facings: ; 4049 +Facings: ; entries correspond to FACING_* constants dw FacingStepDown0 dw FacingStepDown1 @@ -52,7 +52,6 @@ FacingWeirdTree2: ; standing down db 0, 8, 0, $01 db 8, 0, RELATIVE_ATTRIBUTES, $02 db 8, 8, RELATIVE_ATTRIBUTES, $03 -; 409c FacingStepDown1: ; walking down 1 db 4 ; # @@ -60,7 +59,6 @@ FacingStepDown1: ; walking down 1 db 0, 8, 0, $81 db 8, 0, RELATIVE_ATTRIBUTES, $82 db 8, 8, RELATIVE_ATTRIBUTES, $83 -; 40ad FacingStepDown3: ; walking down 2 db 4 ; # @@ -68,7 +66,6 @@ FacingStepDown3: ; walking down 2 db 0, 0, X_FLIP, $81 db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $82 db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $83 -; 40be FacingStepUp0: FacingStepUp2: ; standing up @@ -77,7 +74,6 @@ FacingStepUp2: ; standing up db 0, 8, 0, $05 db 8, 0, RELATIVE_ATTRIBUTES, $06 db 8, 8, RELATIVE_ATTRIBUTES, $07 -; 40cf FacingStepUp1: ; walking up 1 db 4 ; # @@ -85,7 +81,6 @@ FacingStepUp1: ; walking up 1 db 0, 8, 0, $85 db 8, 0, RELATIVE_ATTRIBUTES, $86 db 8, 8, RELATIVE_ATTRIBUTES, $87 -; 40e0 FacingStepUp3: ; walking up 2 db 4 ; # @@ -93,7 +88,6 @@ FacingStepUp3: ; walking up 2 db 0, 0, X_FLIP, $85 db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $86 db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $87 -; 40f1 FacingStepLeft0: FacingStepLeft2: ; standing left @@ -102,7 +96,6 @@ FacingStepLeft2: ; standing left db 0, 8, 0, $09 db 8, 0, RELATIVE_ATTRIBUTES, $0a db 8, 8, RELATIVE_ATTRIBUTES, $0b -; 4102 FacingStepRight0: FacingStepRight2: ; standing right @@ -111,7 +104,6 @@ FacingStepRight2: ; standing right db 0, 0, X_FLIP, $09 db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $0a db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $0b -; 4113 FacingStepLeft1: FacingStepLeft3: ; walking left @@ -120,7 +112,6 @@ FacingStepLeft3: ; walking left db 0, 8, 0, $89 db 8, 0, RELATIVE_ATTRIBUTES, $8a db 8, 8, RELATIVE_ATTRIBUTES, $8b -; 4124 FacingStepRight1: FacingStepRight3: ; walking right @@ -129,7 +120,6 @@ FacingStepRight3: ; walking right db 0, 0, X_FLIP, $89 db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $8a db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $8b -; 4135 FacingFishDown: ; fishing down db 5 ; # @@ -138,7 +128,6 @@ FacingFishDown: ; fishing down db 8, 0, RELATIVE_ATTRIBUTES, $02 db 8, 8, RELATIVE_ATTRIBUTES, $03 db 16, 0, ABSOLUTE_TILE_ID, $fc -; 414a FacingFishUp: ; fishing up db 5 ; # @@ -147,7 +136,6 @@ FacingFishUp: ; fishing up db 8, 0, RELATIVE_ATTRIBUTES, $06 db 8, 8, RELATIVE_ATTRIBUTES, $07 db -8, 0, ABSOLUTE_TILE_ID, $fc -; 415f FacingFishLeft: ; fishing left db 5 ; # @@ -156,7 +144,6 @@ FacingFishLeft: ; fishing left db 8, 0, RELATIVE_ATTRIBUTES, $0a db 8, 8, RELATIVE_ATTRIBUTES, $0b db 5, -8, ABSOLUTE_TILE_ID | X_FLIP, $fd -; 4174 FacingFishRight: ; fishing right db 5 ; # @@ -165,7 +152,6 @@ FacingFishRight: ; fishing right db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $0a db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $0b db 5, 16, ABSOLUTE_TILE_ID, $fd -; 4189 FacingEmote: ; emote db 4 ; # @@ -173,13 +159,11 @@ FacingEmote: ; emote db 0, 8, ABSOLUTE_TILE_ID, $f9 db 8, 0, ABSOLUTE_TILE_ID, $fa db 8, 8, ABSOLUTE_TILE_ID, $fb -; 419a FacingShadow: ; shadow db 2 ; # db 0, 0, ABSOLUTE_TILE_ID, $fc db 0, 8, ABSOLUTE_TILE_ID | X_FLIP, $fc -; 41a3 FacingBigDollSymmetric: ; big snorlax or lapras doll db 16 ; # @@ -199,23 +183,20 @@ FacingBigDollSymmetric: ; big snorlax or lapras doll db 16, 16, X_FLIP, $05 db 24, 24, X_FLIP, $06 db 24, 16, X_FLIP, $07 -; 41e4 -FacingWeirdTree1: ; 41e4 +FacingWeirdTree1: db 4 ; # db 0, 0, 0, $04 db 0, 8, 0, $05 db 8, 0, 0, $06 db 8, 8, 0, $07 -; 41f5 -FacingWeirdTree3: ; 41f5 +FacingWeirdTree3: db 4 ; # db 0, 8, X_FLIP, $04 db 0, 0, X_FLIP, $05 db 8, 8, X_FLIP, $06 db 8, 0, X_FLIP, $07 -; 4206 FacingBigDollAsymmetric: ; big doll other than snorlax or lapras db 14 ; # @@ -233,7 +214,6 @@ FacingBigDollAsymmetric: ; big doll other than snorlax or lapras db 16, 16, 0, $08 db 24, 24, X_FLIP, $04 db 24, 16, 0, $0b -; 423f FacingBoulderDust1: ; boulder dust 1 db 4 ; # @@ -241,7 +221,6 @@ FacingBoulderDust1: ; boulder dust 1 db 0, 8, ABSOLUTE_TILE_ID, $fe db 8, 0, ABSOLUTE_TILE_ID, $fe db 8, 8, ABSOLUTE_TILE_ID, $fe -; 4250 FacingBoulderDust2: ; boulder dust 2 db 4 ; # @@ -249,16 +228,13 @@ FacingBoulderDust2: ; boulder dust 2 db 0, 8, ABSOLUTE_TILE_ID, $ff db 8, 0, ABSOLUTE_TILE_ID, $ff db 8, 8, ABSOLUTE_TILE_ID, $ff -; 4261 -FacingGrass1: ; 4261 +FacingGrass1: db 2 ; # db 8, 0, ABSOLUTE_TILE_ID, $fe db 8, 8, ABSOLUTE_TILE_ID | X_FLIP, $fe -; 426a -FacingGrass2: ; 426a +FacingGrass2: db 2 ; # db 9, -1, ABSOLUTE_TILE_ID, $fe db 9, 9, ABSOLUTE_TILE_ID | X_FLIP, $fe -; 4273 diff --git a/data/sprites/map_objects.asm b/data/sprites/map_objects.asm index cf577869a75..10afaf57b2d 100644 --- a/data/sprites/map_objects.asm +++ b/data/sprites/map_objects.asm @@ -1,4 +1,4 @@ -SpriteMovementData:: ; 4273 +SpriteMovementData:: ; entries correspond to SPRITEMOVEDATA_* constants ; SPRITEMOVEDATA_00 @@ -304,5 +304,3 @@ SpriteMovementData:: ; 4273 db 0 ; flags1 db 0 ; flags2 db 0 ; palette flags - -; 4357 diff --git a/data/sprites/sprite_mons.asm b/data/sprites/sprite_mons.asm index d3000e2b778..3d53804dbff 100644 --- a/data/sprites/sprite_mons.asm +++ b/data/sprites/sprite_mons.asm @@ -1,4 +1,4 @@ -SpriteMons: ; 14495 +SpriteMons: ; entries correspond to SPRITE_* constants past SPRITE_POKEMON db UNOWN db GEODUDE @@ -35,4 +35,3 @@ SpriteMons: ; 14495 db GYARADOS db LUGIA db HO_OH -; 144b8 diff --git a/data/sprites/sprites.asm b/data/sprites/sprites.asm index 6a44bea4274..b55593c9771 100644 --- a/data/sprites/sprites.asm +++ b/data/sprites/sprites.asm @@ -4,7 +4,7 @@ overworld_sprite: MACRO db \2 tiles, BANK(\1), \3, \4 ENDM -OverworldSprites: ; 14736 +OverworldSprites: ; entries correspond to SPRITE_* constants overworld_sprite ChrisSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED overworld_sprite ChrisBikeSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED diff --git a/data/text/mail_input_chars.asm b/data/text/mail_input_chars.asm index ca3833529b7..ac76e71eb4b 100644 --- a/data/text/mail_input_chars.asm +++ b/data/text/mail_input_chars.asm @@ -1,19 +1,17 @@ ; see engine/naming_screen.asm -MailEntry_Uppercase: ; 122dd +MailEntry_Uppercase: db "A B C D E F G H I J" db "K L M N O P Q R S T" db "U V W X Y Z , ? !" db "1 2 3 4 5 6 7 8 9 0" db " é ♂ ♀ ¥ … ×" db "lower DEL END " -; 1224f -MailEntry_Lowercase: ; 1224f +MailEntry_Lowercase: db "a b c d e f g h i j" db "k l m n o p q r s t" db "u v w x y z . - /" db "'d 'l 'm 'r 's 't 'v & ( )" db "“ ” [ ] ' : ; " db "UPPER DEL END " -; 122c1 diff --git a/data/text/unused_gen1_trainer_names.asm b/data/text/unused_gen1_trainer_names.asm index b3d60569d29..fa839f36665 100644 --- a/data/text/unused_gen1_trainer_names.asm +++ b/data/text/unused_gen1_trainer_names.asm @@ -1,4 +1,4 @@ -Gen1TrainerClassNames: ; 50a42 +Gen1TrainerClassNames: ; Untranslated trainer class names from Red. dw .Youngster dw .BugCatcher diff --git a/data/text_buffers.asm b/data/text_buffers.asm index 7dd7af4289f..7c28c11e09e 100644 --- a/data/text_buffers.asm +++ b/data/text_buffers.asm @@ -1,4 +1,4 @@ -StringBufferPointers:: ; 24000 +StringBufferPointers:: ; entries correspond to arguments for text_buffer (TX_STRINGBUFFER) dw wStringBuffer3 ; 0 dw wStringBuffer4 ; 1 diff --git a/data/tilesets.asm b/data/tilesets.asm index 82052f1e8e6..b652a01ad6d 100644 --- a/data/tilesets.asm +++ b/data/tilesets.asm @@ -10,7 +10,7 @@ ENDM ; - The *PalMap are defined in gfx/tileset_palette_maps.asm ; - The *Anim are defined in engine/tileset_anims.asm -Tilesets:: ; 4d596 +Tilesets:: ; entries correspond to TILESET_* constants tileset Tileset0 tileset TilesetJohto @@ -49,4 +49,3 @@ Tilesets:: ; 4d596 tileset TilesetKabutoWordRoom tileset TilesetOmanyteWordRoom tileset TilesetAerodactylWordRoom -; 4d7c1 diff --git a/data/trainers/attributes.asm b/data/trainers/attributes.asm index b64e2b3b43b..364f62492a4 100644 --- a/data/trainers/attributes.asm +++ b/data/trainers/attributes.asm @@ -1,4 +1,4 @@ -TrainerClassAttributes: ; 3959c +TrainerClassAttributes: ; entries correspond to trainer classes (see constants/trainer_constants.asm) ; Falkner @@ -403,4 +403,3 @@ TrainerClassAttributes: ; 3959c dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY dw CONTEXT_USE | SWITCH_SOMETIMES -; 39771 diff --git a/data/trainers/class_names.asm b/data/trainers/class_names.asm index 48d81f91049..66c9534925e 100644 --- a/data/trainers/class_names.asm +++ b/data/trainers/class_names.asm @@ -1,4 +1,4 @@ -TrainerClassNames:: ; 2c1ef +TrainerClassNames:: ; entries correspond to trainer classes (see constants/trainer_constants.asm) db "LEADER@" db "LEADER@" diff --git a/data/trainers/dvs.asm b/data/trainers/dvs.asm index 20188096c3e..5ed883681c5 100644 --- a/data/trainers/dvs.asm +++ b/data/trainers/dvs.asm @@ -1,4 +1,4 @@ -TrainerClassDVs: ; 270d6 +TrainerClassDVs: ; entries correspond to trainer classes (see constants/trainer_constants.asm) ; atk,def,spd,spc dn 9, 10, 7, 7 ; FALKNER @@ -68,4 +68,3 @@ TrainerClassDVs: ; 270d6 dn 9, 8, 8, 8 ; OFFICER dn 7, 14, 10, 8 ; GRUNTF dn 9, 8, 8, 8 ; MYSTICALMAN -; 2715c diff --git a/data/trainers/gendered_trainers.asm b/data/trainers/gendered_trainers.asm index 90df4c5f823..c3ff6ffd457 100644 --- a/data/trainers/gendered_trainers.asm +++ b/data/trainers/gendered_trainers.asm @@ -1,6 +1,6 @@ ; Used by GetMobileOTTrainerClass -MaleTrainers: ; 4e95d +MaleTrainers: db BURGLAR db YOUNGSTER db SCHOOLBOY @@ -28,7 +28,7 @@ MaleTrainers: ; 4e95d db SCIENTIST .End -FemaleTrainers: ; 4e976 +FemaleTrainers: db MEDIUM db LASS db BEAUTY diff --git a/data/trainers/genders.asm b/data/trainers/genders.asm index e9e78f4bf75..1bfc925d2b5 100644 --- a/data/trainers/genders.asm +++ b/data/trainers/genders.asm @@ -1,6 +1,6 @@ ; Used by BattleTowerText -BTTrainerClassGenders: ; 11f2f0 +BTTrainerClassGenders: ; entries correspond to trainer classes db MALE ; FALKNER db FEMALE ; WHITNEY @@ -68,4 +68,3 @@ BTTrainerClassGenders: ; 11f2f0 db MALE ; BLUE db MALE ; OFFICER db FEMALE ; GRUNTF -; 11f332 diff --git a/data/trainers/palettes.asm b/data/trainers/palettes.asm index c502846c468..130c867bc37 100644 --- a/data/trainers/palettes.asm +++ b/data/trainers/palettes.asm @@ -1,4 +1,4 @@ -TrainerPalettes: ; b0ce +TrainerPalettes: ; entries correspond to trainer classes PlayerPalette: ; Chris uses the same colors as Cal @@ -71,4 +71,3 @@ INCLUDE "gfx/trainers/blue.pal" INCLUDE "gfx/trainers/officer.pal" INCLUDE "gfx/trainers/grunt_f.pal" INCLUDE "gfx/trainers/mysticalman.pal" -; b1de diff --git a/data/types/names.asm b/data/types/names.asm index ca810aea3e6..2fe9e959c47 100644 --- a/data/types/names.asm +++ b/data/types/names.asm @@ -1,4 +1,4 @@ -TypeNames: ; 5097b +TypeNames: ; entries correspond to types (see constants/type_constants.asm) dw Normal dw Fighting @@ -49,4 +49,3 @@ Steel: db "STEEL@" Dragon: db "DRAGON@" Dark: db "DARK@" -; 50a28 diff --git a/data/types/search_strings.asm b/data/types/search_strings.asm index 7e6eb71c278..d03d2786b9c 100644 --- a/data/types/search_strings.asm +++ b/data/types/search_strings.asm @@ -1,4 +1,4 @@ -PokedexTypeSearchStrings: ; 40fe4 +PokedexTypeSearchStrings: ; entries correspond with PokedexTypeSearchConversionTable (see data/types/search_types.asm) db " ---- @" db " NORMAL @" @@ -18,4 +18,3 @@ PokedexTypeSearchStrings: ; 40fe4 db " DRAGON @" db " DARK @" db " STEEL @" -; 41086 diff --git a/data/types/search_types.asm b/data/types/search_types.asm index 2c5dbd4f4f5..a87ec09930d 100644 --- a/data/types/search_types.asm +++ b/data/types/search_types.asm @@ -1,4 +1,4 @@ -PokedexTypeSearchConversionTable: ; 410f6 +PokedexTypeSearchConversionTable: ; entries correspond with PokedexTypeSearchStrings (see data/types/search_strings.asm) db NORMAL db FIRE @@ -17,4 +17,3 @@ PokedexTypeSearchConversionTable: ; 410f6 db DRAGON db DARK db STEEL -; 41107 diff --git a/data/types/type_boost_items.asm b/data/types/type_boost_items.asm index 3b7231a59c8..5b965c4fbd6 100644 --- a/data/types/type_boost_items.asm +++ b/data/types/type_boost_items.asm @@ -1,4 +1,4 @@ -TypeBoostItems: ; 35703 +TypeBoostItems: db HELD_NORMAL_BOOST, NORMAL ; PINK_BOW/POLKADOT_BOW db HELD_FIGHTING_BOOST, FIGHTING ; BLACKBELT db HELD_FLYING_BOOST, FLYING ; SHARP_BEAK @@ -17,4 +17,3 @@ TypeBoostItems: ; 35703 db HELD_DARK_BOOST, DARK ; BLACKGLASSES db HELD_STEEL_BOOST, STEEL ; METAL_COAT db -1 -; 35726 diff --git a/data/types/type_matchups.asm b/data/types/type_matchups.asm index 3cd0f609bc6..04bfc3cd1d6 100644 --- a/data/types/type_matchups.asm +++ b/data/types/type_matchups.asm @@ -1,4 +1,4 @@ -TypeMatchups: ; 34bb1 +TypeMatchups: ; attacker, defender, *= db NORMAL, ROCK, NOT_VERY_EFFECTIVE db NORMAL, STEEL, NOT_VERY_EFFECTIVE @@ -116,4 +116,3 @@ TypeMatchups: ; 34bb1 db FIGHTING, GHOST, NO_EFFECT db -1 ; end -; 34cfd diff --git a/data/wild/bug_contest_mons.asm b/data/wild/bug_contest_mons.asm index c3cdeaa8a03..7971270388f 100644 --- a/data/wild/bug_contest_mons.asm +++ b/data/wild/bug_contest_mons.asm @@ -1,4 +1,4 @@ -ContestMons: ; 97d87 +ContestMons: ; %, species, min, max db 20, CATERPIE, 7, 18 db 20, WEEDLE, 7, 18 @@ -11,4 +11,3 @@ ContestMons: ; 97d87 db 5, SCYTHER, 13, 14 db 5, PINSIR, 13, 14 db -1, VENOMOTH, 30, 40 -; 97db3 diff --git a/data/wild/fish.asm b/data/wild/fish.asm index ee8299ccb3e..919a75c150b 100644 --- a/data/wild/fish.asm +++ b/data/wild/fish.asm @@ -5,7 +5,7 @@ fishgroup: MACRO dbwww \1, \2, \3, \4 ENDM -FishGroups: ; 92488 +FishGroups: ; entries correspond to FISHGROUP_* constants fishgroup 50 percent + 1, .Shore_Old, .Shore_Good, .Shore_Super fishgroup 50 percent + 1, .Ocean_Old, .Ocean_Good, .Ocean_Super @@ -21,192 +21,191 @@ FishGroups: ; 92488 fishgroup 50 percent + 1, .Remoraid_Old, .Remoraid_Good, .Remoraid_Super fishgroup 50 percent + 1, .Qwilfish_NoSwarm_Old, .Qwilfish_NoSwarm_Good, .Qwilfish_NoSwarm_Super -.Shore_Old: ; 924e3 +.Shore_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, KRABBY, 10 -.Shore_Good: ; 924ec +.Shore_Good: db 35 percent, MAGIKARP, 20 db 70 percent, KRABBY, 20 db 90 percent + 1, KRABBY, 20 db 100 percent, time_group 0 -.Shore_Super: ; 924f8 +.Shore_Super: db 40 percent, KRABBY, 40 db 70 percent, time_group 1 db 90 percent + 1, KRABBY, 40 db 100 percent, KINGLER, 40 -.Ocean_Old: ; 92504 +.Ocean_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, TENTACOOL, 10 -.Ocean_Good: ; 9250d +.Ocean_Good: db 35 percent, MAGIKARP, 20 db 70 percent, TENTACOOL, 20 db 90 percent + 1, CHINCHOU, 20 db 100 percent, time_group 2 -.Ocean_Super: ; 92519 +.Ocean_Super: db 40 percent, CHINCHOU, 40 db 70 percent, time_group 3 db 90 percent + 1, TENTACRUEL, 40 db 100 percent, LANTURN, 40 -.Lake_Old: ; 92525 +.Lake_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, GOLDEEN, 10 -.Lake_Good: ; 9252e +.Lake_Good: db 35 percent, MAGIKARP, 20 db 70 percent, GOLDEEN, 20 db 90 percent + 1, GOLDEEN, 20 db 100 percent, time_group 4 -.Lake_Super: ; 9253a +.Lake_Super: db 40 percent, GOLDEEN, 40 db 70 percent, time_group 5 db 90 percent + 1, MAGIKARP, 40 db 100 percent, SEAKING, 40 -.Pond_Old: ; 92546 +.Pond_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, POLIWAG, 10 -.Pond_Good: ; 9254f +.Pond_Good: db 35 percent, MAGIKARP, 20 db 70 percent, POLIWAG, 20 db 90 percent + 1, POLIWAG, 20 db 100 percent, time_group 6 -.Pond_Super: ; 9255b +.Pond_Super: db 40 percent, POLIWAG, 40 db 70 percent, time_group 7 db 90 percent + 1, MAGIKARP, 40 db 100 percent, POLIWAG, 40 -.Dratini_Old: ; 92567 +.Dratini_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, MAGIKARP, 10 -.Dratini_Good: ; 92570 +.Dratini_Good: db 35 percent, MAGIKARP, 20 db 70 percent, MAGIKARP, 20 db 90 percent + 1, MAGIKARP, 20 db 100 percent, time_group 8 -.Dratini_Super: ; 9257c +.Dratini_Super: db 40 percent, MAGIKARP, 40 db 70 percent, time_group 9 db 90 percent + 1, MAGIKARP, 40 db 100 percent, DRAGONAIR, 40 -.Qwilfish_Swarm_Old: ; 92588 +.Qwilfish_Swarm_Old: db 70 percent + 1, MAGIKARP, 5 db 85 percent + 1, MAGIKARP, 5 db 100 percent, QWILFISH, 5 -.Qwilfish_Swarm_Good: ; 92591 +.Qwilfish_Swarm_Good: db 35 percent, MAGIKARP, 20 db 70 percent, QWILFISH, 20 db 90 percent + 1, QWILFISH, 20 db 100 percent, time_group 10 -.Qwilfish_Swarm_Super: ; 9259d +.Qwilfish_Swarm_Super: db 40 percent, QWILFISH, 40 db 70 percent, time_group 11 db 90 percent + 1, QWILFISH, 40 db 100 percent, QWILFISH, 40 -.Remoraid_Swarm_Old: ; 925a9 +.Remoraid_Swarm_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, REMORAID, 10 -.Remoraid_Swarm_Good: ; 925b2 +.Remoraid_Swarm_Good: db 35 percent, MAGIKARP, 20 db 70 percent, REMORAID, 20 db 90 percent + 1, REMORAID, 20 db 100 percent, time_group 12 -.Remoraid_Swarm_Super: ; 925be +.Remoraid_Swarm_Super: db 40 percent, REMORAID, 40 db 70 percent, time_group 13 db 90 percent + 1, REMORAID, 40 db 100 percent, REMORAID, 40 -.Gyarados_Old: ; 925ca +.Gyarados_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, MAGIKARP, 10 -.Gyarados_Good: ; 925d3 +.Gyarados_Good: db 35 percent, MAGIKARP, 20 db 70 percent, MAGIKARP, 20 db 90 percent + 1, MAGIKARP, 20 db 100 percent, time_group 14 -.Gyarados_Super: ; 925df +.Gyarados_Super: db 40 percent, MAGIKARP, 40 db 70 percent, time_group 15 db 90 percent + 1, MAGIKARP, 40 db 100 percent, MAGIKARP, 40 -.Dratini_2_Old: ; 925eb +.Dratini_2_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, MAGIKARP, 10 -.Dratini_2_Good: ; 925f4 +.Dratini_2_Good: db 35 percent, MAGIKARP, 10 db 70 percent, MAGIKARP, 10 db 90 percent + 1, MAGIKARP, 10 db 100 percent, time_group 16 -.Dratini_2_Super: ; 92600 +.Dratini_2_Super: db 40 percent, MAGIKARP, 10 db 70 percent, time_group 17 db 90 percent + 1, MAGIKARP, 10 db 100 percent, DRAGONAIR, 10 -.WhirlIslands_Old: ; 9260c +.WhirlIslands_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, KRABBY, 10 -.WhirlIslands_Good: ; 92615 +.WhirlIslands_Good: db 35 percent, MAGIKARP, 20 db 70 percent, KRABBY, 20 db 90 percent + 1, KRABBY, 20 db 100 percent, time_group 18 -.WhirlIslands_Super: ; 92621 +.WhirlIslands_Super: db 40 percent, KRABBY, 40 db 70 percent, time_group 19 db 90 percent + 1, KINGLER, 40 db 100 percent, SEADRA, 40 .Qwilfish_NoSwarm_Old: -.Qwilfish_Old: ; 9262d +.Qwilfish_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, TENTACOOL, 10 .Qwilfish_NoSwarm_Good: -.Qwilfish_Good: ; 92636 +.Qwilfish_Good: db 35 percent, MAGIKARP, 20 db 70 percent, TENTACOOL, 20 db 90 percent + 1, TENTACOOL, 20 db 100 percent, time_group 20 .Qwilfish_NoSwarm_Super: -.Qwilfish_Super: ; 92642 +.Qwilfish_Super: db 40 percent, TENTACOOL, 40 db 70 percent, time_group 21 db 90 percent + 1, MAGIKARP, 40 db 100 percent, QWILFISH, 40 -.Remoraid_Old: ; 9264e +.Remoraid_Old: db 70 percent + 1, MAGIKARP, 10 db 85 percent + 1, MAGIKARP, 10 db 100 percent, POLIWAG, 10 -.Remoraid_Good: ; 92657 +.Remoraid_Good: db 35 percent, MAGIKARP, 20 db 70 percent, POLIWAG, 20 db 90 percent + 1, POLIWAG, 20 db 100 percent, time_group 6 -.Remoraid_Super: ; 92663 +.Remoraid_Super: db 40 percent, POLIWAG, 40 db 70 percent, time_group 7 db 90 percent + 1, MAGIKARP, 40 db 100 percent, REMORAID, 40 -; 9266f -TimeFishGroups: ; 9266f +TimeFishGroups: ; day nite db CORSOLA, 20, STARYU, 20 ; 0 db CORSOLA, 40, STARYU, 40 ; 1 @@ -230,4 +229,3 @@ TimeFishGroups: ; 9266f db HORSEA, 40, HORSEA, 40 ; 19 db TENTACOOL, 20, TENTACOOL, 20 ; 20 db TENTACOOL, 40, TENTACOOL, 40 ; 21 -; 926c7 diff --git a/data/wild/flee_mons.asm b/data/wild/flee_mons.asm index 2c235d2e648..ae2a3a569f5 100644 --- a/data/wild/flee_mons.asm +++ b/data/wild/flee_mons.asm @@ -1,7 +1,7 @@ FleeMons: ; referenced by TryEnemyFlee and FastBallMultiplier -SometimesFleeMons: ; 3c59a +SometimesFleeMons: db MAGNEMITE db GRIMER db TANGELA @@ -17,7 +17,7 @@ SometimesFleeMons: ; 3c59a db HERACROSS db -1 -OftenFleeMons: ; 3c5a8 +OftenFleeMons: db CUBONE db ARTICUNO db ZAPDOS @@ -28,8 +28,7 @@ OftenFleeMons: ; 3c5a8 db TEDDIURSA db -1 -AlwaysFleeMons: ; 3c5b1 +AlwaysFleeMons: db RAIKOU db ENTEI db -1 -; 3c5b4 diff --git a/data/wild/probabilities.asm b/data/wild/probabilities.asm index 1813603c20a..bf3144bbee9 100644 --- a/data/wild/probabilities.asm +++ b/data/wild/probabilities.asm @@ -3,7 +3,7 @@ mon_prob: MACRO db \1, \2 * 2 ENDM -GrassMonProbTable: ; 2a1cb +GrassMonProbTable: mon_prob 30, 0 ; 30% chance mon_prob 60, 1 ; 30% chance mon_prob 80, 2 ; 20% chance @@ -11,10 +11,8 @@ GrassMonProbTable: ; 2a1cb mon_prob 95, 4 ; 5% chance mon_prob 99, 5 ; 4% chance mon_prob 100, 6 ; 1% chance -; 2a1d9 -WaterMonProbTable: ; 2a1d9 +WaterMonProbTable: mon_prob 60, 0 ; 60% chance mon_prob 90, 1 ; 30% chance mon_prob 100, 2 ; 10% chance -; 2a1df diff --git a/data/wild/roammon_maps.asm b/data/wild/roammon_maps.asm index a57f561b287..747dffae1aa 100644 --- a/data/wild/roammon_maps.asm +++ b/data/wild/roammon_maps.asm @@ -11,7 +11,7 @@ endr db 0 ENDM -RoamMaps: ; 2a40f +RoamMaps: ; there are NUM_ROAMMON_MAPS entries ; start map, ...other maps roam_map ROUTE_29, ROUTE_30, ROUTE_46 @@ -31,4 +31,3 @@ RoamMaps: ; 2a40f roam_map ROUTE_45, ROUTE_44, ROUTE_46 roam_map ROUTE_46, ROUTE_45, ROUTE_29 db -1 ; end -; 2a4a0 diff --git a/data/wild/treemon_maps.asm b/data/wild/treemon_maps.asm index 8bc742a3efd..b8596239907 100644 --- a/data/wild/treemon_maps.asm +++ b/data/wild/treemon_maps.asm @@ -3,7 +3,7 @@ treemon_map: MACRO db \2 ; treemon set ENDM -TreeMonMaps: ; b825e +TreeMonMaps: treemon_map ROUTE_26, TREEMON_SET_KANTO treemon_map ROUTE_27, TREEMON_SET_KANTO treemon_map ROUTE_28, TREEMON_SET_CITY @@ -39,12 +39,10 @@ TreeMonMaps: ; b825e treemon_map SILVER_CAVE_OUTSIDE, TREEMON_SET_CITY treemon_map ILEX_FOREST, TREEMON_SET_FOREST db -1 -; b82c5 -RockMonMaps: ; b82c5 +RockMonMaps: treemon_map CIANWOOD_CITY, TREEMON_SET_ROCK treemon_map ROUTE_40, TREEMON_SET_ROCK treemon_map DARK_CAVE_VIOLET_ENTRANCE, TREEMON_SET_ROCK treemon_map SLOWPOKE_WELL_B1F, TREEMON_SET_ROCK db -1 -; b82d2 diff --git a/data/wild/treemons.asm b/data/wild/treemons.asm index 5a29d675cdc..a6b1922f3ad 100644 --- a/data/wild/treemons.asm +++ b/data/wild/treemons.asm @@ -1,4 +1,4 @@ -TreeMons: ; b82e8 +TreeMons: ; entries correspond to TREEMON_SET_* constants dw TreeMonSet_City dw TreeMonSet_Canyon @@ -15,7 +15,7 @@ TreeMons: ; b82e8 ; db %, species, level TreeMonSet_City: -TreeMonSet_Canyon: ; b82fa +TreeMonSet_Canyon: ; common db 50, SPEAROW, 10 db 15, SPEAROW, 10 @@ -33,7 +33,7 @@ TreeMonSet_Canyon: ; b82fa db 5, AIPOM, 10 db -1 -TreeMonSet_Town: ; b8320 +TreeMonSet_Town: ; common db 50, SPEAROW, 10 db 15, EKANS, 10 @@ -51,7 +51,7 @@ TreeMonSet_Town: ; b8320 db 5, AIPOM, 10 db -1 -TreeMonSet_Route: ; b8346 +TreeMonSet_Route: ; common db 50, HOOTHOOT, 10 db 15, SPINARAK, 10 @@ -69,7 +69,7 @@ TreeMonSet_Route: ; b8346 db 5, EXEGGCUTE, 10 db -1 -TreeMonSet_Kanto: ; b836c +TreeMonSet_Kanto: ; common db 50, HOOTHOOT, 10 db 15, EKANS, 10 @@ -87,7 +87,7 @@ TreeMonSet_Kanto: ; b836c db 5, EXEGGCUTE, 10 db -1 -TreeMonSet_Lake: ; b8392 +TreeMonSet_Lake: ; common db 50, HOOTHOOT, 10 db 15, VENONAT, 10 @@ -105,7 +105,7 @@ TreeMonSet_Lake: ; b8392 db 5, EXEGGCUTE, 10 db -1 -TreeMonSet_Forest: ; b83b8 +TreeMonSet_Forest: ; common db 50, HOOTHOOT, 10 db 15, PINECO, 10 @@ -123,8 +123,7 @@ TreeMonSet_Forest: ; b83b8 db 5, KAKUNA, 10 db -1 -TreeMonSet_Rock: ; b83de +TreeMonSet_Rock: db 90, KRABBY, 15 db 10, SHUCKLE, 15 db -1 -; b83e5 diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm index 218ecd37576..14817f414ce 100644 --- a/engine/battle/ai/items.asm +++ b/engine/battle/ai/items.asm @@ -1,4 +1,4 @@ -AI_SwitchOrTryItem: ; 38000 +AI_SwitchOrTryItem: and a ld a, [wBattleMode] @@ -38,12 +38,11 @@ AI_SwitchOrTryItem: ; 38000 jp nz, SwitchSometimes ; fallthrough -DontSwitch: ; 38041 +DontSwitch: call AI_TryItem ret -; 38045 -SwitchOften: ; 38045 +SwitchOften: callfar CheckAbleToSwitch ld a, [wEnemySwitchMonParam] and $f0 @@ -77,9 +76,8 @@ SwitchOften: ; 38045 ; In register 'a' is the number (1-6) of the mon to switch to ld [wEnemySwitchMonIndex], a jp AI_TrySwitch -; 38083 -SwitchRarely: ; 38083 +SwitchRarely: callfar CheckAbleToSwitch ld a, [wEnemySwitchMonParam] and $f0 @@ -112,9 +110,8 @@ SwitchRarely: ; 38083 inc a ld [wEnemySwitchMonIndex], a jp AI_TrySwitch -; 380c1 -SwitchSometimes: ; 380c1 +SwitchSometimes: callfar CheckAbleToSwitch ld a, [wEnemySwitchMonParam] and $f0 @@ -147,17 +144,15 @@ SwitchSometimes: ; 380c1 inc a ld [wEnemySwitchMonIndex], a jp AI_TrySwitch -; 380ff -CheckSubstatusCantRun: ; 380ff +CheckSubstatusCantRun: ld a, [wEnemySubStatus5] bit SUBSTATUS_CANT_RUN, a ret -; 38105 -AI_TryItem: ; 38105 +AI_TryItem: ; items are not allowed in the BattleTower ld a, [wInBattleTowerBattle] and a @@ -244,7 +239,7 @@ AI_TryItem: ; 38105 ret -.IsHighestLevel: ; 38170 +.IsHighestLevel: ld a, [wOTPartyCount] ld d, a ld e, 0 @@ -274,10 +269,9 @@ AI_TryItem: ; 38105 .yes scf ret -; 38196 -AI_Items: ; 39196 +AI_Items: dbw FULL_RESTORE, .FullRestore dbw MAX_POTION, .MaxPotion dbw HYPER_POTION, .HyperPotion @@ -292,16 +286,14 @@ AI_Items: ; 39196 dbw X_SPEED, .XSpeed dbw X_SPECIAL, .XSpecial db -1 ; end -; 381be -.FullHeal: ; 381be +.FullHeal: call .Status jp c, .DontUse call EnemyUsedFullHeal jp .Use -; 381ca -.Status: ; 381ca (e:41ca) +.Status: ld a, [wEnemyMonStatus] and a jp z, .DontUse @@ -332,9 +324,8 @@ AI_Items: ; 39196 and 1 << FRZ | SLP jp z, .DontUse jp .Use -; 38208 -.FullRestore: ; 38208 +.FullRestore: call .HealItem jp nc, .UseFullRestore ld a, [bc] @@ -346,15 +337,14 @@ AI_Items: ; 39196 .UseFullRestore: call EnemyUsedFullRestore jp .Use -; 38220 -.MaxPotion: ; 38220 +.MaxPotion: call .HealItem jp c, .DontUse call EnemyUsedMaxPotion jp .Use -.HealItem: ; 3822c (e:422c) +.HealItem: ld a, [bc] bit CONTEXT_USE_F, a jr nz, .CheckHalfOrQuarterHP @@ -370,7 +360,7 @@ AI_Items: ; 39196 jp c, .UseHealItem jp .DontUse -.CheckQuarterHP: ; 38254 (e:4254) +.CheckQuarterHP: callfar AICheckEnemyQuarterHP jp c, .DontUse call Random @@ -378,7 +368,7 @@ AI_Items: ; 39196 jp c, .DontUse jr .UseHealItem -.CheckHalfOrQuarterHP: ; 38267 (e:4267) +.CheckHalfOrQuarterHP: callfar AICheckEnemyHalfHP jp c, .DontUse callfar AICheckEnemyQuarterHP @@ -387,33 +377,29 @@ AI_Items: ; 39196 cp 20 percent - 1 jp nc, .DontUse -.UseHealItem: ; 38281 (e:4281) +.UseHealItem: jp .Use -; 38284 -.HyperPotion: ; 38284 +.HyperPotion: call .HealItem jp c, .DontUse ld b, 200 call EnemyUsedHyperPotion jp .Use -; 38292 (e:4292) -.SuperPotion: ; 38292 +.SuperPotion: call .HealItem jp c, .DontUse ld b, 50 call EnemyUsedSuperPotion jp .Use -; 382a0 -.Potion: ; 382a0 +.Potion: call .HealItem jp c, .DontUse ld b, 20 call EnemyUsedPotion jp .Use -; 382ae .asm_382ae ; This appears to be unused callfar AICheckEnemyMaxHP @@ -457,58 +443,50 @@ AI_Items: ; 39196 cp 39 percent + 1 jp c, .Use jp .DontUse -; 382f9 -.XAccuracy: ; 382f9 +.XAccuracy: call .XItem jp c, .DontUse call EnemyUsedXAccuracy jp .Use -; 38305 -.GuardSpec: ; 38305 +.GuardSpec: call .XItem jp c, .DontUse call EnemyUsedGuardSpec jp .Use -; 38311 -.DireHit: ; 38311 +.DireHit: call .XItem jp c, .DontUse call EnemyUsedDireHit jp .Use -; 3831d (e:431d) -.XAttack: ; 3831d +.XAttack: call .XItem jp c, .DontUse call EnemyUsedXAttack jp .Use -; 38329 -.XDefend: ; 38329 +.XDefend: call .XItem jp c, .DontUse call EnemyUsedXDefend jp .Use -; 38335 -.XSpeed: ; 38335 +.XSpeed: call .XItem jp c, .DontUse call EnemyUsedXSpeed jp .Use -; 38341 -.XSpecial: ; 38341 +.XSpecial: call .XItem jp c, .DontUse call EnemyUsedXSpecial jp .Use -; 3834d -.XItem: ; 3834d (e:434d) +.XItem: ld a, [wEnemyTurnsTaken] and a jr nz, .notfirstturnout @@ -543,7 +521,7 @@ AI_Items: ; 39196 ret -AIUpdateHUD: ; 38387 +AIUpdateHUD: call UpdateEnemyMonInParty farcall UpdateEnemyHUD ld a, $1 @@ -552,29 +530,27 @@ AIUpdateHUD: ; 38387 dec [hl] scf ret -; 3839a -AIUsedItemSound: ; 3839a +AIUsedItemSound: push de ld de, SFX_FULL_HEAL call PlaySFX pop de ret -; 383a3 -EnemyUsedFullHeal: ; 383a3 (e:43a3) +EnemyUsedFullHeal: call AIUsedItemSound call AI_HealStatus ld a, FULL_HEAL jp PrintText_UsedItemOn_AND_AIUpdateHUD -EnemyUsedMaxPotion: ; 383ae (e:43ae) +EnemyUsedMaxPotion: ld a, MAX_POTION ld [wCurEnemyItem], a jr FullRestoreContinue -EnemyUsedFullRestore: ; 383b5 (e:43b5) +EnemyUsedFullRestore: call AI_HealStatus ld a, FULL_RESTORE ld [wCurEnemyItem], a @@ -583,7 +559,7 @@ EnemyUsedFullRestore: ; 383b5 (e:43b5) xor a ld [wEnemyConfuseCount], a -FullRestoreContinue: ; 383c6 +FullRestoreContinue: ld de, wCurHPAnimOldHP ld hl, wEnemyMonHP + 1 ld a, [hld] @@ -603,23 +579,22 @@ FullRestoreContinue: ; 383c6 ld [wCurHPAnimMaxHP + 1], a ld [wEnemyMonHP], a jr EnemyPotionFinish -; 383e8 (e:43e8) -EnemyUsedPotion: ; 383e8 +EnemyUsedPotion: ld a, POTION ld b, 20 jr EnemyPotionContinue -EnemyUsedSuperPotion: ; 383ee +EnemyUsedSuperPotion: ld a, SUPER_POTION ld b, 50 jr EnemyPotionContinue -EnemyUsedHyperPotion: ; 383f4 (e:43f4) +EnemyUsedHyperPotion: ld a, HYPER_POTION ld b, 200 -EnemyPotionContinue: ; 383f8 +EnemyPotionContinue: ld [wCurEnemyItem], a ld hl, wEnemyMonHP + 1 ld a, [hl] @@ -658,7 +633,7 @@ EnemyPotionContinue: ; 383f8 ld [hl], a ld [wCurHPAnimNewHP + 1], a -EnemyPotionFinish: ; 38436 +EnemyPotionFinish: call PrintText_UsedItemOn hlcoord 2, 2 xor a @@ -668,7 +643,7 @@ EnemyPotionFinish: ; 38436 jp AIUpdateHUD -AI_TrySwitch: ; 3844b +AI_TrySwitch: ; Determine whether the AI can switch based on how many Pokemon are still alive. ; If it can switch, it will. ld a, [wOTPartyCount] @@ -695,9 +670,8 @@ AI_TrySwitch: ; 3844b jp nc, AI_Switch and a ret -; 3846c -AI_Switch: ; 3846c +AI_Switch: ld a, $1 ld [wEnemyIsSwitching], a ld [wEnemyGoesFirst], a @@ -739,21 +713,18 @@ AI_Switch: ; 3846c ret nz scf ret -; 384d0 -TextJump_EnemyWithdrew: ; 384d0 +TextJump_EnemyWithdrew: text_jump Text_EnemyWithdrew db "@" -; 384d5 Function384d5: ; This appears to be unused call AIUsedItemSound call AI_HealStatus ld a, FULL_HEAL_RED ; X_SPEED jp PrintText_UsedItemOn_AND_AIUpdateHUD -; 384e0 -AI_HealStatus: ; 384e0 +AI_HealStatus: ld a, [wCurOTMon] ld hl, wOTPartyMon1Status ld bc, PARTYMON_STRUCT_LENGTH @@ -768,31 +739,27 @@ AI_HealStatus: ; 384e0 ld hl, wEnemySubStatus5 res SUBSTATUS_TOXIC, [hl] ret -; 384f7 -EnemyUsedXAccuracy: ; 384f7 +EnemyUsedXAccuracy: call AIUsedItemSound ld hl, wEnemySubStatus4 set SUBSTATUS_X_ACCURACY, [hl] ld a, X_ACCURACY jp PrintText_UsedItemOn_AND_AIUpdateHUD -; 38504 -EnemyUsedGuardSpec: ; 38504 +EnemyUsedGuardSpec: call AIUsedItemSound ld hl, wEnemySubStatus4 set SUBSTATUS_MIST, [hl] ld a, GUARD_SPEC jp PrintText_UsedItemOn_AND_AIUpdateHUD -; 38511 -EnemyUsedDireHit: ; 38511 +EnemyUsedDireHit: call AIUsedItemSound ld hl, wEnemySubStatus4 set SUBSTATUS_FOCUS_ENERGY, [hl] ld a, DIRE_HIT jp PrintText_UsedItemOn_AND_AIUpdateHUD -; 3851e Function3851e: ; This appears to be unused ld [hDivisor], a @@ -818,27 +785,23 @@ Function3851e: ; This appears to be unused ld a, e sub c ret -; 38541 -EnemyUsedXAttack: ; 38541 +EnemyUsedXAttack: ld b, ATTACK ld a, X_ATTACK jr EnemyUsedXItem -; 38547 -EnemyUsedXDefend: ; 38547 +EnemyUsedXDefend: ld b, DEFENSE ld a, X_DEFEND jr EnemyUsedXItem -; 3854d -EnemyUsedXSpeed: ; 3854d +EnemyUsedXSpeed: ld b, SPEED ld a, X_SPEED jr EnemyUsedXItem -; 38553 -EnemyUsedXSpecial: ; 38553 +EnemyUsedXSpecial: ld b, SP_ATTACK ld a, X_SPECIAL @@ -853,18 +816,16 @@ EnemyUsedXItem: pop bc farcall CheckIfStatCanBeRaised jp AIUpdateHUD -; 38568 ; Parameter ; a = ITEM_CONSTANT -PrintText_UsedItemOn_AND_AIUpdateHUD: ; 38568 +PrintText_UsedItemOn_AND_AIUpdateHUD: ld [wCurEnemyItem], a call PrintText_UsedItemOn jp AIUpdateHUD -; 38571 -PrintText_UsedItemOn: ; 38571 +PrintText_UsedItemOn: ld a, [wCurEnemyItem] ld [wd265], a call GetItemName @@ -874,9 +835,7 @@ PrintText_UsedItemOn: ; 38571 call CopyBytes ld hl, TextJump_EnemyUsedOn jp PrintText -; 3858c -TextJump_EnemyUsedOn: ; 3858c +TextJump_EnemyUsedOn: text_jump Text_EnemyUsedOn db "@" -; 38591 diff --git a/engine/battle/ai/move.asm b/engine/battle/ai/move.asm index dd4357fe21d..488ea76caca 100644 --- a/engine/battle/ai/move.asm +++ b/engine/battle/ai/move.asm @@ -1,4 +1,4 @@ -AIChooseMove: ; 440ce +AIChooseMove: ; Score each move in wEnemyMonMoves starting from wBuffer1. Lower is better. ; Pick the move with the lowest score. @@ -198,10 +198,9 @@ AIChooseMove: ; 440ce ld a, c ld [wCurEnemyMoveNum], a ret -; 441af -AIScoringPointers: ; 441af +AIScoringPointers: ; entries correspond to AI_* constants dw AI_Basic dw AI_Setup @@ -219,4 +218,3 @@ AIScoringPointers: ; 441af dw AI_None dw AI_None dw AI_None -; 441cf diff --git a/engine/battle/ai/redundant.asm b/engine/battle/ai/redundant.asm index d09b4da7376..d78fccb8470 100644 --- a/engine/battle/ai/redundant.asm +++ b/engine/battle/ai/redundant.asm @@ -1,4 +1,4 @@ -AI_Redundant: ; 2c41a +AI_Redundant: ; Check if move effect c will fail because it's already been used. ; Return z if the move is a good choice. ; Return nz if the move is a bad choice. @@ -13,7 +13,7 @@ AI_Redundant: ; 2c41a ld l, a jp hl -.Moves: ; 2c42c +.Moves: dbw EFFECT_DREAM_EATER, .DreamEater dbw EFFECT_HEAL, .Heal dbw EFFECT_LIGHT_SCREEN, .LightScreen @@ -46,22 +46,22 @@ AI_Redundant: ; 2c41a dbw EFFECT_FUTURE_SIGHT, .FutureSight db -1 -.LightScreen: ; 2c487 +.LightScreen: ld a, [wEnemyScreens] bit SCREENS_LIGHT_SCREEN, a ret -.Mist: ; 2c48d +.Mist: ld a, [wEnemySubStatus4] bit SUBSTATUS_MIST, a ret -.FocusEnergy: ; 2c493 +.FocusEnergy: ld a, [wEnemySubStatus4] bit SUBSTATUS_FOCUS_ENERGY, a ret -.Confuse: ; 2c499 +.Confuse: ld a, [wPlayerSubStatus3] bit SUBSTATUS_CONFUSED, a ret nz @@ -69,49 +69,49 @@ AI_Redundant: ; 2c41a bit SCREENS_SAFEGUARD, a ret -.Transform: ; 2c4a5 +.Transform: ld a, [wEnemySubStatus5] bit SUBSTATUS_TRANSFORMED, a ret -.Reflect: ; 2c4ab +.Reflect: ld a, [wEnemyScreens] bit SCREENS_REFLECT, a ret -.Substitute: ; 2c4b1 +.Substitute: ld a, [wEnemySubStatus4] bit SUBSTATUS_SUBSTITUTE, a ret -.LeechSeed: ; 2c4b7 +.LeechSeed: ld a, [wPlayerSubStatus4] bit SUBSTATUS_LEECH_SEED, a ret -.Disable: ; 2c4bd +.Disable: ld a, [wPlayerDisableCount] and a ret -.Encore: ; 2c4c2 +.Encore: ld a, [wPlayerSubStatus5] bit SUBSTATUS_ENCORED, a ret .Snore: -.SleepTalk: ; 2c4c8 +.SleepTalk: ld a, [wEnemyMonStatus] and SLP jr z, .Redundant jr .NotRedundant -.MeanLook: ; 2c4d1 +.MeanLook: ld a, [wEnemySubStatus5] bit SUBSTATUS_CANT_RUN, a ret -.Nightmare: ; 2c4d7 +.Nightmare: ld a, [wBattleMonStatus] and a jr z, .Redundant @@ -119,63 +119,63 @@ AI_Redundant: ; 2c41a bit SUBSTATUS_NIGHTMARE, a ret -.Spikes: ; 2c4e3 +.Spikes: ld a, [wPlayerScreens] bit SCREENS_SPIKES, a ret -.Foresight: ; 2c4e9 +.Foresight: ld a, [wPlayerSubStatus1] bit SUBSTATUS_IDENTIFIED, a ret -.PerishSong: ; 2c4ef +.PerishSong: ld a, [wPlayerSubStatus1] bit SUBSTATUS_PERISH, a ret -.Sandstorm: ; 2c4f5 +.Sandstorm: ld a, [wBattleWeather] cp WEATHER_SANDSTORM jr z, .Redundant jr .NotRedundant -.Attract: ; 2c4fe +.Attract: farcall CheckOppositeGender jr c, .Redundant ld a, [wPlayerSubStatus1] bit SUBSTATUS_IN_LOVE, a ret -.Safeguard: ; 2c50c +.Safeguard: ld a, [wEnemyScreens] bit SCREENS_SAFEGUARD, a ret -.RainDance: ; 2c512 +.RainDance: ld a, [wBattleWeather] cp WEATHER_RAIN jr z, .Redundant jr .NotRedundant -.SunnyDay: ; 2c51b +.SunnyDay: ld a, [wBattleWeather] cp WEATHER_SUN jr z, .Redundant jr .NotRedundant -.DreamEater: ; 2c524 +.DreamEater: ld a, [wBattleMonStatus] and SLP jr z, .Redundant jr .NotRedundant -.Swagger: ; 2c52d +.Swagger: ld a, [wPlayerSubStatus3] bit SUBSTATUS_CONFUSED, a ret -.FutureSight: ; 2c533 +.FutureSight: ld a, [wEnemyScreens] bit 5, a ret @@ -183,16 +183,16 @@ AI_Redundant: ; 2c41a .Heal: .MorningSun: .Synthesis: -.Moonlight: ; 2c539 +.Moonlight: farcall AICheckEnemyMaxHP jr nc, .NotRedundant .Teleport: -.Redundant: ; 2c541 +.Redundant: ld a, 1 and a ret -.NotRedundant: ; 2c545 +.NotRedundant: xor a ret diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm index d000fab5fc8..128e9841b3a 100644 --- a/engine/battle/ai/scoring.asm +++ b/engine/battle/ai/scoring.asm @@ -1,6 +1,6 @@ AIScoring: ; used only for BANK(AIScoring) -AI_Basic: ; 38591 +AI_Basic: ; Don't do anything redundant: ; -Using status-only moves if the player can't be statused ; -Using moves that fail if they've already been used @@ -61,13 +61,12 @@ AI_Basic: ; 38591 .discourage call AIDiscourageMove jr .checkmove -; 385db INCLUDE "data/battle/ai/status_only_effects.asm" -AI_Setup: ; 385e0 +AI_Setup: ; Use stat-modifying moves on turn 1. ; 50% chance to greatly encourage stat-up moves during the first turn of enemy's Pokemon. @@ -140,11 +139,10 @@ AI_Setup: ; 385e0 inc [hl] inc [hl] jr .checkmove -; 38635 -AI_Types: ; 38635 +AI_Types: ; Dismiss any move that the player is immune to. ; Encourage super-effective moves. ; Discourage not very effective moves unless @@ -232,11 +230,10 @@ AI_Types: ; 38635 .immune call AIDiscourageMove jr .checkmove -; 386a2 -AI_Offensive: ; 386a2 +AI_Offensive: ; Greatly discourage non-damaging moves. ld hl, wBuffer1 - 1 @@ -261,11 +258,10 @@ AI_Offensive: ; 386a2 inc [hl] inc [hl] jr .checkmove -; 386be -AI_Smart: ; 386be +AI_Smart: ; Context-specific scoring. ld hl, wBuffer1 @@ -395,10 +391,9 @@ AI_Smart: ; 386be dbw EFFECT_THUNDER, AI_Smart_Thunder dbw EFFECT_FLY, AI_Smart_Fly db -1 ; end -; 387e3 -AI_Smart_Sleep: ; 387e3 +AI_Smart_Sleep: ; Greatly encourage sleep inducing moves if the enemy has either Dream Eater or Nightmare. ; 50% chance to greatly encourage sleep inducing moves otherwise. @@ -416,10 +411,9 @@ AI_Smart_Sleep: ; 387e3 dec [hl] dec [hl] ret -; 387f7 -AI_Smart_LeechHit: ; 387f7 +AI_Smart_LeechHit: push hl ld a, 1 ld [hBattleTurn], a @@ -452,10 +446,9 @@ AI_Smart_LeechHit: ; 387f7 inc [hl] ret -; 3881d -AI_Smart_LockOn: ; 3881d +AI_Smart_LockOn: ld a, [wPlayerSubStatus5] bit SUBSTATUS_LOCK_ON, a jr nz, .asm_38882 @@ -558,10 +551,9 @@ AI_Smart_LockOn: ; 3881d .asm_388a2 pop hl jp AIDiscourageMove -; 388a6 -AI_Smart_Selfdestruct: ; 388a6 +AI_Smart_Selfdestruct: ; Selfdestruct, Explosion ; Unless this is the enemy's last Pokemon... @@ -596,10 +588,9 @@ AI_Smart_Selfdestruct: ; 388a6 inc [hl] inc [hl] ret -; 388ca -AI_Smart_DreamEater: ; 388ca +AI_Smart_DreamEater: ; 90% chance to greatly encourage this move. ; The AI_Basic layer will make sure that ; Dream Eater is only used against sleeping targets. @@ -610,10 +601,9 @@ AI_Smart_DreamEater: ; 388ca dec [hl] dec [hl] ret -; 388d4 -AI_Smart_EvasionUp: ; 388d4 +AI_Smart_EvasionUp: ; Dismiss this move if enemy's evasion can't raise anymore. ld a, [wEnemyEvaLevel] @@ -723,10 +713,9 @@ AI_Smart_EvasionUp: ; 388d4 dec [hl] ret -; 38947 -AI_Smart_AlwaysHit: ; 38947 +AI_Smart_AlwaysHit: ; 80% chance to greatly encourage this move if either... ; ...enemy's accuracy level has been lowered three or more stages @@ -746,10 +735,9 @@ AI_Smart_AlwaysHit: ; 38947 dec [hl] dec [hl] ret -; 3895b -AI_Smart_MirrorMove: ; 3895b +AI_Smart_MirrorMove: ; If the player did not use any move last turn... ld a, [wLastPlayerCounterMove] @@ -790,10 +778,9 @@ AI_Smart_MirrorMove: ; 3895b dec [hl] ret -; 38985 -AI_Smart_AccuracyDown: ; 38985 +AI_Smart_AccuracyDown: ; If player's HP is full... call AICheckPlayerMaxHP @@ -897,10 +884,9 @@ AI_Smart_AccuracyDown: ; 38985 dec [hl] ret -; 389f5 -AI_Smart_ResetStats: ; 389f5 +AI_Smart_ResetStats: ; 85% chance to encourage this move if any of enemy's stat levels is lower than -2. push hl @@ -940,10 +926,9 @@ AI_Smart_ResetStats: ; 389f5 pop hl inc [hl] ret -; 38a1e -AI_Smart_Bide: ; 38a1e +AI_Smart_Bide: ; 90% chance to discourage this move unless enemy's HP is full. call AICheckEnemyMaxHP @@ -953,10 +938,9 @@ AI_Smart_Bide: ; 38a1e ret c inc [hl] ret -; 38a2a -AI_Smart_ForceSwitch: ; 38a2a +AI_Smart_ForceSwitch: ; Whirlwind, Roar. ; Discourage this move if the player has not shown @@ -971,13 +955,12 @@ AI_Smart_ForceSwitch: ; 38a2a ret c inc [hl] ret -; 38a3a AI_Smart_Heal: AI_Smart_MorningSun: AI_Smart_Synthesis: -AI_Smart_Moonlight: ; 38a3a +AI_Smart_Moonlight: ; 90% chance to greatly encourage this move if enemy's HP is below 25%. ; Discourage this move if enemy's HP is higher than 50%. ; Do nothing otherwise. @@ -996,22 +979,20 @@ AI_Smart_Moonlight: ; 38a3a dec [hl] dec [hl] ret -; 38a4e AI_Smart_Toxic: -AI_Smart_LeechSeed: ; 38a4e +AI_Smart_LeechSeed: ; Discourage this move if player's HP is below 50%. call AICheckPlayerHalfHP ret c inc [hl] ret -; 38a54 AI_Smart_LightScreen: -AI_Smart_Reflect: ; 38a54 +AI_Smart_Reflect: ; Over 90% chance to discourage this move unless enemy's HP is full. call AICheckEnemyMaxHP @@ -1021,10 +1002,9 @@ AI_Smart_Reflect: ; 38a54 ret c inc [hl] ret -; 38a60 -AI_Smart_Ohko: ; 38a60 +AI_Smart_Ohko: ; Dismiss this move if player's level is higher than enemy's level. ; Else, discourage this move is player's HP is below 50%. @@ -1037,10 +1017,9 @@ AI_Smart_Ohko: ; 38a60 ret c inc [hl] ret -; 38a71 -AI_Smart_TrapTarget: ; 38a71 +AI_Smart_TrapTarget: ; Bind, Wrap, Fire Spin, Clamp ; 50% chance to discourage this move if the player is already trapped. @@ -1078,11 +1057,10 @@ AI_Smart_TrapTarget: ; 38a71 dec [hl] dec [hl] ret -; 38a9c AI_Smart_RazorWind: -AI_Smart_Unused2B: ; 38a9c +AI_Smart_Unused2B: ld a, [wEnemySubStatus1] bit SUBSTATUS_PERISH, a jr z, .asm_38aaa @@ -1133,10 +1111,9 @@ AI_Smart_Unused2B: ; 38a9c add 6 ld [hl], a ret -; 38adb -AI_Smart_Confuse: ; 38adb +AI_Smart_Confuse: ; 90% chance to discourage this move if player's HP is between 25% and 50%. call AICheckPlayerHalfHP @@ -1152,10 +1129,9 @@ AI_Smart_Confuse: ; 38adb ret c inc [hl] ret -; 38aed -AI_Smart_SpDefenseUp2: ; 38aed +AI_Smart_SpDefenseUp2: ; Discourage this move if enemy's HP is lower than 50%. call AICheckEnemyHalfHP @@ -1188,10 +1164,9 @@ AI_Smart_SpDefenseUp2: ; 38aed .asm_38b10 inc [hl] ret -; 38b12 -AI_Smart_Fly: ; 38b12 +AI_Smart_Fly: ; Fly, Dig ; Greatly encourage this move if the player is @@ -1208,20 +1183,18 @@ AI_Smart_Fly: ; 38b12 dec [hl] dec [hl] ret -; 38b20 -AI_Smart_SuperFang: ; 38b20 +AI_Smart_SuperFang: ; Discourage this move if player's HP is below 25%. call AICheckPlayerQuarterHP ret c inc [hl] ret -; 38b26 -AI_Smart_Paralyze: ; 38b26 +AI_Smart_Paralyze: ; 50% chance to discourage this move if player's HP is below 25%. call AICheckPlayerQuarterHP @@ -1244,10 +1217,9 @@ AI_Smart_Paralyze: ; 38b26 ret c inc [hl] ret -; 38b40 -AI_Smart_SpeedDownHit: ; 38b40 +AI_Smart_SpeedDownHit: ; Icy Wind ; Almost 90% chance to greatly encourage this move if the following conditions all meet: @@ -1271,19 +1243,17 @@ AI_Smart_SpeedDownHit: ; 38b40 dec [hl] dec [hl] ret -; 38b5c -AI_Smart_Substitute: ; 38b5c +AI_Smart_Substitute: ; Dismiss this move if enemy's HP is below 50%. call AICheckEnemyHalfHP ret c jp AIDiscourageMove -; 38b63 -AI_Smart_HyperBeam: ; 38b63 +AI_Smart_HyperBeam: call AICheckEnemyHalfHP jr c, .asm_38b72 @@ -1305,10 +1275,9 @@ AI_Smart_HyperBeam: ; 38b63 ret c inc [hl] ret -; 38b7f -AI_Smart_Rage: ; 38b7f +AI_Smart_Rage: ld a, [wEnemySubStatus4] bit SUBSTATUS_RAGE, a jr z, .asm_38b9b @@ -1345,10 +1314,9 @@ AI_Smart_Rage: ; 38b7f .asm_38ba6 inc [hl] ret -; 38ba8 -AI_Smart_Mimic: ; 38ba8 +AI_Smart_Mimic: ld a, [wLastPlayerCounterMove] and a jr z, .asm_38be9 @@ -1396,10 +1364,9 @@ AI_Smart_Mimic: ; 38ba8 .asm_38bef inc [hl] ret -; 38bf1 -AI_Smart_Counter: ; 38bf1 +AI_Smart_Counter: push hl ld hl, wPlayerUsedMoves ld c, 4 @@ -1462,10 +1429,9 @@ AI_Smart_Counter: ; 38bf1 .asm_38c39 inc [hl] ret -; 38c3b -AI_Smart_Encore: ; 38c3b +AI_Smart_Encore: call AICompareSpeed jr nc, .asm_38c81 @@ -1519,7 +1485,7 @@ AI_Smart_Encore: ; 38c3b INCLUDE "data/battle/ai/encore_moves.asm" -AI_Smart_PainSplit: ; 38ca4 +AI_Smart_PainSplit: ; Discourage this move if [enemy's current HP * 2 > player's current HP]. push hl @@ -1538,11 +1504,10 @@ AI_Smart_PainSplit: ; 38ca4 ret nc inc [hl] ret -; 38cba AI_Smart_Snore: -AI_Smart_SleepTalk: ; 38cba +AI_Smart_SleepTalk: ; Greatly encourage this move if enemy is fast asleep. ; Greatly discourage this move otherwise. @@ -1561,10 +1526,9 @@ AI_Smart_SleepTalk: ; 38cba inc [hl] inc [hl] ret -; 38ccb -AI_Smart_DefrostOpponent: ; 38ccb +AI_Smart_DefrostOpponent: ; Greatly encourage this move if enemy is frozen. ; No move has EFFECT_DEFROST_OPPONENT, so this layer is unused. @@ -1575,10 +1539,9 @@ AI_Smart_DefrostOpponent: ; 38ccb dec [hl] dec [hl] ret -; 38cd5 -AI_Smart_Spite: ; 38cd5 +AI_Smart_Spite: ld a, [wLastPlayerCounterMove] and a jr nz, .asm_38ce7 @@ -1633,27 +1596,24 @@ AI_Smart_Spite: ; 38cd5 dec [hl] dec [hl] ret -; 38d16 -Function_0x38d16; 38d16 +Function_0x38d16 jp AIDiscourageMove -; 38d19 AI_Smart_DestinyBond: AI_Smart_Reversal: -AI_Smart_SkullBash: ; 38d19 +AI_Smart_SkullBash: ; Discourage this move if enemy's HP is above 25%. call AICheckEnemyQuarterHP ret nc inc [hl] ret -; 38d1f -AI_Smart_HealBell: ; 38d1f +AI_Smart_HealBell: ; Dismiss this move if none of the opponent's Pokemon is statused. ; Encourage this move if the enemy is statused. ; 50% chance to greatly encourage this move if the enemy is fast asleep or frozen. @@ -1709,10 +1669,9 @@ AI_Smart_HealBell: ; 38d1f ret nz jp AIDiscourageMove -; 38d5a -AI_Smart_PriorityHit: ; 38d5a +AI_Smart_PriorityHit: call AICompareSpeed ret c @@ -1742,20 +1701,18 @@ AI_Smart_PriorityHit: ; 38d5a dec [hl] dec [hl] ret -; 38d93 -AI_Smart_Thief: ; 38d93 +AI_Smart_Thief: ; Don't use Thief unless it's the only move available. ld a, [hl] add $1e ld [hl], a ret -; 38d98 -AI_Smart_Conversion2: ; 38d98 +AI_Smart_Conversion2: ld a, [wLastPlayerMove] and a jr nz, .asm_38dc9 @@ -1793,10 +1750,9 @@ AI_Smart_Conversion2: ; 38d98 ret c inc [hl] ret -; 38dd1 -AI_Smart_Disable: ; 38dd1 +AI_Smart_Disable: call AICompareSpeed jr nc, .asm_38df3 @@ -1826,10 +1782,9 @@ AI_Smart_Disable: ; 38dd1 ret c inc [hl] ret -; 38dfb -AI_Smart_MeanLook: ; 38dfb +AI_Smart_MeanLook: call AICheckEnemyHalfHP jr nc, .asm_38e24 @@ -1869,10 +1824,9 @@ AI_Smart_MeanLook: ; 38dfb dec [hl] dec [hl] ret -; 38e2e -AICheckLastPlayerMon: ; 38e2e +AICheckLastPlayerMon: ld a, [wPartyCount] ld b, a ld c, 0 @@ -1896,10 +1850,9 @@ AICheckLastPlayerMon: ; 38e2e jr nz, .loop ret -; 38e4a -AI_Smart_Nightmare: ; 38e4a +AI_Smart_Nightmare: ; 50% chance to encourage this move. ; The AI_Basic layer will make sure that ; Dream Eater is only used against sleeping targets. @@ -1908,10 +1861,9 @@ AI_Smart_Nightmare: ; 38e4a ret c dec [hl] ret -; 38e50 -AI_Smart_FlameWheel: ; 38e50 +AI_Smart_FlameWheel: ; Use this move if the enemy is frozen. ld a, [wEnemyMonStatus] @@ -1921,10 +1873,9 @@ rept 5 dec [hl] endr ret -; 38e5c -AI_Smart_Curse: ; 38e5c +AI_Smart_Curse: ld a, [wEnemyMonType1] cp GHOST jr z, .ghostcurse @@ -2010,10 +1961,9 @@ AI_Smart_Curse: ; 38e5c dec [hl] dec [hl] ret -; 38ed2 -AI_Smart_Protect: ; 38ed2 +AI_Smart_Protect: ld a, [wEnemyProtectCount] and a jr nz, .asm_38f13 @@ -2063,10 +2013,9 @@ AI_Smart_Protect: ; 38ed2 inc [hl] inc [hl] ret -; 38f1d -AI_Smart_Foresight: ; 38f1d +AI_Smart_Foresight: ld a, [wEnemyAccLevel] cp $5 jr c, .asm_38f41 @@ -2094,10 +2043,9 @@ AI_Smart_Foresight: ; 38f1d dec [hl] dec [hl] ret -; 38f4a -AI_Smart_PerishSong: ; 38f4a +AI_Smart_PerishSong: push hl callfar FindAliveEnemyMons pop hl @@ -2132,10 +2080,9 @@ AI_Smart_PerishSong: ; 38f4a add 5 ld [hl], a ret -; 38f7a -AI_Smart_Sandstorm: ; 38f7a +AI_Smart_Sandstorm: ; Greatly discourage this move if the player is immune to Sandstorm damage. ld a, [wBattleMonType1] @@ -2177,10 +2124,9 @@ AI_Smart_Sandstorm: ; 38f7a db GROUND db STEEL db -1 ; end -; 38fac -AI_Smart_Endure: ; 38fac +AI_Smart_Endure: ld a, [wEnemyProtectCount] and a jr nz, .asm_38fd8 @@ -2221,10 +2167,9 @@ AI_Smart_Endure: ; 38fac .asm_38fd9 inc [hl] ret -; 38fdb -AI_Smart_FuryCutter: ; 38fdb +AI_Smart_FuryCutter: ; Encourage this move based on Fury Cutter's count. ld a, [wEnemyFuryCutterCount] @@ -2246,10 +2191,9 @@ AI_Smart_FuryCutter: ; 38fdb .end ; fallthrough -; 38fef -AI_Smart_Rollout: ; 38fef +AI_Smart_Rollout: ; Rollout, Fury Cutter ; 80% chance to discourage this move if the enemy is in love, confused, or paralyzed. @@ -2290,11 +2234,10 @@ AI_Smart_Rollout: ; 38fef ret c inc [hl] ret -; 39026 AI_Smart_Swagger: -AI_Smart_Attract: ; 39026 +AI_Smart_Attract: ; 80% chance to encourage this move during the first turn of player's Pokemon. ; 80% chance to discourage this move otherwise. @@ -2313,10 +2256,9 @@ AI_Smart_Attract: ; 39026 ret nc dec [hl] ret -; 3903a -AI_Smart_Safeguard: ; 3903a +AI_Smart_Safeguard: ; 80% chance to discourage this move if player's HP is below 50%. call AICheckPlayerHalfHP @@ -2325,11 +2267,10 @@ AI_Smart_Safeguard: ; 3903a ret c inc [hl] ret -; 39044 AI_Smart_Magnitude: -AI_Smart_Earthquake: ; 39044 +AI_Smart_Earthquake: ; Greatly encourage this move if the player is underground and the enemy is faster. ld a, [wLastPlayerCounterMove] @@ -2358,10 +2299,9 @@ AI_Smart_Earthquake: ; 39044 dec [hl] ret -; 39062 -AI_Smart_BatonPass: ; 39062 +AI_Smart_BatonPass: ; Discourage this move if the player hasn't shown super-effective moves against the enemy. ; Consider player's type(s) if its moves are unknown. @@ -2373,10 +2313,9 @@ AI_Smart_BatonPass: ; 39062 ret c inc [hl] ret -; 39072 -AI_Smart_Pursuit: ; 39072 +AI_Smart_Pursuit: ; 50% chance to greatly encourage this move if player's HP is below 25%. ; 80% chance to discourage this move otherwise. @@ -2393,10 +2332,9 @@ AI_Smart_Pursuit: ; 39072 dec [hl] dec [hl] ret -; 39084 -AI_Smart_RapidSpin: ; 39084 +AI_Smart_RapidSpin: ; 80% chance to greatly encourage this move if the enemy is ; trapped (Bind effect), seeded, or scattered with spikes. @@ -2419,10 +2357,9 @@ AI_Smart_RapidSpin: ; 39084 dec [hl] dec [hl] ret -; 3909e -AI_Smart_HiddenPower: ; 3909e +AI_Smart_HiddenPower: push hl ld a, 1 ld [hBattleTurn], a @@ -2459,10 +2396,9 @@ AI_Smart_HiddenPower: ; 3909e .bad inc [hl] ret -; 390cb -AI_Smart_RainDance: ; 390cb +AI_Smart_RainDance: ; Greatly discourage this move if it would favour the player type-wise. ; Particularly, if the player is a Water-type. @@ -2481,12 +2417,11 @@ AI_Smart_RainDance: ; 390cb push hl ld hl, RainDanceMoves jr AI_Smart_WeatherMove -; 390e7 INCLUDE "data/battle/ai/rain_dance_moves.asm" -AI_Smart_SunnyDay: ; 390f3 +AI_Smart_SunnyDay: ; Greatly discourage this move if it would favour the player type-wise. ; Particularly, if the player is a Fire-type. @@ -2506,10 +2441,9 @@ AI_Smart_SunnyDay: ; 390f3 ld hl, SunnyDayMoves ; fallthrough -; 3910d -AI_Smart_WeatherMove: ; 3910d +AI_Smart_WeatherMove: ; Rain Dance, Sunny Day ; Greatly discourage this move if the enemy doesn't have @@ -2528,16 +2462,14 @@ AI_Smart_WeatherMove: ; 3910d dec [hl] ret -; 3911e -AIBadWeatherType: ; 3911e +AIBadWeatherType: inc [hl] inc [hl] inc [hl] ret -; 39122 -AIGoodWeatherType: ; 39122 +AIGoodWeatherType: ; Rain Dance, Sunny Day ; Greatly encourage this move if it would disfavour the player type-wise and player's HP is above 50%... @@ -2559,13 +2491,12 @@ AIGoodWeatherType: ; 39122 dec [hl] dec [hl] ret -; 39134 INCLUDE "data/battle/ai/sunny_day_moves.asm" -AI_Smart_BellyDrum: ; 3913d +AI_Smart_BellyDrum: ; Dismiss this move if enemy's attack is higher than +2 or if enemy's HP is below 50%. ; Else, discourage this move if enemy's HP is not full. @@ -2586,10 +2517,9 @@ AI_Smart_BellyDrum: ; 3913d add $5 ld [hl], a ret -; 39152 -AI_Smart_PsychUp: ; 39152 +AI_Smart_PsychUp: push hl ld hl, wEnemyAtkLevel ld b, $8 @@ -2645,10 +2575,9 @@ AI_Smart_PsychUp: ; 39152 inc [hl] inc [hl] ret -; 3918b -AI_Smart_MirrorCoat: ; 3918b +AI_Smart_MirrorCoat: push hl ld hl, wPlayerUsedMoves ld c, $4 @@ -2710,11 +2639,10 @@ AI_Smart_MirrorCoat: ; 3918b .asm_391d3 inc [hl] ret -; 391d5 AI_Smart_Twister: -AI_Smart_Gust: ; 391d5 +AI_Smart_Gust: ; Greatly encourage this move if the player is flying and the enemy is faster. ld a, [wLastPlayerCounterMove] @@ -2742,10 +2670,9 @@ AI_Smart_Gust: ; 391d5 ret c dec [hl] ret -; 391f3 -AI_Smart_FutureSight: ; 391f3 +AI_Smart_FutureSight: ; Greatly encourage this move if the player is ; flying or underground, and slower than the enemy. @@ -2759,10 +2686,9 @@ AI_Smart_FutureSight: ; 391f3 dec [hl] dec [hl] ret -; 39200 -AI_Smart_Stomp: ; 39200 +AI_Smart_Stomp: ; 80% chance to encourage this move if the player has used Minimize. ld a, [wPlayerMinimized] @@ -2774,10 +2700,9 @@ AI_Smart_Stomp: ; 39200 dec [hl] ret -; 3920b -AI_Smart_Solarbeam: ; 3920b +AI_Smart_Solarbeam: ; 80% chance to encourage this move when it's sunny. ; 90% chance to discourage this move when it's raining. @@ -2803,10 +2728,9 @@ AI_Smart_Solarbeam: ; 3920b dec [hl] dec [hl] ret -; 39225 -AI_Smart_Thunder: ; 39225 +AI_Smart_Thunder: ; 90% chance to discourage this move when it's sunny. ld a, [wBattleWeather] @@ -2819,10 +2743,9 @@ AI_Smart_Thunder: ; 39225 inc [hl] ret -; 39233 -AICompareSpeed: ; 39233 +AICompareSpeed: ; Return carry if enemy is faster than player. push bc @@ -2836,30 +2759,27 @@ AICompareSpeed: ; 39233 sbc b pop bc ret -; 39246 -AICheckPlayerMaxHP: ; 39246 +AICheckPlayerMaxHP: push hl push de push bc ld de, wBattleMonHP ld hl, wBattleMonMaxHP jr AICheckMaxHP -; 39251 -AICheckEnemyMaxHP: ; 39251 +AICheckEnemyMaxHP: push hl push de push bc ld de, wEnemyMonHP ld hl, wEnemyMonMaxHP ; fallthrough -; 3925a -AICheckMaxHP: ; 3925a +AICheckMaxHP: ; Return carry if hp at de matches max hp at hl. ld a, [de] @@ -2884,10 +2804,9 @@ AICheckMaxHP: ; 3925a pop hl and a ret -; 3926e -AICheckPlayerHalfHP: ; 3926e +AICheckPlayerHalfHP: push hl ld hl, wBattleMonHP ld b, [hl] @@ -2903,10 +2822,9 @@ AICheckPlayerHalfHP: ; 3926e sbc b pop hl ret -; 39281 -AICheckEnemyHalfHP: ; 39281 +AICheckEnemyHalfHP: push hl push de push bc @@ -2926,10 +2844,9 @@ AICheckEnemyHalfHP: ; 39281 pop de pop hl ret -; 39298 -AICheckEnemyQuarterHP: ; 39298 +AICheckEnemyQuarterHP: push hl push de push bc @@ -2951,10 +2868,9 @@ AICheckEnemyQuarterHP: ; 39298 pop de pop hl ret -; 392b3 -AICheckPlayerQuarterHP: ; 392b3 +AICheckPlayerQuarterHP: push hl ld hl, wBattleMonHP ld b, [hl] @@ -2972,10 +2888,9 @@ AICheckPlayerQuarterHP: ; 392b3 sbc b pop hl ret -; 392ca -AIHasMoveEffect: ; 392ca +AIHasMoveEffect: ; Return carry if the enemy has move b. push hl @@ -3005,10 +2920,9 @@ AIHasMoveEffect: ; 392ca pop hl scf ret -; 392e6 -AIHasMoveInArray: ; 392e6 +AIHasMoveInArray: ; Return carry if the enemy has a move in array hl. push hl @@ -3040,13 +2954,12 @@ AIHasMoveInArray: ; 392e6 pop de pop hl ret -; 39301 INCLUDE "data/battle/ai/useful_moves.asm" -AI_Opportunist: ; 39315 +AI_Opportunist: ; Discourage stall moves when the enemy's HP is low. ; Do nothing if enemy's HP is above 50%. @@ -3097,7 +3010,7 @@ INCLUDE "data/battle/ai/stall_moves.asm" -AI_Aggressive: ; 39369 +AI_Aggressive: ; Use whatever does the most damage. ; Discourage all damaging moves but the one that does the most damage. @@ -3205,7 +3118,7 @@ AI_Aggressive: ; 39369 INCLUDE "data/battle/ai/reckless_moves.asm" -AIDamageCalc: ; 393e7 +AIDamageCalc: ld a, 1 ld [hBattleTurn], a ld a, [wEnemyMoveStruct + MOVE_EFFECT] @@ -3225,7 +3138,7 @@ AIDamageCalc: ; 393e7 INCLUDE "data/battle/ai/constant_damage_effects.asm" -AI_Cautious: ; 39418 +AI_Cautious: ; 90% chance to discourage moves with residual effects after the first turn. ld a, [wEnemyTurnsTaken] @@ -3268,7 +3181,7 @@ INCLUDE "data/battle/ai/residual_moves.asm" -AI_Status: ; 39453 +AI_Status: ; Dismiss status moves that don't affect the player. ld hl, wBuffer1 - 1 @@ -3328,11 +3241,10 @@ AI_Status: ; 39453 .immune call AIDiscourageMove jr .checkmove -; 394a9 -AI_Risky: ; 394a9 +AI_Risky: ; Use any move that will KO the target. ; Risky moves will often be an exception (see below). @@ -3402,20 +3314,18 @@ INCLUDE "data/battle/ai/risky_effects.asm" -AI_None: ; 39502 +AI_None: ret -; 39503 -AIDiscourageMove: ; 39503 +AIDiscourageMove: ld a, [hl] add 10 ld [hl], a ret -; 39508 -AIGetEnemyMove: ; 39508 +AIGetEnemyMove: ; Load attributes of move a into ram push hl @@ -3434,18 +3344,15 @@ AIGetEnemyMove: ; 39508 pop de pop hl ret -; 39521 -AI_80_20: ; 39521 +AI_80_20: call Random cp 20 percent - 1 ret -; 39527 -AI_50_50: ; 39527 +AI_50_50: call Random cp 50 percent + 1 ret -; 3952d diff --git a/engine/battle/ai/switch.asm b/engine/battle/ai/switch.asm index d397c8d32bc..b975776c2ce 100644 --- a/engine/battle/ai/switch.asm +++ b/engine/battle/ai/switch.asm @@ -1,4 +1,4 @@ -CheckPlayerMoveTypeMatchups: ; 3484e +CheckPlayerMoveTypeMatchups: ; Check how well the moves you've already used ; fare against the enemy's Pokemon. Used to ; score a potential switch. @@ -95,10 +95,9 @@ CheckPlayerMoveTypeMatchups: ; 3484e pop de pop hl ret -; 348de -.CheckEnemyMoveMatchups: ; 348de +.CheckEnemyMoveMatchups: ld de, wEnemyMonMoves ld b, NUM_MOVES + 1 ld c, 0 @@ -163,21 +162,19 @@ CheckPlayerMoveTypeMatchups: ; 3484e .doubledown call .DecreaseScore -.DecreaseScore: ; 34931 +.DecreaseScore: ld a, [wEnemyAISwitchScore] dec a ld [wEnemyAISwitchScore], a ret -; 34939 -.IncreaseScore: ; 34939 +.IncreaseScore: ld a, [wEnemyAISwitchScore] inc a ld [wEnemyAISwitchScore], a ret -; 34941 -CheckAbleToSwitch: ; 34941 +CheckAbleToSwitch: xor a ld [wEnemySwitchMonParam], a call FindAliveEnemyMons @@ -292,10 +289,9 @@ CheckAbleToSwitch: ; 34941 add $10 ld [wEnemySwitchMonParam], a ret -; 349f4 -FindAliveEnemyMons: ; 349f4 +FindAliveEnemyMons: ld a, [wOTPartyCount] cp 2 jr c, .only_one @@ -344,10 +340,9 @@ FindAliveEnemyMons: ; 349f4 .more_than_one and a ret -; 34a2a -FindEnemyMonsImmuneToLastCounterMove: ; 34a2a +FindEnemyMonsImmuneToLastCounterMove: ld hl, wOTPartyMon1 ld a, [wOTPartyCount] ld b, a @@ -412,10 +407,9 @@ FindEnemyMonsImmuneToLastCounterMove: ; 34a2a inc d srl c jr .loop -; 34a85 -FindAliveEnemyMonsWithASuperEffectiveMove: ; 34a85 +FindAliveEnemyMonsWithASuperEffectiveMove: push bc ld a, [wOTPartyCount] ld e, a @@ -445,7 +439,7 @@ FindAliveEnemyMonsWithASuperEffectiveMove: ; 34a85 and c ld c, a -FindEnemyMonsWithASuperEffectiveMove: ; 34aa7 +FindEnemyMonsWithASuperEffectiveMove: ld a, -1 ld [wEnemyAISwitchScore], a @@ -551,10 +545,9 @@ FindEnemyMonsWithASuperEffectiveMove: ; 34aa7 ld [wEnemyAISwitchScore], a pop bc ret -; 34b20 -FindEnemyMonsThatResistPlayer: ; 34b20 +FindEnemyMonsThatResistPlayer: push bc ld hl, wOTPartySpecies ld b, 1 << (PARTY_LENGTH - 1) @@ -613,10 +606,9 @@ FindEnemyMonsThatResistPlayer: ; 34b20 and c ld c, a ret -; 34b77 -FindEnemyMonsWithAtLeastQuarterMaxHP: ; 34b77 +FindEnemyMonsWithAtLeastQuarterMaxHP: push bc ld de, wOTPartySpecies ld b, 1 << (PARTY_LENGTH - 1) @@ -669,4 +661,3 @@ FindEnemyMonsWithAtLeastQuarterMaxHP: ; 34b77 and c ld c, a ret -; 34bb1 diff --git a/engine/battle/anim_hp_bar.asm b/engine/battle/anim_hp_bar.asm index 5c453d0ffb3..fd9c783ceaa 100644 --- a/engine/battle/anim_hp_bar.asm +++ b/engine/battle/anim_hp_bar.asm @@ -1,4 +1,4 @@ -_AnimateHPBar: ; d627 +_AnimateHPBar: call .IsMaximumMoreThan48Pixels jr c, .MoreThan48Pixels call .ComputePixels @@ -38,9 +38,8 @@ _AnimateHPBar: ; d627 pop af jr nc, .LongAnimLoop ret -; d65f -.IsMaximumMoreThan48Pixels: ; d65f +.IsMaximumMoreThan48Pixels: ld a, [wCurHPAnimMaxHP + 1] and a jr nz, .player @@ -53,9 +52,8 @@ _AnimateHPBar: ; d627 .player scf ret -; d670 -.ComputePixels: ; d670 +.ComputePixels: push hl ld hl, wCurHPAnimMaxHP ld a, [hli] @@ -127,9 +125,8 @@ _AnimateHPBar: ; d627 ld a, e ld [wCurHPAnimDeltaHP + 1], a ret -; d6e2 -ShortAnim_UpdateVariables: ; d6e2 +ShortAnim_UpdateVariables: ld hl, wCurHPBarPixels ld a, [wNewHPBarPixels] cp [hl] @@ -144,9 +141,8 @@ ShortAnim_UpdateVariables: ; d6e2 call ShortHPBar_CalcPixelFrame and a ret -; d6f5 -LongAnim_UpdateVariables: ; d6f5 +LongAnim_UpdateVariables: .loop ld hl, wCurHPAnimOldHP ld a, [hli] @@ -199,9 +195,8 @@ LongAnim_UpdateVariables: ; d6f5 ld [hl], a and a ret -; d730 -ShortHPBarAnim_UpdateTiles: ; d730 +ShortHPBarAnim_UpdateTiles: call HPBarAnim_UpdateHPRemaining ld d, HP_BAR_LENGTH ld a, [wWhichHPBar] @@ -215,9 +210,8 @@ ShortHPBarAnim_UpdateTiles: ; d730 pop de call HPBarAnim_PaletteUpdate ret -; d749 -LongHPBarAnim_UpdateTiles: ; d749 +LongHPBarAnim_UpdateTiles: call HPBarAnim_UpdateHPRemaining ld a, [wCurHPAnimOldHP] ld c, a @@ -238,9 +232,8 @@ LongHPBarAnim_UpdateTiles: ; d749 pop de call HPBarAnim_PaletteUpdate ret -; d771 -HPBarAnim_RedrawHPBar: ; d771 +HPBarAnim_RedrawHPBar: ld a, [wWhichHPBar] cp $2 jr nz, .skip @@ -253,9 +246,8 @@ HPBarAnim_RedrawHPBar: ; d771 .skip call DrawBattleHPBar ret -; d784 -HPBarAnim_UpdateHPRemaining: ; d784 +HPBarAnim_UpdateHPRemaining: ld a, [wWhichHPBar] and a ret z @@ -283,9 +275,8 @@ HPBarAnim_UpdateHPRemaining: ; d784 call PrintNum pop hl ret -; d7b4 -HPBarAnim_PaletteUpdate: ; d7b4 +HPBarAnim_PaletteUpdate: ld a, [hCGB] and a ret z @@ -295,9 +286,8 @@ HPBarAnim_PaletteUpdate: ; d7b4 ld c, a farcall ApplyHPBarPals ret -; d7c9 -HPBarAnim_BGMapUpdate: ; d7c9 +HPBarAnim_BGMapUpdate: ld a, [hCGB] and a jr nz, .cgb @@ -369,9 +359,8 @@ HPBarAnim_BGMapUpdate: ; d7c9 ld [hBGMapThird], a call DelayFrame ret -; d839 -ShortHPBar_CalcPixelFrame: ; d839 +ShortHPBar_CalcPixelFrame: ld a, [wCurHPAnimMaxHP] ld c, a ld b, 0 @@ -433,4 +422,3 @@ ShortHPBar_CalcPixelFrame: ; d839 ld a, [wCurHPAnimMaxHP] ld [wCurHPAnimOldHP], a ret -; d88c diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index 42dd440ea2b..3a9749b0313 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -6,7 +6,7 @@ BATTLETRANSITION_NO_CAVE_STRONGER EQU $18 BATTLETRANSITION_FINISH EQU $20 BATTLETRANSITION_END EQU $80 -DoBattleTransition: ; 8c20f +DoBattleTransition: call .InitGFX ld a, [rBGP] ld [wBGP], a @@ -58,9 +58,8 @@ DoBattleTransition: ; 8c20f ld [hVBlank], a call DelayFrame ret -; 8c26d -.InitGFX: ; 8c26d +.InitGFX: ld a, [wLinkMode] cp LINK_MOBILE jr z, .mobile @@ -87,14 +86,12 @@ DoBattleTransition: ; 8c20f ld [hl], a call WipeLYOverrides ret -; 8c2a0 -.NonMobile_LoadPokeballTiles: ; 8c2a0 +.NonMobile_LoadPokeballTiles: call LoadTrainerBattlePokeballTiles hlbgcoord 0, 0 call ConvertTrainerBattlePokeballTilesTo2bpp ret -; 8c2aa LoadTrainerBattlePokeballTiles: ; Load the tiles used in the Pokeball Graphic that fills the screen @@ -119,9 +116,8 @@ LoadTrainerBattlePokeballTiles: pop af ld [rVBK], a ret -; 8c2cf -ConvertTrainerBattlePokeballTilesTo2bpp: ; 8c2cf +ConvertTrainerBattlePokeballTilesTo2bpp: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -146,17 +142,15 @@ ConvertTrainerBattlePokeballTilesTo2bpp: ; 8c2cf pop af ld [rSVBK], a ret -; 8c2f4 -TrainerBattlePokeballTiles: ; 8c2f4 +TrainerBattlePokeballTiles: INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp" -BattleTransitionJumptable: ; 8c314 +BattleTransitionJumptable: jumptable .Jumptable, wJumptableIndex -; 8c323 -.Jumptable ; 8c323 (23:4323) +.Jumptable dw StartTrainerBattle_DetermineWhichAnimation ; 00 ; BATTLETRANSITION_CAVE @@ -213,7 +207,7 @@ BattleTransitionJumptable: ; 8c314 TRANS_STRONGER_F EQU 0 ; bit set in TRANS_CAVE_STRONGER and TRANS_NO_CAVE_STRONGER TRANS_NO_CAVE_F EQU 1 ; bit set in TRANS_NO_CAVE and TRANS_NO_CAVE_STRONGER -StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365) +StartTrainerBattle_DetermineWhichAnimation: ; The screen flashes a different number of times depending on the level of ; your lead Pokemon relative to the opponent's. ; BUG: wBattleMonLevel and wEnemyMonLevel are not set at this point, so whatever @@ -240,41 +234,39 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365) ld a, [hl] ld [wJumptableIndex], a ret -; 8c38f (23:438f) -.StartingPoints: ; 8c38f +.StartingPoints: ; entries correspond to TRANS_* constants db BATTLETRANSITION_CAVE db BATTLETRANSITION_CAVE_STRONGER db BATTLETRANSITION_NO_CAVE db BATTLETRANSITION_NO_CAVE_STRONGER -; 8c393 -StartTrainerBattle_Finish: ; 8c393 (23:4393) +StartTrainerBattle_Finish: call ClearSprites ld a, BATTLETRANSITION_END ld [wJumptableIndex], a ret -StartTrainerBattle_NextScene: ; 8c39c (23:439c) +StartTrainerBattle_NextScene: ld hl, wJumptableIndex inc [hl] ret -StartTrainerBattle_SetUpBGMap: ; 8c3a1 (23:43a1) +StartTrainerBattle_SetUpBGMap: call StartTrainerBattle_NextScene xor a ld [wcf64], a ld [hBGMapMode], a ret -StartTrainerBattle_Flash: ; 8c3ab (23:43ab) +StartTrainerBattle_Flash: call .DoFlashAnimation ret nc call StartTrainerBattle_NextScene ret -.DoFlashAnimation: ; 8c3b3 (23:43b3) +.DoFlashAnimation: ld a, [wTimeOfDayPalset] cp %11111111 ; dark cave jr z, .done @@ -299,9 +291,8 @@ StartTrainerBattle_Flash: ; 8c3ab (23:43ab) ld [wcf64], a scf ret -; 8c3db (23:43db) -.pals ; 8c3db +.pals db %11111001 ; 3321 db %11111110 ; 3332 db %11111111 ; 3333 @@ -315,9 +306,8 @@ StartTrainerBattle_Flash: ; 8c3ab (23:43ab) db %10010000 ; 2100 db %11100100 ; 3210 db %00000001 ; 0001 -; 8c3e8 -StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8) +StartTrainerBattle_SetUpForWavyOutro: farcall Function5602 ld a, BANK(wLYOverrides) ld [rSVBK], a @@ -335,7 +325,7 @@ StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8) ld [wcf65], a ret -StartTrainerBattle_SineWave: ; 8c408 (23:4408) +StartTrainerBattle_SineWave: ld a, [wcf64] cp $60 jr nc, .end @@ -347,7 +337,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408) ld [wJumptableIndex], a ret -.DoSineWave: ; 8c419 (23:4419) +.DoSineWave: ld hl, wcf65 ld a, [hl] inc [hl] @@ -375,7 +365,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408) jr nz, .loop ret -StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d) +StartTrainerBattle_SetUpForSpinOutro: farcall Function5602 ld a, BANK(wLYOverrides) ld [rSVBK], a @@ -384,7 +374,7 @@ StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d) ld [wcf64], a ret -StartTrainerBattle_SpinToBlack: ; 8c44f (23:444f) +StartTrainerBattle_SpinToBlack: xor a ld [hBGMapMode], a ld a, [wcf64] @@ -418,7 +408,6 @@ endr ld a, BATTLETRANSITION_FINISH ld [wJumptableIndex], a ret -; 8c490 (23:4490) ; quadrants const_def @@ -431,7 +420,7 @@ endr RIGHT_QUADRANT_F EQU 0 ; bit set in UPPER_RIGHT and LOWER_RIGHT LOWER_QUADRANT_F EQU 1 ; bit set in LOWER_LEFT and LOWER_RIGHT -.spintable ; 8c490 +.spintable spintable_entry: MACRO db \1 dw .wedge\2 @@ -458,9 +447,8 @@ ENDM spintable_entry LOWER_LEFT, 2, 0, 14 spintable_entry LOWER_LEFT, 1, 1, 11 db -1 -; 8c4f5 -.load ; 8c4f5 (23:44f5) +.load ld a, [hli] ld e, a ld a, [hli] @@ -512,16 +500,14 @@ ENDM dec c jr nz, .loop2 jr .loop -; 8c538 (23:4538) .wedge1 db 2, 3, 5, 4, 9, -1 .wedge2 db 1, 1, 2, 2, 4, 2, 4, 2, 3, -1 .wedge3 db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, -1 .wedge4 db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, -1 .wedge5 db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1 -; 8c578 -StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578) +StartTrainerBattle_SetUpForRandomScatterOutro: farcall Function5602 ld a, BANK(wLYOverrides) ld [rSVBK], a @@ -532,7 +518,7 @@ StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578) ld [hBGMapMode], a ret -StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f) +StartTrainerBattle_SpeckleToBlack: ld hl, wcf64 ld a, [hl] and a @@ -559,7 +545,7 @@ StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f) ld [wJumptableIndex], a ret -.BlackOutRandomTile: ; 8c5b8 (23:45b8) +.BlackOutRandomTile: .y_loop call Random cp SCREEN_HEIGHT @@ -590,7 +576,7 @@ StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f) ld [hl], $ff ret -StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc) +StartTrainerBattle_LoadPokeBallGraphics: ld a, [wOtherTrainerClass] and a jp z, .nextscene ; don't need to be here if wild @@ -690,11 +676,11 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc) call DelayFrame call BattleStart_CopyTilemapAtOnce -.nextscene ; 8c673 (23:4673) +.nextscene call StartTrainerBattle_NextScene ret -.copypals ; 8c677 (23:4677) +.copypals ld de, wBGPals1 palette PAL_BG_TEXT call .copy ld de, wBGPals2 palette PAL_BG_TEXT @@ -707,21 +693,18 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc) call .copy ld de, wOBPals2 palette PAL_OW_ROCK -.copy ; 8c698 (23:4698) +.copy push hl ld bc, 1 palettes call CopyBytes pop hl ret -; 8c6a1 (23:46a1) -.daypals ; 8c6a1 +.daypals INCLUDE "gfx/overworld/trainer_battle_day.pal" -; 8c6a9 -.nightpals ; 8c6a9 +.nightpals INCLUDE "gfx/overworld/trainer_battle_nite.pal" -; 8c6b1 .loadpokeballgfx ld a, [wOtherTrainerClass] @@ -746,7 +729,7 @@ PokeBallTransition: db %00001111, %11110000 db %00000011, %11000000 -WipeLYOverrides: ; 8c6d8 +WipeLYOverrides: ld a, [rSVBK] push af ld a, BANK(wLYOverrides) @@ -760,9 +743,8 @@ WipeLYOverrides: ; 8c6d8 pop af ld [rSVBK], a ret -; 8c6ef -.wipe ; 8c6ef +.wipe xor a ld c, SCREEN_HEIGHT_PX .loop @@ -770,14 +752,12 @@ WipeLYOverrides: ; 8c6d8 dec c jr nz, .loop ret -; 8c6f7 -StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7) +StartTrainerBattle_DrawSineWave: calc_sine_wave -; 8c768 -StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768) +StartTrainerBattle_ZoomToBlack: farcall Function5602 ld de, .boxes @@ -806,9 +786,8 @@ StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768) ld a, BATTLETRANSITION_FINISH ld [wJumptableIndex], a ret -; 8c792 (23:4792) -.boxes ; 8c792 +.boxes zoombox: MACRO ; width, height, start y, start x db \1, \2 @@ -824,9 +803,8 @@ ENDM zoombox 18, 16, 1, 1 zoombox 20, 18, 0, 0 db -1 -; 8c7b7 -.Copy: ; 8c7b7 (23:47b7) +.Copy: ld a, $ff .row push bc @@ -842,7 +820,6 @@ ENDM dec b jr nz, .row ret -; 8c7c9 (23:47c9) Unreferenced_Function8c7c9: ld a, $1 diff --git a/engine/battle/battlestart_copytilemapatonce.asm b/engine/battle/battlestart_copytilemapatonce.asm index 2952e833bc7..9d4d48d3a08 100644 --- a/engine/battle/battlestart_copytilemapatonce.asm +++ b/engine/battle/battlestart_copytilemapatonce.asm @@ -1,3 +1,3 @@ -BattleStart_CopyTilemapAtOnce: ; 8cf4f +BattleStart_CopyTilemapAtOnce: call CGBOnly_CopyTilemapAtOnce ret diff --git a/engine/battle/check_battle_scene.asm b/engine/battle/check_battle_scene.asm index 577c36e33cd..13d0c665eb0 100644 --- a/engine/battle/check_battle_scene.asm +++ b/engine/battle/check_battle_scene.asm @@ -1,4 +1,4 @@ -CheckBattleScene: ; 4ea44 +CheckBattleScene: ; Return carry if battle scene is turned off. ld a, BANK(wLinkMode) diff --git a/engine/battle/consume_held_item.asm b/engine/battle/consume_held_item.asm index d727a44e0b9..fe63d40a890 100644 --- a/engine/battle/consume_held_item.asm +++ b/engine/battle/consume_held_item.asm @@ -1,4 +1,4 @@ -ConsumeHeldItem: ; 27192 +ConsumeHeldItem: push hl push de push bc diff --git a/engine/battle/core.asm b/engine/battle/core.asm index f7e461c8027..892ecd990ca 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1,6 +1,6 @@ ; Core components of the battle engine. -DoBattle: ; 3c000 +DoBattle: xor a ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsIncludingFainted], a @@ -114,9 +114,8 @@ DoBattle: ; 3c000 .tutorial_debug jp BattleMenu -; 3c0e5 -WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5 +WildFled_EnemyFled_LinkBattleCanceled: call Call_LoadTempTileMapToTileMap ld a, [wBattleResult] and BATTLERESULT_BITMASK @@ -156,9 +155,8 @@ WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5 ld a, 1 ld [wBattleEnded], a ret -; 3c12f -BattleTurn: ; 3c12f +BattleTurn: .loop call Stubbed_Function3c1bf call CheckContestBattleOver @@ -229,7 +227,6 @@ BattleTurn: ; 3c12f .quit ret -; 3c1bf Stubbed_Function3c1bf: ret @@ -248,9 +245,8 @@ Stubbed_Function3c1bf: .finish call CloseSRAM ret -; 3c1d6 -HandleBetweenTurnEffects: ; 3c1d6 +HandleBetweenTurnEffects: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .CheckEnemyFirst @@ -297,9 +293,8 @@ HandleBetweenTurnEffects: ; 3c1d6 call UpdateBattleMonInParty call LoadTileMapToTempTileMap jp HandleEncore -; 3c23c -CheckFaint_PlayerThenEnemy: ; 3c23c +CheckFaint_PlayerThenEnemy: call HasPlayerFainted jr nz, .PlayerNotFainted call HandlePlayerMonFaint @@ -322,9 +317,8 @@ CheckFaint_PlayerThenEnemy: ; 3c23c .BattleIsOver: scf ret -; 3c25c -CheckFaint_EnemyThenPlayer: ; 3c25c +CheckFaint_EnemyThenPlayer: call HasEnemyFainted jr nz, .EnemyNotFainted call HandleEnemyMonFaint @@ -347,9 +341,8 @@ CheckFaint_EnemyThenPlayer: ; 3c25c .BattleIsOver: scf ret -; 3c27c -HandleBerserkGene: ; 3c27c +HandleBerserkGene: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .reverse @@ -424,9 +417,8 @@ HandleBerserkGene: ; 3c27c call SwitchTurnCore ld hl, BecameConfusedText jp StdBattleTextBox -; 3c300 -EnemyTriesToFlee: ; 3c300 +EnemyTriesToFlee: ld a, [wLinkMode] and a jr z, .not_linked @@ -442,9 +434,8 @@ EnemyTriesToFlee: ; 3c300 call WildFled_EnemyFled_LinkBattleCanceled scf ret -; 3c314 -DetermineMoveOrder: ; 3c314 +DetermineMoveOrder: ld a, [wLinkMode] and a jr z, .use_move @@ -560,14 +551,12 @@ DetermineMoveOrder: ; 3c314 .player_first scf ret -; 3c3f3 -.enemy_first ; 3c3f3 +.enemy_first and a ret -; 3c3f5 -CheckContestBattleOver: ; 3c3f5 +CheckContestBattleOver: ld a, [wBattleType] cp BATTLETYPE_CONTEST jr nz, .contest_not_over @@ -584,9 +573,8 @@ CheckContestBattleOver: ; 3c3f5 .contest_not_over and a ret -; 3c410 -CheckPlayerLockedIn: ; 3c410 +CheckPlayerLockedIn: ld a, [wPlayerSubStatus4] and 1 << SUBSTATUS_RECHARGE jp nz, .quit @@ -610,9 +598,8 @@ CheckPlayerLockedIn: ; 3c410 .quit scf ret -; 3c434 -ParsePlayerAction: ; 3c434 +ParsePlayerAction: call CheckPlayerLockedIn jp c, .locked_in ld hl, wPlayerSubStatus5 @@ -706,9 +693,8 @@ ParsePlayerAction: ; 3c434 res SUBSTATUS_RAGE, [hl] xor a ret -; 3c4df -HandleEncore: ; 3c4df +HandleEncore: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .player_1 @@ -764,9 +750,8 @@ HandleEncore: ; 3c4df call SetPlayerTurn ld hl, BattleText_TargetsEncoreEnded jp StdBattleTextBox -; 3c543 -TryEnemyFlee: ; 3c543 +TryEnemyFlee: ld a, [wBattleMode] dec a jr nz, .Stay @@ -819,11 +804,10 @@ TryEnemyFlee: ; 3c543 .Flee: scf ret -; 3c59a INCLUDE "data/wild/flee_mons.asm" -CompareMovePriority: ; 3c5b4 +CompareMovePriority: ; Compare the priority of the player and enemy's moves. ; Return carry if the player goes first, or z if they match. @@ -836,9 +820,8 @@ CompareMovePriority: ; 3c5b4 pop bc cp b ret -; 3c5c5 -GetMovePriority: ; 3c5c5 +GetMovePriority: ; Return the priority (0-3) of move a. ld b, a @@ -864,11 +847,10 @@ GetMovePriority: ; 3c5c5 .done ld a, [hl] ret -; 3c5df INCLUDE "data/moves/effects_priorities.asm" -GetMoveEffect: ; 3c5ec +GetMoveEffect: ld a, b dec a ld hl, Moves + MOVE_EFFECT @@ -878,9 +860,8 @@ GetMoveEffect: ; 3c5ec call GetFarByte ld b, a ret -; 3c5fe -Battle_EnemyFirst: ; 3c5fe +Battle_EnemyFirst: call LoadTileMapToTempTileMap call TryEnemyFlee jp c, WildFled_EnemyFled_LinkBattleCanceled @@ -922,9 +903,8 @@ Battle_EnemyFirst: ; 3c5fe xor a ld [wBattlePlayerAction], a ret -; 3c664 -Battle_PlayerFirst: ; 3c664 +Battle_PlayerFirst: xor a ld [wEnemyGoesFirst], a call SetEnemyTurn @@ -972,23 +952,20 @@ Battle_PlayerFirst: ; 3c664 xor a ld [wBattlePlayerAction], a ret -; 3c6cf -PlayerTurn_EndOpponentProtectEndureDestinyBond: ; 3c6cf +PlayerTurn_EndOpponentProtectEndureDestinyBond: call SetPlayerTurn call EndUserDestinyBond callfar DoPlayerTurn jp EndOpponentProtectEndureDestinyBond -; 3c6de -EnemyTurn_EndOpponentProtectEndureDestinyBond: ; 3c6de +EnemyTurn_EndOpponentProtectEndureDestinyBond: call SetEnemyTurn call EndUserDestinyBond callfar DoEnemyTurn jp EndOpponentProtectEndureDestinyBond -; 3c6ed -EndOpponentProtectEndureDestinyBond: ; 3c6ed +EndOpponentProtectEndureDestinyBond: ld a, BATTLE_VARS_SUBSTATUS1_OPP call GetBattleVarAddr res SUBSTATUS_PROTECT, [hl] @@ -997,33 +974,30 @@ EndOpponentProtectEndureDestinyBond: ; 3c6ed call GetBattleVarAddr res SUBSTATUS_DESTINY_BOND, [hl] ret -; 3c6fe -EndUserDestinyBond: ; 3c6fe +EndUserDestinyBond: ld a, BATTLE_VARS_SUBSTATUS5 call GetBattleVarAddr res SUBSTATUS_DESTINY_BOND, [hl] ret -; 3c706 -HasUserFainted: ; 3c706 +HasUserFainted: ld a, [hBattleTurn] and a jr z, HasPlayerFainted -HasEnemyFainted: ; 3c70b +HasEnemyFainted: ld hl, wEnemyMonHP jr CheckIfHPIsZero -HasPlayerFainted: ; 3c710 +HasPlayerFainted: ld hl, wBattleMonHP -CheckIfHPIsZero: ; 3c713 +CheckIfHPIsZero: ld a, [hli] or [hl] ret -; 3c716 -ResidualDamage: ; 3c716 +ResidualDamage: ; Return z if the user fainted before ; or as a result of residual damage. ; For Sandstorm damage, see HandleWeather. @@ -1158,9 +1132,8 @@ ResidualDamage: ; 3c716 call DelayFrames xor a ret -; 3c801 -HandlePerishSong: ; 3c801 +HandlePerishSong: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .EnemyFirst @@ -1227,9 +1200,8 @@ HandlePerishSong: ; 3c801 ld [hli], a ld [hl], a ret -; 3c874 -HandleWrap: ; 3c874 +HandleWrap: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .EnemyFirst @@ -1292,16 +1264,14 @@ HandleWrap: ; 3c874 .print_text jp StdBattleTextBox -; 3c8e4 -SwitchTurnCore: ; 3c8e4 +SwitchTurnCore: ld a, [hBattleTurn] xor 1 ld [hBattleTurn], a ret -; 3c8eb -HandleLeftovers: ; 3c8eb +HandleLeftovers: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .DoEnemyFirst @@ -1349,9 +1319,8 @@ HandleLeftovers: ; 3c8eb call RestoreHP ld hl, BattleText_TargetRecoveredWithItem jp StdBattleTextBox -; 3c93c -HandleMysteryberry: ; 3c93c +HandleMysteryberry: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .DoEnemyFirst @@ -1488,9 +1457,8 @@ HandleMysteryberry: ; 3c93c call SwitchTurnCore ld hl, BattleText_UserRecoveredPPUsing jp StdBattleTextBox -; 3ca26 -HandleFutureSight: ; 3ca26 +HandleFutureSight: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .enemy_first @@ -1547,9 +1515,8 @@ HandleFutureSight: ; 3ca26 call UpdateBattleMonInParty jp UpdateEnemyMonInParty -; 3ca8f -HandleDefrost: ; 3ca8f +HandleDefrost: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .enemy_first @@ -1607,9 +1574,8 @@ HandleDefrost: ; 3ca8f call SetPlayerTurn ld hl, DefrostedOpponentText jp StdBattleTextBox -; 3cafb -HandleSafeguard: ; 3cafb +HandleSafeguard: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .player1 @@ -1646,7 +1612,7 @@ HandleSafeguard: ; 3cafb ld hl, BattleText_SafeguardFaded jp StdBattleTextBox -HandleScreens: ; 3cb36 +HandleScreens: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .Both @@ -1681,15 +1647,13 @@ HandleScreens: ; 3cb36 .Copy: ld hl, wStringBuffer1 jp CopyName2 -; 3cb75 .Your: db "Your@" .Enemy: db "Enemy@" -; 3cb80 -.LightScreenTick: ; 3cb80 +.LightScreenTick: ld a, [de] dec a ld [de], a @@ -1702,9 +1666,8 @@ HandleScreens: ; 3cb36 pop de pop hl ret -; 3cb91 -.ReflectTick: ; 3cb91 +.ReflectTick: inc de ld a, [de] dec a @@ -1713,9 +1676,8 @@ HandleScreens: ; 3cb36 res SCREENS_REFLECT, [hl] ld hl, BattleText_MonsReflectFaded jp StdBattleTextBox -; 3cb9e -HandleWeather: ; 3cb9e +HandleWeather: ld a, [wBattleWeather] cp WEATHER_NONE ret z @@ -1804,7 +1766,6 @@ HandleWeather: ; 3cb9e ld h, [hl] ld l, a jp StdBattleTextBox -; 3cc2d .WeatherMessages: ; entries correspond to WEATHER_* constants @@ -1817,20 +1778,17 @@ HandleWeather: ; 3cb9e dw BattleText_TheRainStopped dw BattleText_TheSunlightFaded dw BattleText_TheSandstormSubsided -; 3cc39 -SubtractHPFromTarget: ; 3cc39 +SubtractHPFromTarget: call SubtractHP jp UpdateHPBar -; 3cc3f -SubtractHPFromUser: ; 3cc3f +SubtractHPFromUser: ; Subtract HP from mon call SubtractHP jp UpdateHPBarBattleHuds -; 3cc45 -SubtractHP: ; 3cc45 +SubtractHP: ld hl, wBattleMonHP ld a, [hBattleTurn] and a @@ -1860,9 +1818,8 @@ SubtractHP: ; 3cc45 ld [wBuffer5], a ld [wBuffer6], a ret -; 3cc76 -GetSixteenthMaxHP: ; 3cc76 +GetSixteenthMaxHP: call GetQuarterMaxHP ; quarter result srl c @@ -1874,9 +1831,8 @@ GetSixteenthMaxHP: ; 3cc76 inc c .ok ret -; 3cc83 -GetEighthMaxHP: ; 3cc83 +GetEighthMaxHP: ; output: bc call GetQuarterMaxHP ; assumes nothing can have 1024 or more hp @@ -1889,9 +1845,8 @@ GetEighthMaxHP: ; 3cc83 inc c .end ret -; 3cc8e -GetQuarterMaxHP: ; 3cc8e +GetQuarterMaxHP: ; output: bc call GetMaxHP @@ -1909,9 +1864,8 @@ GetQuarterMaxHP: ; 3cc8e inc c .end ret -; 3cc9f -GetHalfMaxHP: ; 3cc9f +GetHalfMaxHP: ; output: bc call GetMaxHP @@ -1926,9 +1880,8 @@ GetHalfMaxHP: ; 3cc9f inc c .end ret -; 3ccac -GetMaxHP: ; 3ccac +GetMaxHP: ; output: bc, wBuffer1-2 ld hl, wBattleMonMaxHP @@ -1945,9 +1898,8 @@ GetMaxHP: ; 3ccac ld [wBuffer1], a ld c, a ret -; 3ccc2 -Unreferenced_GetHalfHP: ; 3ccc2 +Unreferenced_GetHalfHP: ld hl, wBattleMonHP ld a, [hBattleTurn] and a @@ -1965,9 +1917,8 @@ Unreferenced_GetHalfHP: ; 3ccc2 ld a, [hl] ld [wBuffer1], a ret -; 3ccde -CheckUserHasEnoughHP: ; 3ccde +CheckUserHasEnoughHP: ld hl, wBattleMonHP + 1 ld a, [hBattleTurn] and a @@ -1980,9 +1931,8 @@ CheckUserHasEnoughHP: ; 3ccde ld a, b sbc [hl] ret -; 3ccef -RestoreHP ; 3ccef +RestoreHP ld hl, wEnemyMonMaxHP ld a, [hBattleTurn] and a @@ -2025,14 +1975,12 @@ RestoreHP ; 3ccef call SwitchTurnCore call UpdateHPBarBattleHuds jp SwitchTurnCore -; 3cd36 -UpdateHPBarBattleHuds: ; 3cd36 +UpdateHPBarBattleHuds: call UpdateHPBar jp UpdateBattleHuds -; 3cd3c -UpdateHPBar: ; 3cd3c +UpdateHPBar: hlcoord 10, 9 ld a, [hBattleTurn] and a @@ -2046,9 +1994,8 @@ UpdateHPBar: ; 3cd3c predef AnimateHPBar pop bc ret -; 3cd55 -HandleEnemyMonFaint: ; 3cd55 +HandleEnemyMonFaint: call FaintEnemyPokemon ld hl, wBattleMonHP ld a, [hli] @@ -2115,9 +2062,8 @@ HandleEnemyMonFaint: ; 3cd55 xor a ld [wBattlePlayerAction], a ret -; 3cdca -DoubleSwitch: ; 3cdca +DoubleSwitch: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .player_1 @@ -2145,9 +2091,8 @@ DoubleSwitch: ; 3cdca xor a ld [wBattlePlayerAction], a ret -; 3ce01 -UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01 +UpdateBattleStateAndExperienceAfterEnemyFaint: call UpdateBattleMonInParty ld a, [wBattleMode] dec a @@ -2236,9 +2181,8 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01 pop af ld [wBattleParticipantsNotFainted], a ret -; 3ceaa -IsAnyMonHoldingExpShare: ; 3ceaa +IsAnyMonHoldingExpShare: ld a, [wPartyCount] ld b, a ld hl, wPartyMon1 @@ -2292,15 +2236,13 @@ IsAnyMonHoldingExpShare: ; 3ceaa ld a, e and a ret -; 3ceec -StopDangerSound: ; 3ceec +StopDangerSound: xor a ld [wLowHealthAlarm], a ret -; 3cef1 -FaintYourPokemon: ; 3cef1 +FaintYourPokemon: call StopDangerSound call WaitSFX ld a, $f0 @@ -2313,9 +2255,8 @@ FaintYourPokemon: ; 3cef1 call ClearBox ld hl, BattleText_MonFainted jp StdBattleTextBox -; 3cf14 -FaintEnemyPokemon: ; 3cf14 +FaintEnemyPokemon: call WaitSFX ld de, SFX_KINESIS call PlaySFX @@ -2327,9 +2268,8 @@ FaintEnemyPokemon: ; 3cf14 call ClearBox ld hl, BattleText_EnemyMonFainted jp StdBattleTextBox -; 3cf35 -CheckEnemyTrainerDefeated: ; 3cf35 +CheckEnemyTrainerDefeated: ld a, [wOTPartyCount] ld b, a xor a @@ -2347,9 +2287,8 @@ CheckEnemyTrainerDefeated: ; 3cf35 and a ret -; 3cf4a -HandleEnemySwitch: ; 3cf4a +HandleEnemySwitch: ld hl, wEnemyHPPal ld e, HP_BAR_LENGTH_PX call UpdateHPPal @@ -2374,9 +2313,8 @@ HandleEnemySwitch: ; 3cf4a jr nz, EnemyPartyMonEntrance inc a ret -; 3cf78 -EnemyPartyMonEntrance: ; 3cf78 +EnemyPartyMonEntrance: push af xor a ld [wEnemySwitchMonIndex], a @@ -2400,9 +2338,8 @@ EnemyPartyMonEntrance: ; 3cf78 ld [wBattlePlayerAction], a inc a ret -; 3cfa4 -WinTrainerBattle: ; 3cfa4 +WinTrainerBattle: ; Player won the battle call StopDangerSound ld a, $1 @@ -2524,27 +2461,24 @@ WinTrainerBattle: ; 3cfa4 .KeepItAll: ld hl, GotMoneyForWinningText jp StdBattleTextBox -; 3d081 -.AddMoneyToMom: ; 3d081 +.AddMoneyToMom: push bc ld hl, wBattleReward + 2 ld de, wMomsMoney + 2 call AddBattleMoneyToAccount pop bc ret -; 3d08d -.AddMoneyToWallet: ; 3d08d +.AddMoneyToWallet: push bc ld hl, wBattleReward + 2 ld de, wMoney + 2 call AddBattleMoneyToAccount pop bc ret -; 3d099 -.DoubleReward: ; 3d099 +.DoubleReward: ld hl, wBattleReward + 2 sla [hl] dec hl @@ -2557,16 +2491,14 @@ WinTrainerBattle: ; 3cfa4 ld [hli], a ld [hl], a ret -; 3d0ab -.SentToMomTexts: ; 3d0ab +.SentToMomTexts: ; entries correspond to MOM_SAVING_* constants dw SentSomeToMomText dw SentHalfToMomText dw SentAllToMomText -; 3d0b1 -.CheckMaxedOutMomMoney: ; 3d0b1 +.CheckMaxedOutMomMoney: ld hl, wMomsMoney + 2 ld a, [hld] cp LOW(MAX_MONEY) @@ -2575,9 +2507,8 @@ WinTrainerBattle: ; 3cfa4 ld a, [hl] sbc HIGH(MAX_MONEY >> 8) ret -; 3d0be -AddBattleMoneyToAccount: ; 3d0be +AddBattleMoneyToAccount: ld c, 3 and a push de @@ -2610,9 +2541,8 @@ AddBattleMoneyToAccount: ; 3d0be inc hl ld [hl], LOW(MAX_MONEY) ret -; 3d0ea -PlayVictoryMusic: ; 3d0ea +PlayVictoryMusic: push de ld de, MUSIC_NONE call PlayMusic @@ -2646,7 +2576,6 @@ PlayVictoryMusic: ; 3d0ea .lost pop de ret -; 3d123 IsKantoGymLeader: ; 0x3d123 ld hl, KantoGymLeaders @@ -2665,7 +2594,7 @@ IsGymLeaderCommon: INCLUDE "data/trainers/leaders.asm" -HandlePlayerMonFaint: ; 3d14e +HandlePlayerMonFaint: call FaintYourPokemon ld hl, wEnemyMonHP ld a, [hli] @@ -2713,9 +2642,8 @@ HandlePlayerMonFaint: ; 3d14e call HandleEnemySwitch jp z, WildFled_EnemyFled_LinkBattleCanceled jp DoubleSwitch -; 3d1aa -PlayerMonFaintHappinessMod: ; 3d1aa +PlayerMonFaintHappinessMod: ld a, [wCurBattleMon] ld c, a ld hl, wBattleParticipantsNotFainted @@ -2752,9 +2680,8 @@ PlayerMonFaintHappinessMod: ; 3d1aa and a ret z ret ; ?????????? -; 3d1f8 -AskUseNextPokemon: ; 3d1f8 +AskUseNextPokemon: call EmptyBattleTextBox call LoadTileMapToTempTileMap ; We don't need to be here if we're in a Trainer battle, @@ -2781,9 +2708,8 @@ AskUseNextPokemon: ; 3d1f8 ld hl, wPartyMon1Speed ld de, wEnemyMonSpeed jp TryToRunAwayFromBattle -; 3d227 -ForcePlayerMonChoice: ; 3d227 +ForcePlayerMonChoice: call EmptyBattleTextBox call LoadStandardMenuHeader call SetUpBattlePartyMenu_NoLoop @@ -2845,9 +2771,8 @@ ForcePlayerMonChoice: ; 3d227 and a ld c, a ret -; 3d2b3 -PlayerPartyMonEntrance: ; 3d2b3 +PlayerPartyMonEntrance: ld a, [wCurBattleMon] ld [wLastPlayerMon], a ld a, [wCurPartyMon] @@ -2863,9 +2788,8 @@ PlayerPartyMonEntrance: ; 3d2b3 call LoadTileMapToTempTileMap call SetPlayerTurn jp SpikesDamage -; 3d2e0 -CheckMobileBattleError: ; 3d2e0 +CheckMobileBattleError: ld a, [wLinkMode] cp LINK_MOBILE jr nz, .not_mobile ; It's not a mobile battle @@ -2881,15 +2805,13 @@ CheckMobileBattleError: ; 3d2e0 .not_mobile xor a ret -; 3d2f1 -IsMobileBattle: ; 3d2f1 +IsMobileBattle: ld a, [wLinkMode] cp LINK_MOBILE ret -; 3d2f7 -SetUpBattlePartyMenu_NoLoop: ; 3d2f7 +SetUpBattlePartyMenu_NoLoop: call ClearBGPalettes SetUpBattlePartyMenu: ; switch to fullscreen menu? farcall LoadPartyMenuGFX @@ -2897,18 +2819,16 @@ SetUpBattlePartyMenu: ; switch to fullscreen menu? farcall InitPartyMenuBGPal7 farcall InitPartyMenuGFX ret -; 3d313 -JumpToPartyMenuAndPrintText: ; 3d313 +JumpToPartyMenuAndPrintText: farcall WritePartyMenuTilemap farcall PrintPartyMenuText call WaitBGMap call SetPalettes call DelayFrame ret -; 3d329 -SelectBattleMon: ; 3d329 +SelectBattleMon: call IsMobileBattle jr z, .mobile farcall PartyMenuSelect @@ -2917,9 +2837,8 @@ SelectBattleMon: ; 3d329 .mobile farcall Mobile_PartyMenuSelect ret -; 3d33c -PickPartyMonInBattle: ; 3d33c +PickPartyMonInBattle: .loop ld a, PARTYMENUACTION_SWITCH ; Which PKMN? ld [wPartyMenuActionText], a @@ -2930,9 +2849,8 @@ PickPartyMonInBattle: ; 3d33c jr z, .loop xor a ret -; 3d34f -SwitchMonAlreadyOut: ; 3d34f +SwitchMonAlreadyOut: ld hl, wCurBattleMon ld a, [wCurPartyMon] cp [hl] @@ -2946,9 +2864,8 @@ SwitchMonAlreadyOut: ; 3d34f .notout xor a ret -; 3d362 -ForcePickPartyMonInBattle: ; 3d362 +ForcePickPartyMonInBattle: ; Can't back out. .pick @@ -2961,9 +2878,8 @@ ForcePickPartyMonInBattle: ; 3d362 call PlaySFX call WaitSFX jr .pick -; 3d375 -PickSwitchMonInBattle: ; 3d375 +PickSwitchMonInBattle: .pick call PickPartyMonInBattle ret c @@ -2971,9 +2887,8 @@ PickSwitchMonInBattle: ; 3d375 jr c, .pick xor a ret -; 3d380 -ForcePickSwitchMonInBattle: ; 3d380 +ForcePickSwitchMonInBattle: ; Can't back out. .pick @@ -2985,9 +2900,8 @@ ForcePickSwitchMonInBattle: ; 3d380 xor a ret -; 3d38e -LostBattle: ; 3d38e +LostBattle: ld a, 1 ld [wBattleEnded], a @@ -3081,21 +2995,18 @@ LostBattle: ; 3d38e farcall Mobile_PrintOpponentBattleMessage scf ret -; 3d432 -EnemyMonFaintedAnimation: ; 3d432 +EnemyMonFaintedAnimation: hlcoord 12, 5 decoord 12, 6 jp MonFaintedAnimation -; 3d43b -PlayerMonFaintedAnimation: ; 3d43b +PlayerMonFaintedAnimation: hlcoord 1, 10 decoord 1, 11 jp MonFaintedAnimation -; 3d444 -MonFaintedAnimation: ; 3d444 +MonFaintedAnimation: ld a, [wcfbe] push af set 6, a @@ -3144,13 +3055,11 @@ MonFaintedAnimation: ; 3d444 pop af ld [wcfbe], a ret -; 3d488 .Spaces: db " @" -; 3d490 -SlideBattlePicOut: ; 3d490 +SlideBattlePicOut: ld [hMapObjectIndexBuffer], a ld c, a .loop @@ -3172,9 +3081,8 @@ SlideBattlePicOut: ; 3d490 dec c jr nz, .loop ret -; 3d4ae -.DoFrame: ; 3d4ae +.DoFrame: ld a, [hMapObjectIndexBuffer] ld c, a cp $8 @@ -3194,9 +3102,8 @@ SlideBattlePicOut: ; 3d490 dec c jr nz, .back ret -; 3d4c3 -ForceEnemySwitch: ; 3d4c3 +ForceEnemySwitch: call ResetEnemyBattleVars ld a, [wEnemySwitchMonIndex] dec a @@ -3209,9 +3116,8 @@ ForceEnemySwitch: ; 3d4c3 call BreakAttraction call ResetBattleParticipants ret -; 3d4e1 -EnemySwitch: ; 3d4e1 +EnemySwitch: call CheckWhetherToAskSwitch jr nc, EnemySwitch_SetMode ; Shift Mode @@ -3238,9 +3144,8 @@ EnemySwitch: ; 3d4e1 ld [wEnemyIsSwitching], a call LoadTileMapToTempTileMap jp PlayerSwitch -; 3d517 -EnemySwitch_SetMode: ; 3d517 +EnemySwitch_SetMode: call ResetEnemyBattleVars call CheckWhetherSwitchmonIsPredetermined jr c, .skip @@ -3253,9 +3158,8 @@ EnemySwitch_SetMode: ; 3d517 call ClearEnemyMonBox call Function_BattleTextEnemySentOut jp Function_SetEnemyMonAndSendOutAnimation -; 3d533 -CheckWhetherSwitchmonIsPredetermined: ; 3d533 +CheckWhetherSwitchmonIsPredetermined: ; returns carry if: ??? ld a, [wLinkMode] and a @@ -3287,9 +3191,8 @@ CheckWhetherSwitchmonIsPredetermined: ; 3d533 .return_carry scf ret -; 3d557 -ResetEnemyBattleVars: ; 3d557 +ResetEnemyBattleVars: ; and draw empty TextBox xor a ld [wLastPlayerCounterMove], a @@ -3305,13 +3208,12 @@ ResetEnemyBattleVars: ; 3d557 call SlideBattlePicOut call EmptyBattleTextBox jp LoadStandardMenuHeader -; 3d57a -ResetBattleParticipants: ; 3d57a +ResetBattleParticipants: xor a ld [wBattleParticipantsNotFainted], a ld [wBattleParticipantsIncludingFainted], a -AddBattleParticipant: ; 3d581 +AddBattleParticipant: ld a, [wCurBattleMon] ld c, a ld hl, wBattleParticipantsNotFainted @@ -3321,9 +3223,8 @@ AddBattleParticipant: ; 3d581 pop bc ld hl, wBattleParticipantsIncludingFainted predef_jump SmallFarFlagAction -; 3d599 -FindMonInOTPartyToSwitchIntoBattle: ; 3d599 +FindMonInOTPartyToSwitchIntoBattle: ld b, -1 ld a, $1 ld [wBuffer1], a @@ -3358,9 +3259,8 @@ FindMonInOTPartyToSwitchIntoBattle: ; 3d599 ld hl, wBuffer2 set 0, [hl] jr .loop -; 3d5d7 -LookUpTheEffectivenessOfEveryMove: ; 3d5d7 +LookUpTheEffectivenessOfEveryMove: push bc ld hl, wOTPartyMon1Moves ld a, b @@ -3396,9 +3296,8 @@ LookUpTheEffectivenessOfEveryMove: ; 3d5d7 ret .done ret -; 3d618 -IsThePlayerMonTypesEffectiveAgainstOTMon: ; 3d618 +IsThePlayerMonTypesEffectiveAgainstOTMon: ; Calculates the effectiveness of the types of the PlayerMon ; against the OTMon push bc @@ -3445,9 +3344,8 @@ IsThePlayerMonTypesEffectiveAgainstOTMon: ; 3d618 .reset res 0, [hl] ret -; 3d672 -ScoreMonTypeMatchups: ; 3d672 +ScoreMonTypeMatchups: .loop1 ld hl, wBuffer1 sla [hl] @@ -3510,9 +3408,8 @@ ScoreMonTypeMatchups: ; 3d672 .quit ret -; 3d6ca -LoadEnemyMonToSwitchTo: ; 3d6ca +LoadEnemyMonToSwitchTo: ; 'b' contains the PartyNr of the mon the AI will switch to ld a, b ld [wCurPartyMon], a @@ -3549,9 +3446,8 @@ LoadEnemyMonToSwitchTo: ; 3d6ca ld a, [hl] ld [wEnemyHPAtTimeOfPlayerSwitch + 1], a ret -; 3d714 -CheckWhetherToAskSwitch: ; 3d714 +CheckWhetherToAskSwitch: ld a, [wBattleHasJustStarted] dec a jp z, .return_nc @@ -3579,9 +3475,8 @@ CheckWhetherToAskSwitch: ; 3d714 .return_nc and a ret -; 3d74b -OfferSwitch: ; 3d74b +OfferSwitch: ld a, [wCurPartyMon] push af callfar Battle_GetTrainerName @@ -3620,9 +3515,8 @@ OfferSwitch: ; 3d74b ld [wCurPartyMon], a scf ret -; 3d7a0 -ClearEnemyMonBox: ; 3d7a0 +ClearEnemyMonBox: xor a ld [hBGMapMode], a call ExitMenu @@ -3632,16 +3526,14 @@ ClearEnemyMonBox: ; 3d7a0 call ClearBox call WaitBGMap jp FinishBattleAnim -; 3d7b8 -Function_BattleTextEnemySentOut: ; 3d7b8 +Function_BattleTextEnemySentOut: callfar Battle_GetTrainerName ld hl, BattleText_EnemySentOut call StdBattleTextBox jp WaitBGMap -; 3d7c7 -Function_SetEnemyMonAndSendOutAnimation: ; 3d7c7 +Function_SetEnemyMonAndSendOutAnimation: ld a, [wTempEnemyMonSpecies] ld [wCurPartySpecies], a ld [wCurSpecies], a @@ -3688,9 +3580,8 @@ Function_SetEnemyMonAndSendOutAnimation: ; 3d7c7 ld a, $1 ld [hBGMapMode], a ret -; 3d834 -NewEnemyMonStatus: ; 3d834 +NewEnemyMonStatus: xor a ld [wLastPlayerCounterMove], a ld [wLastEnemyCounterMove], a @@ -3712,9 +3603,8 @@ endr ld hl, wPlayerSubStatus5 res SUBSTATUS_CANT_RUN, [hl] ret -; 3d867 -ResetEnemyStatLevels: ; 3d867 +ResetEnemyStatLevels: ld a, BASE_STAT_LEVEL ld b, NUM_LEVEL_STATS ld hl, wEnemyStatLevels @@ -3723,9 +3613,8 @@ ResetEnemyStatLevels: ; 3d867 dec b jr nz, .loop ret -; 3d873 -CheckPlayerPartyForFitMon: ; 3d873 +CheckPlayerPartyForFitMon: ; Has the player any mon in his Party that can fight? ld a, [wPartyCount] ld e, a @@ -3741,9 +3630,8 @@ CheckPlayerPartyForFitMon: ; 3d873 jr nz, .loop ld d, a ret -; 3d887 -CheckIfCurPartyMonIsFitToFight: ; 3d887 +CheckIfCurPartyMonIsFitToFight: ld a, [wCurPartyMon] ld hl, wPartyMon1HP call GetPartyLocation @@ -3772,9 +3660,8 @@ CheckIfCurPartyMonIsFitToFight: ; 3d887 .finish_fail xor a ret -; 3d8b3 -TryToRunAwayFromBattle: ; 3d8b3 +TryToRunAwayFromBattle: ; Run away from battle, with or without item ld a, [wBattleType] cp BATTLETYPE_DEBUG @@ -3961,9 +3848,8 @@ TryToRunAwayFromBattle: ; 3d8b3 call LoadTileMapToTempTileMap scf ret -; 3da0d -InitBattleMon: ; 3da0d +InitBattleMon: ld a, MON_SPECIES call GetPartyParamLocation ld de, wBattleMonSpecies @@ -4002,23 +3888,21 @@ InitBattleMon: ; 3da0d call ApplyStatusEffectOnPlayerStats call BadgeStatBoosts ret -; 3da74 -BattleCheckPlayerShininess: ; 3da74 +BattleCheckPlayerShininess: call GetPartyMonDVs jr BattleCheckShininess -BattleCheckEnemyShininess: ; 3da79 +BattleCheckEnemyShininess: call GetEnemyMonDVs -BattleCheckShininess: ; 3da7c +BattleCheckShininess: ld b, h ld c, l callfar CheckShininess ret -; 3da85 -GetPartyMonDVs: ; 3da85 +GetPartyMonDVs: ld hl, wBattleMonDVs ld a, [wPlayerSubStatus5] bit SUBSTATUS_TRANSFORMED, a @@ -4026,9 +3910,8 @@ GetPartyMonDVs: ; 3da85 ld hl, wPartyMon1DVs ld a, [wCurBattleMon] jp GetPartyLocation -; 3da97 -GetEnemyMonDVs: ; 3da97 +GetEnemyMonDVs: ld hl, wEnemyMonDVs ld a, [wEnemySubStatus5] bit SUBSTATUS_TRANSFORMED, a @@ -4040,9 +3923,8 @@ GetEnemyMonDVs: ; 3da97 ld hl, wOTPartyMon1DVs ld a, [wCurOTMon] jp GetPartyLocation -; 3dab1 -ResetPlayerStatLevels: ; 3dab1 +ResetPlayerStatLevels: ld a, BASE_STAT_LEVEL ld b, NUM_LEVEL_STATS ld hl, wPlayerStatLevels @@ -4051,9 +3933,8 @@ ResetPlayerStatLevels: ; 3dab1 dec b jr nz, .loop ret -; 3dabd -InitEnemyMon: ; 3dabd +InitEnemyMon: ld a, [wCurPartyMon] ld hl, wOTPartyMon1Species call GetPartyLocation @@ -4104,9 +3985,8 @@ InitEnemyMon: ; 3dabd ld a, [wCurPartyMon] ld [wCurOTMon], a ret -; 3db32 -SwitchPlayerMon: ; 3db32 +SwitchPlayerMon: call ClearSprites ld a, [wCurBattleMon] ld [wLastPlayerMon], a @@ -4124,9 +4004,8 @@ SwitchPlayerMon: ; 3db32 ld a, [hli] or [hl] ret -; 3db5f -SendOutPlayerMon: ; 3db5f +SendOutPlayerMon: ld hl, wBattleMonDVs predef GetUnownLetter hlcoord 1, 5 @@ -4180,9 +4059,8 @@ SendOutPlayerMon: ; 3db5f ld a, $1 ld [hBGMapMode], a ret -; 3dbde -NewBattleMonStatus: ; 3dbde +NewBattleMonStatus: xor a ld [wLastPlayerCounterMove], a ld [wLastEnemyCounterMove], a @@ -4209,17 +4087,15 @@ endr ld hl, wEnemySubStatus5 res SUBSTATUS_CANT_RUN, [hl] ret -; 3dc18 -BreakAttraction: ; 3dc18 +BreakAttraction: ld hl, wPlayerSubStatus1 res SUBSTATUS_IN_LOVE, [hl] ld hl, wEnemySubStatus1 res SUBSTATUS_IN_LOVE, [hl] ret -; 3dc23 -SpikesDamage: ; 3dc23 +SpikesDamage: ld hl, wPlayerScreens ld de, wBattleMonType ld bc, UpdatePlayerHUD @@ -4258,9 +4134,8 @@ SpikesDamage: ; 3dc23 .hl jp hl -; 3dc5b -PursuitSwitch: ; 3dc5b +PursuitSwitch: ld a, BATTLE_VARS_MOVE call GetBattleVar ld b, a @@ -4338,9 +4213,8 @@ PursuitSwitch: ; 3dc5b .done and a ret -; 3dce6 -RecallPlayerMon: ; 3dce6 +RecallPlayerMon: ld a, [hBattleTurn] push af xor a @@ -4351,9 +4225,8 @@ RecallPlayerMon: ; 3dce6 pop af ld [hBattleTurn], a ret -; 3dcf9 -HandleHealingItems: ; 3dcf9 +HandleHealingItems: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK jr z, .player_1 @@ -4375,9 +4248,8 @@ HandleHealingItems: ; 3dcf9 call HandleHPHealingItem call UseHeldStatusHealingItem jp UseConfusionHealingItem -; 3dd2f -HandleHPHealingItem: ; 3dd2f +HandleHPHealingItem: callfar GetOpponentItem ld a, b cp HELD_BERRY @@ -4469,9 +4341,8 @@ UseOpponentItem: callfar ConsumeHeldItem ld hl, RecoveredUsingText jp StdBattleTextBox -; 3ddc8 -ItemRecoveryAnim: ; 3ddc8 +ItemRecoveryAnim: push hl push de push bc @@ -4488,9 +4359,8 @@ ItemRecoveryAnim: ; 3ddc8 pop de pop hl ret -; 3dde9 -UseHeldStatusHealingItem: ; 3dde9 +UseHeldStatusHealingItem: callfar GetOpponentItem ld hl, HeldStatusHealingEffects .loop @@ -4543,11 +4413,10 @@ UseHeldStatusHealingItem: ; 3dde9 ld a, $1 and a ret -; 3de44 INCLUDE "data/battle/held_heal_status.asm" -UseConfusionHealingItem: ; 3de51 +UseConfusionHealingItem: ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVar bit SUBSTATUS_CONFUSED, a @@ -4587,9 +4456,8 @@ UseConfusionHealingItem: ; 3de51 ld [bc], a ld [hl], a ret -; 3de97 -HandleStatBoostingHeldItems: ; 3de97 +HandleStatBoostingHeldItems: ; The effects handled here are not used in-game. ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK @@ -4600,18 +4468,16 @@ HandleStatBoostingHeldItems: ; 3de97 .player_1 call .DoEnemy jp .DoPlayer -; 3dea9 -.DoPlayer: ; 3dea9 +.DoPlayer: call GetPartymonItem ld a, $0 jp .HandleItem -; 3deb1 -.DoEnemy: ; 3deb1 +.DoEnemy: call GetOTPartymonItem ld a, $1 -.HandleItem: ; 3deb6 +.HandleItem: ld [hBattleTurn], a ld d, h ld e, l @@ -4658,27 +4524,24 @@ HandleStatBoostingHeldItems: ; 3de97 pop bc pop de ret -; 3defc INCLUDE "data/battle/held_stat_up.asm" -GetPartymonItem: ; 3df12 +GetPartymonItem: ld hl, wPartyMon1Item ld a, [wCurBattleMon] call GetPartyLocation ld bc, wBattleMonItem ret -; 3df1f -GetOTPartymonItem: ; 3df1f +GetOTPartymonItem: ld hl, wOTPartyMon1Item ld a, [wCurOTMon] call GetPartyLocation ld bc, wEnemyMonItem ret -; 3df2c -UpdateBattleHUDs: ; 3df2c +UpdateBattleHUDs: push hl push de push bc @@ -4693,9 +4556,8 @@ UpdateBattleHUDs: ; 3df2c pop de pop hl ret -; 3df48 -UpdatePlayerHUD:: ; 3df48 +UpdatePlayerHUD:: push hl push de push bc @@ -4706,9 +4568,8 @@ UpdatePlayerHUD:: ; 3df48 pop de pop hl ret -; 3df58 -DrawPlayerHUD: ; 3df58 +DrawPlayerHUD: xor a ld [hBGMapMode], a @@ -4744,14 +4605,12 @@ DrawPlayerHUD: ; 3df58 call FillInExpBar pop de ret -; 3df98 -UpdatePlayerHPPal: ; 3df98 +UpdatePlayerHPPal: ld hl, wPlayerHPPal jp UpdateHPPal -; 3df9e -CheckDanger: ; 3df9e +CheckDanger: ld hl, wBattleMonHP ld a, [hli] or [hl] @@ -4774,9 +4633,8 @@ CheckDanger: ; 3df9e .done ret -; 3dfbf -PrintPlayerHUD: ; 3dfbf +PrintPlayerHUD: ld de, wBattleMonNick hlcoord 10, 7 call ret_3e138 @@ -4837,9 +4695,8 @@ PrintPlayerHUD: ; 3dfbf ld a, [wBattleMonLevel] ld [wTempMonLevel], a jp PrintLevel -; 3e036 -UpdateEnemyHUD:: ; 3e036 +UpdateEnemyHUD:: push hl push de push bc @@ -4849,9 +4706,8 @@ UpdateEnemyHUD:: ; 3e036 pop de pop hl ret -; 3e043 -DrawEnemyHUD: ; 3e043 +DrawEnemyHUD: xor a ld [hBGMapMode], a @@ -4982,28 +4838,24 @@ DrawEnemyHUD: ; 3e043 ld b, 0 call DrawBattleHPBar ret -; 3e127 -UpdateEnemyHPPal: ; 3e127 +UpdateEnemyHPPal: ld hl, wEnemyHPPal call UpdateHPPal ret -; 3e12e -UpdateHPPal: ; 3e12e +UpdateHPPal: ld b, [hl] call SetHPPal ld a, [hl] cp b ret z jp FinishBattleAnim -; 3e138 -ret_3e138: ; 3e138 +ret_3e138: ret -; 3e139 -BattleMenu: ; 3e139 +BattleMenu: xor a ld [hBGMapMode], a call LoadTempTileMapToTileMap @@ -5049,17 +4901,15 @@ BattleMenu: ; 3e139 cp $4 jp z, BattleMenu_Run jr .loop -; 3e192 -BattleMenu_Fight: ; 3e192 +BattleMenu_Fight: xor a ld [wNumFleeAttempts], a call Call_LoadTempTileMapToTileMap and a ret -; 3e19b -LoadBattleMenu2: ; 3e19b +LoadBattleMenu2: call IsMobileBattle jr z, .mobile @@ -5083,9 +4933,8 @@ LoadBattleMenu2: ; 3e19b .error scf ret -; 3e1c7 -BattleMenu_Pack: ; 3e1c7 +BattleMenu_Pack: ld a, [wLinkMode] and a jp nz, .ItemsCantBeUsed @@ -5135,15 +4984,13 @@ BattleMenu_Pack: ; 3e1c7 call FinishBattleAnim call LoadTileMapToTempTileMap jp BattleMenu -; 3e22b -.ItemsCantBeUsed: ; 3e22b +.ItemsCantBeUsed: ld hl, BattleText_ItemsCantBeUsedHere call StdBattleTextBox jp BattleMenu -; 3e234 -.UseItem: ; 3e234 +.UseItem: ld a, [wWildMon] and a jr nz, .run @@ -5186,9 +5033,8 @@ BattleMenu_Pack: ; 3e1c7 call SetPalettes scf ret -; 3e28d -BattleMenu_PKMN: ; 3e28d +BattleMenu_PKMN: call LoadStandardMenuHeader BattleMenuPKMN_ReturnFromStats: call ExitMenu @@ -5236,9 +5082,8 @@ BattleMenuPKMN_Loop: call GetMemSGBLayout call SetPalettes jp BattleMenu -; 3e2f5 -.GetMenu: ; 3e2f5 +.GetMenu: call IsMobileBattle jr z, .mobile farcall BattleMonMenu @@ -5247,9 +5092,8 @@ BattleMenuPKMN_Loop: .mobile farcall MobileBattleMonMenu ret -; 3e308 -Battle_StatsScreen: ; 3e308 +Battle_StatsScreen: call DisableLCD ld hl, vTiles2 tile $31 @@ -5285,9 +5129,8 @@ Battle_StatsScreen: ; 3e308 call EnableLCD ret -; 3e358 -TryPlayerSwitch: ; 3e358 +TryPlayerSwitch: ld a, [wCurBattleMon] ld d, a ld a, [wCurPartyMon] @@ -5326,7 +5169,7 @@ TryPlayerSwitch: ; 3e358 call SetPalettes ld a, [wCurPartyMon] ld [wCurBattleMon], a -PlayerSwitch: ; 3e3ad +PlayerSwitch: ld a, 1 ld [wPlayerIsSwitching], a ld a, [wLinkMode] @@ -5374,15 +5217,13 @@ PlayerSwitch: ; 3e3ad call BattleMonEntrance and a ret -; 3e3ff -EnemyMonEntrance: ; 3e3ff +EnemyMonEntrance: callfar AI_Switch call SetEnemyTurn jp SpikesDamage -; 3e40b -BattleMonEntrance: ; 3e40b +BattleMonEntrance: call WithdrawMonText ld c, 50 @@ -5417,9 +5258,8 @@ BattleMonEntrance: ; 3e40b ld a, $2 ld [wMenuCursorY], a ret -; 3e459 -PassedBattleMonEntrance: ; 3e459 +PassedBattleMonEntrance: ld c, 50 call DelayFrames @@ -5439,9 +5279,8 @@ PassedBattleMonEntrance: ; 3e459 call LoadTileMapToTempTileMap call SetPlayerTurn jp SpikesDamage -; 3e489 -BattleMenu_Run: ; 3e489 +BattleMenu_Run: call Call_LoadTempTileMapToTileMap ld a, $3 ld [wMenuCursorY], a @@ -5455,9 +5294,8 @@ BattleMenu_Run: ; 3e489 and a ret nz jp BattleMenu -; 3e4a8 -CheckAmuletCoin: ; 3e4a8 +CheckAmuletCoin: ld a, [wBattleMonItem] ld b, a callfar GetItemHeldEffect @@ -5467,9 +5305,8 @@ CheckAmuletCoin: ; 3e4a8 ld a, 1 ld [wAmuletCoin], a ret -; 3e4bc -MoveSelectionScreen: ; 3e4bc +MoveSelectionScreen: call IsMobileBattle jr nz, .not_mobile farcall MobileMoveSelectionScreen @@ -5671,11 +5508,9 @@ MoveSelectionScreen: ; 3e4bc call StdBattleTextBox call Call_LoadTempTileMapToTileMap jp MoveSelectionScreen -; 3e61c -.string_3e61c ; 3e61c +.string_3e61c db "@" -; 3e61d .pressed_up ld a, [wMenuCursorY] @@ -5685,9 +5520,8 @@ MoveSelectionScreen: ; 3e4bc inc a ld [wMenuCursorY], a jp .menu_loop -; 3e62e -.pressed_down ; 3e62e +.pressed_down ld a, [wMenuCursorY] ld b, a ld a, [wNumMoves] @@ -5698,9 +5532,8 @@ MoveSelectionScreen: ; 3e4bc ld a, $1 ld [wMenuCursorY], a jp .menu_loop -; 3e643 -.pressed_select ; 3e643 +.pressed_select ld a, [wMoveSwapBuffer] and a jr z, .start_swap @@ -5783,9 +5616,8 @@ MoveSelectionScreen: ; 3e4bc ld a, [wMenuCursorY] ld [wMoveSwapBuffer], a jp MoveSelectionScreen -; 3e6c8 -MoveInfoBox: ; 3e6c8 +MoveInfoBox: xor a ld [hBGMapMode], a @@ -5855,15 +5687,13 @@ MoveInfoBox: ; 3e6c8 .done ret -; 3e74f .Disabled: db "Disabled!@" .Type: db "TYPE/@" -; 3e75f -.PrintPP: ; 3e75f +.PrintPP: hlcoord 5, 11 ld a, [wLinkMode] ; What's the point of this check? cp LINK_MOBILE @@ -5883,9 +5713,8 @@ MoveInfoBox: ; 3e6c8 lb bc, 1, 2 call PrintNum ret -; 3e786 -CheckPlayerHasUsableMoves: ; 3e786 +CheckPlayerHasUsableMoves: ld a, STRUGGLE ld [wCurPlayerMove], a ld a, [wPlayerDisableCount] @@ -5931,9 +5760,8 @@ CheckPlayerHasUsableMoves: ; 3e786 call DelayFrames xor a ret -; 3e7c1 -ParseEnemyAction: ; 3e7c1 +ParseEnemyAction: ld a, [wEnemyIsSwitching] and a ret nz @@ -6081,9 +5909,8 @@ ParseEnemyAction: ; 3e7c1 .struggle ld a, STRUGGLE jr .finish -; 3e8c1 -ResetVarsForSubstatusRage: ; 3e8c1 +ResetVarsForSubstatusRage: xor a ld [wEnemyFuryCutterCount], a ld [wEnemyProtectCount], a @@ -6091,9 +5918,8 @@ ResetVarsForSubstatusRage: ; 3e8c1 ld hl, wEnemySubStatus4 res SUBSTATUS_RAGE, [hl] ret -; 3e8d1 -CheckEnemyLockedIn: ; 3e8d1 +CheckEnemyLockedIn: ld a, [wEnemySubStatus4] and 1 << SUBSTATUS_RECHARGE ret nz @@ -6106,14 +5932,12 @@ CheckEnemyLockedIn: ; 3e8d1 ld hl, wEnemySubStatus1 bit SUBSTATUS_ROLLOUT, [hl] ret -; 3e8e4 -LinkBattleSendReceiveAction: ; 3e8e4 +LinkBattleSendReceiveAction: farcall _LinkBattleSendReceiveAction ret -; 3e8eb -LoadEnemyMon: ; 3e8eb +LoadEnemyMon: ; Initialize enemy monster parameters ; To do this we pull the species from wTempEnemyMonSpecies @@ -6582,9 +6406,8 @@ LoadEnemyMon: ; 3e8eb call CopyBytes ret -; 3eb38 -CheckSleepingTreeMon: ; 3eb38 +CheckSleepingTreeMon: ; Return carry if species is in the list ; for the current time of day @@ -6615,7 +6438,7 @@ CheckSleepingTreeMon: ; 3eb38 INCLUDE "data/wild/treemons_asleep.asm" -CheckUnownLetter: ; 3eb75 +CheckUnownLetter: ; Return carry if the Unown letter hasn't been unlocked yet ld a, [wUnlockedUnowns] @@ -6665,7 +6488,7 @@ CheckUnownLetter: ; 3eb75 INCLUDE "data/wild/unlocked_unowns.asm" -Unreferenced_SwapBattlerLevels: ; 3ebc7 +Unreferenced_SwapBattlerLevels: push bc ld a, [wBattleMonLevel] ld b, a @@ -6675,9 +6498,8 @@ Unreferenced_SwapBattlerLevels: ; 3ebc7 ld [wEnemyMonLevel], a pop bc ret -; 3ebd8 -BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8 +BattleWinSlideInEnemyTrainerFrontpic: xor a ld [wTempEnemyMonSpecies], a call FinishBattleAnim @@ -6717,9 +6539,8 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8 pop bc dec hl jr .outer_loop -; 3ec1a -.CopyColumn: ; 3ec1a +.CopyColumn: push hl push de push bc @@ -6737,24 +6558,20 @@ BattleWinSlideInEnemyTrainerFrontpic: ; 3ebd8 pop de pop hl ret -; 3ec2c -ApplyStatusEffectOnPlayerStats: ; 3ec2c +ApplyStatusEffectOnPlayerStats: ld a, 1 jr ApplyStatusEffectOnStats -; 3ec30 -ApplyStatusEffectOnEnemyStats: ; 3ec30 +ApplyStatusEffectOnEnemyStats: xor a -; 3ec31 -ApplyStatusEffectOnStats: ; 3ec31 +ApplyStatusEffectOnStats: ld [hBattleTurn], a call ApplyPrzEffectOnSpeed jp ApplyBrnEffectOnAttack -; 3ec39 -ApplyPrzEffectOnSpeed: ; 3ec39 +ApplyPrzEffectOnSpeed: ld a, [hBattleTurn] and a jr z, .enemy @@ -6798,9 +6615,8 @@ ApplyPrzEffectOnSpeed: ; 3ec39 .enemy_ok ld [hl], b ret -; 3ec76 -ApplyBrnEffectOnAttack: ; 3ec76 +ApplyBrnEffectOnAttack: ld a, [hBattleTurn] and a jr z, .enemy @@ -6840,9 +6656,8 @@ ApplyBrnEffectOnAttack: ; 3ec76 .enemy_ok ld [hl], b ret -; 3ecab -ApplyStatLevelMultiplierOnAllStats: ; 3ecab +ApplyStatLevelMultiplierOnAllStats: ; Apply StatLevelMultipliers on all 5 Stats ld c, 0 .stat_loop @@ -6852,9 +6667,8 @@ ApplyStatLevelMultiplierOnAllStats: ; 3ecab cp 5 jr nz, .stat_loop ret -; 3ecb7 -ApplyStatLevelMultiplier: ; 3ecb7 +ApplyStatLevelMultiplier: push bc push bc ld a, [wd265] @@ -6936,11 +6750,10 @@ ApplyStatLevelMultiplier: ; 3ecb7 .okay4 pop bc ret -; 3ed2b INCLUDE "data/battle/stat_multipliers_2.asm" -BadgeStatBoosts: ; 3ed45 +BadgeStatBoosts: ; Raise the stats of the battle mon in wBattleMon ; depending on which badges have been obtained. @@ -6997,9 +6810,8 @@ BadgeStatBoosts: ; 3ed45 srl a call c, BoostStat ret -; 3ed7c -BoostStat: ; 3ed7c +BoostStat: ; Raise stat at hl by 1/8. ld a, [hli] @@ -7029,17 +6841,14 @@ BoostStat: ; 3ed7c ld a, LOW(MAX_STAT_VALUE) ld [hld], a ret -; 3ed9f -_LoadBattleFontsHPBar: ; 3ed9f +_LoadBattleFontsHPBar: callfar LoadBattleFontsHPBar ret -; 3eda6 -_LoadHPBar: ; 3eda6 +_LoadHPBar: callfar LoadHPBar ret -; 3edad Unreferenced_LoadHPExpBarGFX: ld de, EnemyHPBarBorderGFX @@ -7054,16 +6863,14 @@ Unreferenced_LoadHPExpBarGFX: ld hl, vTiles2 tile $55 lb bc, BANK(ExpBarGFX), 8 jp Get2bpp -; 3edd1 -EmptyBattleTextBox: ; 3edd1 +EmptyBattleTextBox: ld hl, .empty jp BattleTextBox .empty db "@" -; 3edd8 -_BattleRandom:: ; 3edd8 +_BattleRandom:: ; If the normal RNG is used in a link battle it'll desync. ; To circumvent this a shared PRNG is used instead. @@ -7130,25 +6937,22 @@ _BattleRandom:: ; 3edd8 pop bc pop hl ret -; 3ee0f -Call_PlayBattleAnim_OnlyIfVisible: ; 3ee0f +Call_PlayBattleAnim_OnlyIfVisible: ld a, BATTLE_VARS_SUBSTATUS3 call GetBattleVar and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND ret nz -; 3ee17 -Call_PlayBattleAnim: ; 3ee17 +Call_PlayBattleAnim: ld a, e ld [wFXAnimID], a ld a, d ld [wFXAnimID + 1], a call WaitBGMap predef_jump PlayBattleAnim -; 3ee27 -FinishBattleAnim: ; 3ee27 +FinishBattleAnim: push af push bc push de @@ -7162,9 +6966,8 @@ FinishBattleAnim: ; 3ee27 pop bc pop af ret -; 3ee3b -GiveExperiencePoints: ; 3ee3b +GiveExperiencePoints: ; Give experience. ; Don't give experience if linked or in the Battle Tower. ld a, [wLinkMode] @@ -7542,7 +7345,6 @@ GiveExperiencePoints: ; 3ee3b .done jp ResetBattleParticipants -; 3f0d4 .EvenlyDivideExpAmongParticipants: ; count number of battle participants @@ -7577,9 +7379,8 @@ GiveExperiencePoints: ; 3ee3b dec c jr nz, .count_loop2 ret -; 3f106 -BoostExp: ; 3f106 +BoostExp: ; Multiply experience by 1.5x push bc ; load experience value @@ -7598,9 +7399,8 @@ BoostExp: ; 3f106 ld [hProduct + 2], a pop bc ret -; 3f11b -Text_MonGainedExpPoint: ; 3f11b +Text_MonGainedExpPoint: text_jump Text_Gained start_asm ld hl, TextJump_StringBuffer2ExpPoints @@ -7610,19 +7410,16 @@ Text_MonGainedExpPoint: ; 3f11b ld hl, TextJump_ABoostedStringBuffer2ExpPoints ret -; 3f12c -TextJump_ABoostedStringBuffer2ExpPoints: ; 3f12c +TextJump_ABoostedStringBuffer2ExpPoints: text_jump Text_ABoostedStringBuffer2ExpPoints db "@" -; 3f131 -TextJump_StringBuffer2ExpPoints: ; 3f131 +TextJump_StringBuffer2ExpPoints: text_jump Text_StringBuffer2ExpPoints db "@" -; 3f136 -AnimateExpBar: ; 3f136 +AnimateExpBar: push bc ld hl, wCurPartyMon @@ -7808,7 +7605,7 @@ AnimateExpBar: ; 3f136 ld [hBGMapMode], a ret -SendOutMonText: ; 3f26d +SendOutMonText: ld a, [wLinkMode] and a jr z, .not_linked @@ -7868,40 +7665,34 @@ SendOutMonText: ; 3f26d ld hl, JumpText_YourFoesWeakGetmMon .skip_to_textbox jp BattleTextBox -; 3f2d1 -JumpText_GoMon: ; 3f2d1 +JumpText_GoMon: text_jump Text_GoMon start_asm jr Function_TextJump_BattleMonNick01 -; 3f2d6 -JumpText_DoItMon: ; 3f2d8 +JumpText_DoItMon: text_jump Text_DoItMon start_asm jr Function_TextJump_BattleMonNick01 -; 3f2dd -JumpText_GoForItMon: ; 3f2df +JumpText_GoForItMon: text_jump Text_GoForItMon start_asm jr Function_TextJump_BattleMonNick01 -; 3f2e4 -JumpText_YourFoesWeakGetmMon: ; 3f2e6 +JumpText_YourFoesWeakGetmMon: text_jump Text_YourFoesWeakGetmMon start_asm -Function_TextJump_BattleMonNick01: ; 3f2eb +Function_TextJump_BattleMonNick01: ld hl, TextJump_BattleMonNick01 ret -; 3f2ef -TextJump_BattleMonNick01: ; 3f2ef +TextJump_BattleMonNick01: text_jump Text_BattleMonNick01 db "@" -; 3f2f4 -WithdrawMonText: ; 3f2f4 +WithdrawMonText: ld hl, .WithdrawMonText jp BattleTextBox @@ -7955,33 +7746,27 @@ WithdrawMonText: ; 3f2f4 ld hl, TextJump_GoodComeBack ret -; 3f348 -TextJump_ThatsEnoughComeBack: ; 3f348 +TextJump_ThatsEnoughComeBack: text_jump Text_ThatsEnoughComeBack db "@" -; 3f34d -TextJump_OKComeBack: ; 3f34d +TextJump_OKComeBack: text_jump Text_OKComeBack db "@" -; 3f352 -TextJump_GoodComeBack: ; 3f352 +TextJump_GoodComeBack: text_jump Text_GoodComeBack db "@" -; 3f357 -Unreferenced_TextJump_ComeBack: ; 3f357 +Unreferenced_TextJump_ComeBack: ; this function doesn't seem to be used ld hl, TextJump_ComeBack ret -; 3f35b -TextJump_ComeBack: ; 3f35b +TextJump_ComeBack: text_jump Text_ComeBack db "@" -; 3f360 Unreferenced_HandleSafariAngerEatingStatus: ld hl, wSafariMonEating @@ -8013,18 +7798,16 @@ Unreferenced_HandleSafariAngerEatingStatus: call Call_LoadTempTileMapToTileMap pop hl jp StdBattleTextBox -; 3f390 -FillInExpBar: ; 3f390 +FillInExpBar: push hl call CalcExpBar pop hl ld de, 7 add hl, de jp PlaceExpBar -; 3f39c -CalcExpBar: ; 3f39c +CalcExpBar: ; Calculate the percent exp between this level and the next ; Level in b push de @@ -8123,9 +7906,8 @@ CalcExpBar: ; 3f39c sub b ld b, a ret -; 3f41c -PlaceExpBar: ; 3f41c +PlaceExpBar: ld c, $8 ; number of tiles .loop1 ld a, b @@ -8155,15 +7937,14 @@ PlaceExpBar: ; 3f41c .finish ret -; 3f43d -GetBattleMonBackpic: ; 3f43d +GetBattleMonBackpic: ld a, [wPlayerSubStatus4] bit SUBSTATUS_SUBSTITUTE, a ld hl, BattleAnimCmd_RaiseSub jr nz, GetBattleMonBackpic_DoAnim ; substitute -DropPlayerSub: ; 3f447 +DropPlayerSub: ld a, [wPlayerMinimized] and a ld hl, BattleAnimCmd_MinimizeOpp @@ -8179,9 +7960,8 @@ DropPlayerSub: ; 3f447 pop af ld [wCurPartySpecies], a ret -; 3f46f -GetBattleMonBackpic_DoAnim: ; 3f46f +GetBattleMonBackpic_DoAnim: ld a, [hBattleTurn] push af xor a @@ -8191,15 +7971,14 @@ GetBattleMonBackpic_DoAnim: ; 3f46f pop af ld [hBattleTurn], a ret -; 3f47c -GetEnemyMonFrontpic: ; 3f47c +GetEnemyMonFrontpic: ld a, [wEnemySubStatus4] bit SUBSTATUS_SUBSTITUTE, a ld hl, BattleAnimCmd_RaiseSub jr nz, GetEnemyMonFrontpic_DoAnim -DropEnemySub: ; 3f486 +DropEnemySub: ld a, [wEnemyMinimized] and a ld hl, BattleAnimCmd_MinimizeOpp @@ -8218,9 +7997,8 @@ DropEnemySub: ; 3f486 pop af ld [wCurPartySpecies], a ret -; 3f4b4 -GetEnemyMonFrontpic_DoAnim: ; 3f4b4 +GetEnemyMonFrontpic_DoAnim: ld a, [hBattleTurn] push af call SetEnemyTurn @@ -8229,9 +8007,8 @@ GetEnemyMonFrontpic_DoAnim: ; 3f4b4 pop af ld [hBattleTurn], a ret -; 3f4c1 -StartBattle: ; 3f4c1 +StartBattle: ; This check prevents you from entering a battle without any Pokemon. ; Those using walk-through-walls to bypass getting a Pokemon experience ; the effects of this check. @@ -8248,14 +8025,12 @@ StartBattle: ; 3f4c1 ld [wTimeOfDayPal], a scf ret -; 3f4d9 -Unreferenced_DoBattle: ; 3f4d9 +Unreferenced_DoBattle: call DoBattle ret -; 3f4dd -BattleIntro: ; 3f4dd +BattleIntro: farcall StubbedTrainerRankings_Battles ; mobile call LoadTrainerOrWildMonPic xor a @@ -8294,9 +8069,8 @@ BattleIntro: ; 3f4dd ld a, $1 ld [hBGMapMode], a ret -; 3f54e -LoadTrainerOrWildMonPic: ; 3f54e +LoadTrainerOrWildMonPic: ld a, [wOtherTrainerClass] and a jr nz, .Trainer @@ -8306,16 +8080,14 @@ LoadTrainerOrWildMonPic: ; 3f54e .Trainer: ld [wTempEnemyMonSpecies], a ret -; 3f55e -InitEnemy: ; 3f55e +InitEnemy: ld a, [wOtherTrainerClass] and a jp nz, InitEnemyTrainer ; trainer jp InitEnemyWildmon ; wild -; 3f568 -BackUpBGMap2: ; 3f568 +BackUpBGMap2: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -8337,9 +8109,8 @@ BackUpBGMap2: ; 3f568 pop af ld [rSVBK], a ret -; 3f594 -InitEnemyTrainer: ; 3f594 +InitEnemyTrainer: ld [wTrainerClass], a farcall StubbedTrainerRankings_TrainerBattles xor a @@ -8393,9 +8164,8 @@ InitEnemyTrainer: ; 3f594 jr .partyloop .done ret -; 3f607 -InitEnemyWildmon: ; 3f607 +InitEnemyWildmon: ld a, WILD_BATTLE ld [wBattleMode], a farcall StubbedTrainerRankings_WildBattles @@ -8428,9 +8198,8 @@ InitEnemyWildmon: ; 3f607 lb bc, 7, 7 predef PlaceGraphic ret -; 3f662 -Unreferenced_Function3f662: ; 3f662 +Unreferenced_Function3f662: ld hl, wEnemyMonMoves ld de, wListMoves_MoveIndicesBuffer ld b, NUM_MOVES @@ -8480,15 +8249,13 @@ Unreferenced_Function3f662: ; 3f662 dec b jr nz, .clear ret -; 3f69e -ExitBattle: ; 3f69e +ExitBattle: call .HandleEndOfBattle call CleanUpBattleRAM ret -; 3f6a5 -.HandleEndOfBattle: ; 3f6a5 +.HandleEndOfBattle: ld a, [wLinkMode] and a jr z, .not_linked @@ -8508,9 +8275,8 @@ ExitBattle: ; 3f69e predef EvolveAfterBattle farcall GivePokerusAndConvertBerries ret -; 3f6d0 -CleanUpBattleRAM: ; 3f6d0 +CleanUpBattleRAM: call BattleEnd_HandleRoamMons xor a ld [wLowHealthAlarm], a @@ -8541,9 +8307,8 @@ CleanUpBattleRAM: ; 3f6d0 jr nz, .loop call WaitSFX ret -; 3f71d -CheckPayDay: ; 3f71d +CheckPayDay: ld hl, wPayDayMoney ld a, [hli] or [hl] @@ -8577,9 +8342,8 @@ CheckPayDay: ; 3f71d call ClearTileMap call ClearBGPalettes ret -; 3f759 -ShowLinkBattleParticipantsAfterEnd: ; 3f759 +ShowLinkBattleParticipantsAfterEnd: farcall StubbedTrainerRankings_LinkBattles farcall BackupMobileEventIndex ld a, [wCurOTMon] @@ -8590,9 +8354,8 @@ ShowLinkBattleParticipantsAfterEnd: ; 3f759 call ClearTileMap farcall _ShowLinkBattleParticipants ret -; 3f77c -DisplayLinkBattleResult: ; 3f77c +DisplayLinkBattleResult: farcall CheckMobileBattleError jp c, .Mobile_InvalidBattle call IsMobileBattle2 @@ -8651,7 +8414,6 @@ DisplayLinkBattleResult: ; 3f77c call DelayFrames call ClearTileMap ret -; 3f7f7 .Win: db "YOU WIN@" @@ -8659,9 +8421,8 @@ DisplayLinkBattleResult: ; 3f77c db "YOU LOSE@" .Draw: db " DRAW@" -; 3f80f -.Mobile_InvalidBattle: ; 3f80f +.Mobile_InvalidBattle: hlcoord 6, 8 ld de, .Invalid call PlaceString @@ -8669,19 +8430,16 @@ DisplayLinkBattleResult: ; 3f77c call DelayFrames call ClearTileMap ret -; 3f821 .Invalid: db "INVALID BATTLE@" -; 3f830 -IsMobileBattle2: ; 3f830 +IsMobileBattle2: ld a, [wLinkMode] cp LINK_MOBILE ret -; 3f836 -_DisplayLinkRecord: ; 3f836 +_DisplayLinkRecord: ld a, BANK(sLinkBattleStats) call GetSRAMBank @@ -8700,9 +8458,8 @@ _DisplayLinkRecord: ; 3f836 call DelayFrames call WaitPressAorB_BlinkCursor ret -; 3f85f -ReadAndPrintLinkBattleRecord: ; 3f85f +ReadAndPrintLinkBattleRecord: call ClearTileMap call ClearSprites call .PrintBattleRecord @@ -8819,24 +8576,21 @@ ReadAndPrintLinkBattleRecord: ; 3f85f call PlaceString scf ret -; 3f938 .Scores: db " 0 0 0@" -; 3f947 -.Format: ; 3f947 +.Format: db " --- " db " - - -@" -.Record: ; 3f964 +.Record: db "'s RECORD@" -.Result: ; 3f96e +.Result: db "RESULT WIN LOSE DRAW@" -.Total: ; 3f983 +.Total: db "TOTAL WIN LOSE DRAW@" -; 3f998 -BattleEnd_HandleRoamMons: ; 3f998 +BattleEnd_HandleRoamMons: ld a, [wBattleType] cp BATTLETYPE_ROAMING jr nz, .not_roaming @@ -8867,9 +8621,8 @@ BattleEnd_HandleRoamMons: ; 3f998 .update_roam_mons callfar UpdateRoamMons ret -; 3f9d1 -GetRoamMonMapGroup: ; 3f9d1 +GetRoamMonMapGroup: ld a, [wTempEnemyMonSpecies] ld b, a ld a, [wRoamMon1Species] @@ -8882,9 +8635,8 @@ GetRoamMonMapGroup: ; 3f9d1 ret z ld hl, wRoamMon3MapGroup ret -; 3f9e9 -GetRoamMonMapNumber: ; 3f9e9 +GetRoamMonMapNumber: ld a, [wTempEnemyMonSpecies] ld b, a ld a, [wRoamMon1Species] @@ -8897,9 +8649,8 @@ GetRoamMonMapNumber: ; 3f9e9 ret z ld hl, wRoamMon3MapNumber ret -; 3fa01 -GetRoamMonHP: ; 3fa01 +GetRoamMonHP: ; output: hl = wRoamMonHP ld a, [wTempEnemyMonSpecies] ld b, a @@ -8913,9 +8664,8 @@ GetRoamMonHP: ; 3fa01 ret z ld hl, wRoamMon3HP ret -; 3fa19 -GetRoamMonDVs: ; 3fa19 +GetRoamMonDVs: ; output: hl = wRoamMonDVs ld a, [wTempEnemyMonSpecies] ld b, a @@ -8929,9 +8679,8 @@ GetRoamMonDVs: ; 3fa19 ret z ld hl, wRoamMon3DVs ret -; 3fa31 -GetRoamMonSpecies: ; 3fa31 +GetRoamMonSpecies: ld a, [wTempEnemyMonSpecies] ld hl, wRoamMon1Species cp [hl] @@ -8941,9 +8690,8 @@ GetRoamMonSpecies: ; 3fa31 ret z ld hl, wRoamMon3Species ret -; 3fa42 -AddLastMobileBattleToLinkRecord: ; 3fa42 +AddLastMobileBattleToLinkRecord: ld hl, wOTPlayerID ld de, wStringBuffer1 ld bc, 2 @@ -8998,8 +8746,7 @@ AddLastMobileBattleToLinkRecord: ; 3fa42 call .StoreResult call .FindOpponentAndAppendRecord ret -; 3faa0 -.StoreResult: ; 3faa0 +.StoreResult: ld a, [wBattleResult] and $f cp LOSE @@ -9018,9 +8765,8 @@ AddLastMobileBattleToLinkRecord: ; 3fa42 dec hl inc [hl] ret -; 3fabe -.CheckOverflow: ; 3fabe +.CheckOverflow: dec hl ld a, [hl] inc hl @@ -9029,9 +8775,8 @@ AddLastMobileBattleToLinkRecord: ; 3fa42 ld a, [hl] cp LOW(MAX_LINK_RECORD) ret -; 3fac8 -.FindOpponentAndAppendRecord: ; 3fac8 +.FindOpponentAndAppendRecord: ld b, 5 ld hl, sLinkBattleRecord + 17 ld de, wd002 @@ -9123,9 +8868,8 @@ AddLastMobileBattleToLinkRecord: ; 3fa42 pop de call CopyBytes ret -; 3fb54 -.LoadPointer: ; 3fb54 +.LoadPointer: ld e, $0 ld a, [hld] ld c, a @@ -9150,9 +8894,8 @@ AddLastMobileBattleToLinkRecord: ; 3fa42 ret nc inc e ret -; 3fb6c -InitBattleDisplay: ; 3fb6c +InitBattleDisplay: call .InitBackPic hlcoord 0, 12 ld b, 4 @@ -9195,9 +8938,8 @@ InitBattleDisplay: ; 3fb6c xor a ld [hSCX], a ret -; 3fbd6 -.BlankBGMap: ; 3fbd6 +.BlankBGMap: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -9216,15 +8958,13 @@ InitBattleDisplay: ; 3fb6c pop af ld [rSVBK], a ret -; 3fbf8 -.InitBackPic: ; 3fbf8 +.InitBackPic: call GetTrainerBackpic call CopyBackpic ret -; 3fbff -GetTrainerBackpic: ; 3fbff +GetTrainerBackpic: ; Load the player character's backpic (6x6) into VRAM starting from vTiles2 tile $31. ; Special exception for Dude. @@ -9256,9 +8996,8 @@ GetTrainerBackpic: ; 3fbff ld c, 7 * 7 predef DecompressGet2bpp ret -; 3fc30 -CopyBackpic: ; 3fc30 +CopyBackpic: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -9278,9 +9017,8 @@ CopyBackpic: ; 3fc30 lb bc, 6, 6 predef PlaceGraphic ret -; 3fc5b -.LoadTrainerBackpicAsOAM: ; 3fc5b +.LoadTrainerBackpicAsOAM: ld hl, wVirtualOAMSprite00 xor a ld [hMapObjectIndexBuffer], a @@ -9314,9 +9052,8 @@ CopyBackpic: ; 3fc30 dec b jr nz, .outer_loop ret -; 3fc8b -BattleStartMessage: ; 3fc8b +BattleStartMessage: ld a, [wBattleMode] dec a jr z, .wild @@ -9397,4 +9134,3 @@ BattleStartMessage: ; 3fc8b farcall Mobile_PrintOpponentBattleMessage ret -; 3fd26 diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm index ff114d870f6..07e8b3a2a3b 100644 --- a/engine/battle/effect_commands.asm +++ b/engine/battle/effect_commands.asm @@ -1,4 +1,4 @@ -DoPlayerTurn: ; 34000 +DoPlayerTurn: call SetPlayerTurn ld a, [wBattlePlayerAction] @@ -7,10 +7,9 @@ DoPlayerTurn: ; 34000 jr DoTurn -; 3400a -DoEnemyTurn: ; 3400a +DoEnemyTurn: call SetEnemyTurn ld a, [wLinkMode] @@ -24,10 +23,9 @@ DoEnemyTurn: ; 3400a ret nc ; fallthrough -; 3401d -DoTurn: ; 3401d +DoTurn: ; Read in and execute the user's move effects for this turn. xor a @@ -41,10 +39,9 @@ DoTurn: ; 3401d ret nz call UpdateMoveData -; 3402c -DoMove: ; 3402c +DoMove: ; Get the user's move effect. ld a, BATTLE_VARS_MOVE_EFFECT call GetBattleVar @@ -115,11 +112,10 @@ DoMove: ; 3402c .DoMoveEffectCommand: jp hl -; 34084 CheckTurn: -BattleCommand_CheckTurn: ; 34084 +BattleCommand_CheckTurn: ; checkturn ; Repurposed as hardcoded turn handling. Useless as a command. @@ -353,10 +349,9 @@ CheckPlayerTurn: call CantMove jp EndTurn -; 341f0 -CantMove: ; 341f0 +CantMove: ld a, BATTLE_VARS_SUBSTATUS1 call GetBattleVarAddr res SUBSTATUS_ROLLOUT, [hl] @@ -382,20 +377,18 @@ CantMove: ; 341f0 res SUBSTATUS_FLYING, [hl] jp AppearUserRaiseSub -; 34216 -OpponentCantMove: ; 34216 +OpponentCantMove: call BattleCommand_SwitchTurn call CantMove jp BattleCommand_SwitchTurn -; 3421f -CheckEnemyTurn: ; 3421f +CheckEnemyTurn: ld hl, wEnemySubStatus4 bit SUBSTATUS_RECHARGE, [hl] @@ -621,18 +614,16 @@ CheckEnemyTurn: ; 3421f call CantMove ; fallthrough -; 34385 -EndTurn: ; 34385 +EndTurn: ld a, $1 ld [wTurnEnded], a jp ResetDamage -; 3438d -MoveDisabled: ; 3438d +MoveDisabled: ; Make sure any charged moves fail ld a, BATTLE_VARS_SUBSTATUS3 @@ -647,10 +638,9 @@ MoveDisabled: ; 3438d ld hl, DisabledMoveText jp StdBattleTextBox -; 343a5 -HitConfusion: ; 343a5 +HitConfusion: ld hl, HurtItselfText call StdBattleTextBox @@ -680,10 +670,9 @@ HitConfusion: ; 343a5 call DoPlayerDamage jp BattleCommand_RaiseSub -; 343db -BattleCommand_CheckObedience: ; 343db +BattleCommand_CheckObedience: ; checkobedience ; Enemy can't disobey @@ -984,10 +973,9 @@ BattleCommand_CheckObedience: ; 343db jp EndMoveEffect -; 3451f -IgnoreSleepOnly: ; 3451f +IgnoreSleepOnly: ld a, BATTLE_VARS_MOVE_ANIM call GetBattleVar @@ -1015,18 +1003,16 @@ IgnoreSleepOnly: ; 3451f scf ret -; 34541 -BattleCommand_UsedMoveText: ; 34541 +BattleCommand_UsedMoveText: ; usedmovetext farcall DisplayUsedMoveText ret -; 34548 -CheckUserIsCharging: ; 34548 +CheckUserIsCharging: ld a, [hBattleTurn] and a @@ -1037,10 +1023,9 @@ CheckUserIsCharging: ; 34548 and a ret -; 34555 -BattleCommand_DoTurn: ; 34555 +BattleCommand_DoTurn: call CheckUserIsCharging ret nz @@ -1165,9 +1150,8 @@ BattleCommand_DoTurn: ; 34555 ld b, 1 ret -; 34602 -.continuousmoves ; 34602 +.continuousmoves db EFFECT_RAZOR_WIND db EFFECT_SKY_ATTACK db EFFECT_SKULL_BASH @@ -1177,9 +1161,8 @@ BattleCommand_DoTurn: ; 34555 db EFFECT_BIDE db EFFECT_RAMPAGE db -1 -; 3460b -CheckMimicUsed: ; 3460b +CheckMimicUsed: ld a, [hBattleTurn] and a ld a, [wCurMoveNum] @@ -1209,10 +1192,9 @@ CheckMimicUsed: ; 3460b and a ret -; 34631 -BattleCommand_Critical: ; 34631 +BattleCommand_Critical: ; critical ; Determine whether this attack's hit will be critical. @@ -1303,13 +1285,12 @@ BattleCommand_Critical: ; 34631 ret INCLUDE "data/battle/critical_hits.asm" -; 346b2 INCLUDE "engine/battle/move_effects/triple_kick.asm" -BattleCommand_Stab: ; 346d2 +BattleCommand_Stab: ; STAB = Same Type Attack Bonus ld a, BATTLE_VARS_MOVE_ANIM call GetBattleVar @@ -1493,16 +1474,15 @@ BattleCommand_Stab: ; 346d2 ld [wTypeModifier], a ret -; 347c8 -BattleCheckTypeMatchup: ; 347c8 +BattleCheckTypeMatchup: ld hl, wEnemyMonType1 ld a, [hBattleTurn] and a jr z, CheckTypeMatchup ld hl, wBattleMonType1 -CheckTypeMatchup: ; 347d3 +CheckTypeMatchup: ; There is an incorrect assumption about this function made in the AI related code: when ; the AI calls CheckTypeMatchup (not BattleCheckTypeMatchup), it assumes that placing the ; offensive type in a will make this function do the right thing. Since a is overwritten, @@ -1575,10 +1555,9 @@ CheckTypeMatchup: ; 347d3 pop hl ret -; 34833 -BattleCommand_ResetTypeMatchup: ; 34833 +BattleCommand_ResetTypeMatchup: ; Reset the type matchup multiplier to 1.0, if the type matchup is not 0. ; If there is immunity in play, the move automatically misses. call BattleCheckTypeMatchup @@ -1597,7 +1576,6 @@ BattleCommand_ResetTypeMatchup: ; 34833 ld [wTypeMatchup], a ret -; 3484e INCLUDE "engine/battle/ai/switch.asm" @@ -1605,7 +1583,7 @@ INCLUDE "engine/battle/ai/switch.asm" INCLUDE "data/types/type_matchups.asm" -BattleCommand_DamageVariation: ; 34cfd +BattleCommand_DamageVariation: ; damagevariation ; Modify the damage spread between 85% and 100%. @@ -1658,10 +1636,9 @@ BattleCommand_DamageVariation: ; 34cfd ld [hl], a ret -; 34d32 -BattleCommand_CheckHit: ; 34d32 +BattleCommand_CheckHit: ; checkhit call .DreamEater @@ -1977,10 +1954,9 @@ BattleCommand_CheckHit: ; 34d32 ret INCLUDE "data/battle/accuracy_multipliers.asm" -; 34ecc -BattleCommand_EffectChance: ; 34ecc +BattleCommand_EffectChance: ; effectchance xor a @@ -2007,10 +1983,9 @@ BattleCommand_EffectChance: ; 34ecc and a ret -; 34eee -BattleCommand_LowerSub: ; 34eee +BattleCommand_LowerSub: ; lowersub ld a, BATTLE_VARS_SUBSTATUS4 @@ -2078,19 +2053,17 @@ BattleCommand_LowerSub: ; 34eee ld [wSomeoneIsRampaging], a ret -; 34f57 -BattleCommand_MoveAnim: ; 34f57 +BattleCommand_MoveAnim: ; moveanim call BattleCommand_LowerSub call BattleCommand_MoveAnimNoSub jp BattleCommand_RaiseSub -; 34f60 -BattleCommand_MoveAnimNoSub: ; 34f60 +BattleCommand_MoveAnimNoSub: ld a, [wAttackMissed] and a jp nz, BattleCommand_MoveDelay @@ -2154,10 +2127,9 @@ BattleCommand_MoveAnimNoSub: ; 34f60 ld [wNumHits], a jp PlayFXAnimID -; 34fd1 -BattleCommand_StatUpAnim: ; 34fd1 +BattleCommand_StatUpAnim: ld a, [wAttackMissed] and a jp nz, BattleCommand_MoveDelay @@ -2165,10 +2137,9 @@ BattleCommand_StatUpAnim: ; 34fd1 xor a jr BattleCommand_StatUpDownAnim -; 34fdb -BattleCommand_StatDownAnim: ; 34fdb +BattleCommand_StatDownAnim: ld a, [wAttackMissed] and a jp nz, BattleCommand_MoveDelay @@ -2180,10 +2151,9 @@ BattleCommand_StatDownAnim: ; 34fdb ld a, BATTLEANIM_WOBBLE ; fallthrough -; 34feb -BattleCommand_StatUpDownAnim: ; 34feb +BattleCommand_StatUpDownAnim: ld [wNumHits], a xor a ld [wKickCounter], a @@ -2193,10 +2163,9 @@ BattleCommand_StatUpDownAnim: ; 34feb ld d, 0 jp PlayFXAnimID -; 34ffd -BattleCommand_SwitchTurn: ; 34ffd +BattleCommand_SwitchTurn: ; switchturn ld a, [hBattleTurn] @@ -2204,10 +2173,9 @@ BattleCommand_SwitchTurn: ; 34ffd ld [hBattleTurn], a ret -; 35004 -BattleCommand_RaiseSub: ; 35004 +BattleCommand_RaiseSub: ; raisesub ld a, BATTLE_VARS_SUBSTATUS4 @@ -2226,10 +2194,9 @@ BattleCommand_RaiseSub: ; 35004 ld a, SUBSTITUTE jp LoadAnim -; 35023 -BattleCommand_FailureText: ; 35023 +BattleCommand_FailureText: ; failuretext ; If the move missed or failed, load the appropriate ; text, and end the effects of multi-turn or multi- @@ -2271,10 +2238,9 @@ BattleCommand_FailureText: ; 35023 call AppearUserRaiseSub jp EndMoveEffect -; 3505e -BattleCommand_ApplyDamage: ; 3505e +BattleCommand_ApplyDamage: ; applydamage ld a, BATTLE_VARS_SUBSTATUS1_OPP @@ -2366,10 +2332,9 @@ BattleCommand_ApplyDamage: ; 3505e ld [de], a ret -; 350e4 -GetFailureResultText: ; 350e4 +GetFailureResultText: ld hl, DoesntAffectText ld de, DoesntAffectText ld a, [wTypeModifier] @@ -2427,7 +2392,7 @@ endr jp nz, DoEnemyDamage jp DoPlayerDamage -FailText_CheckOpponentProtect: ; 35157 +FailText_CheckOpponentProtect: ld a, BATTLE_VARS_SUBSTATUS1_OPP call GetBattleVar bit SUBSTATUS_PROTECT, a @@ -2437,10 +2402,9 @@ FailText_CheckOpponentProtect: ; 35157 .not_protected jp StdBattleTextBox -; 35165 -BattleCommand_BideFailText: ; 35165 +BattleCommand_BideFailText: ld a, [wAttackMissed] and a ret z @@ -2450,10 +2414,9 @@ BattleCommand_BideFailText: ; 35165 jp z, PrintDoesntAffect jp PrintButItFailed -; 35175 -BattleCommand_CriticalText: ; 35175 +BattleCommand_CriticalText: ; criticaltext ; Prints the message for critical hits or one-hit KOs. @@ -2483,10 +2446,9 @@ BattleCommand_CriticalText: ; 35175 .texts dw CriticalHitText dw OneHitKOText -; 35197 -BattleCommand_StartLoop: ; 35197 +BattleCommand_StartLoop: ; startloop ld hl, wPlayerRolloutCount @@ -2499,10 +2461,9 @@ BattleCommand_StartLoop: ; 35197 ld [hl], a ret -; 351a5 -BattleCommand_SuperEffectiveLoopText: ; 351a5 +BattleCommand_SuperEffectiveLoopText: ; supereffectivelooptext ld a, BATTLE_VARS_SUBSTATUS3 @@ -2511,10 +2472,9 @@ BattleCommand_SuperEffectiveLoopText: ; 351a5 ret nz ; fallthrough -; 351ad -BattleCommand_SuperEffectiveText: ; 351ad +BattleCommand_SuperEffectiveText: ; supereffectivetext ld a, [wTypeModifier] @@ -2527,10 +2487,9 @@ BattleCommand_SuperEffectiveText: ; 351ad .print jp StdBattleTextBox -; 351c0 -BattleCommand_CheckDestinyBond: ; 351c0 +BattleCommand_CheckDestinyBond: ; checkdestinybond ; Faint the user if it fainted an opponent using Destiny Bond. @@ -2617,10 +2576,9 @@ BattleCommand_CheckDestinyBond: ; 351c0 .finish jp EndMoveEffect -; 35250 -BattleCommand_BuildOpponentRage: ; 35250 +BattleCommand_BuildOpponentRage: ; buildopponentrage jp .start @@ -2651,10 +2609,9 @@ BattleCommand_BuildOpponentRage: ; 35250 call StdBattleTextBox jp BattleCommand_SwitchTurn -; 3527b -BattleCommand_RageDamage: ; 3527b +BattleCommand_RageDamage: ; ragedamage ld a, [wCurDamage] @@ -2682,10 +2639,9 @@ BattleCommand_RageDamage: ; 3527b ld [wCurDamage + 1], a ret -; 352a3 -EndMoveEffect: ; 352a3 +EndMoveEffect: ld a, [wBattleScriptBufferAddress] ld l, a ld a, [wBattleScriptBufferAddress + 1] @@ -2696,10 +2652,9 @@ EndMoveEffect: ; 352a3 ld [hl], a ret -; 352b1 -DittoMetalPowder: ; 352b1 +DittoMetalPowder: ld a, MON_SPECIES call BattlePartyAttr ld a, [hBattleTurn] @@ -2735,10 +2690,9 @@ DittoMetalPowder: ; 352b1 rr c ret -; 352dc -BattleCommand_DamageStats: ; 352dc +BattleCommand_DamageStats: ; damagestats ld a, [hBattleTurn] @@ -2746,10 +2700,9 @@ BattleCommand_DamageStats: ; 352dc jp nz, EnemyAttackDamage ; fallthrough -; 352e2 -PlayerAttackDamage: ; 352e2 +PlayerAttackDamage: ; Return move power d, player level e, enemy defense c and player attack b. call ResetDamage @@ -2831,10 +2784,9 @@ PlayerAttackDamage: ; 352e2 and a ret -; 3534d -TruncateHL_BC: ; 3534d +TruncateHL_BC: .loop ; Truncate 16-bit values hl and bc to 8-bit values b and c respectively. ; b = hl, c = bc @@ -2879,10 +2831,9 @@ TruncateHL_BC: ; 3534d ld b, l ret -; 35378 -GetDamageStatsCritical: ; 35378 +GetDamageStatsCritical: ; Return carry if non-critical. ld a, [wCriticalHit] @@ -2891,10 +2842,9 @@ GetDamageStatsCritical: ; 35378 ret z ; fallthrough -; 3537e -GetDamageStats: ; 3537e +GetDamageStats: ; Return the attacker's offensive stat and the defender's defensive ; stat based on whether the attacking type is physical or special. @@ -2934,10 +2884,9 @@ GetDamageStats: ; 3537e pop hl ret -; 353b5 -ThickClubBoost: ; 353b5 +ThickClubBoost: ; Return in hl the stat value at hl. ; If the attacking monster is Cubone or Marowak and @@ -2952,10 +2901,9 @@ ThickClubBoost: ; 353b5 pop bc ret -; 353c3 -LightBallBoost: ; 353c3 +LightBallBoost: ; Return in hl the stat value at hl. ; If the attacking monster is Pikachu and it's @@ -2970,10 +2918,9 @@ LightBallBoost: ; 353c3 pop bc ret -; 353d1 -SpeciesItemBoost: ; 353d1 +SpeciesItemBoost: ; Return in hl the stat value at hl. ; If the attacking monster is species b or c and @@ -3013,10 +2960,9 @@ SpeciesItemBoost: ; 353d1 rl h ret -; 353f6 -EnemyAttackDamage: ; 353f6 +EnemyAttackDamage: call ResetDamage ; No damage dealt with 0 power. @@ -3094,13 +3040,12 @@ EnemyAttackDamage: ; 353f6 and a ret -; 35461 INCLUDE "engine/battle/move_effects/beat_up.asm" -BattleCommand_ClearMissDamage: ; 355d5 +BattleCommand_ClearMissDamage: ; clearmissdamage ld a, [wAttackMissed] and a @@ -3108,10 +3053,9 @@ BattleCommand_ClearMissDamage: ; 355d5 jp ResetDamage -; 355dd -HitSelfInConfusion: ; 355dd +HitSelfInConfusion: call ResetDamage ld a, [hBattleTurn] and a @@ -3147,10 +3091,9 @@ HitSelfInConfusion: ; 355dd ld e, a ret -; 35612 -BattleCommand_DamageCalc: ; 35612 +BattleCommand_DamageCalc: ; damagecalc ; Return a damage value for move power d, player level e, enemy defense c and player attack b. @@ -3382,13 +3325,12 @@ BattleCommand_DamageCalc: ; 35612 ret -; 35703 INCLUDE "data/types/type_boost_items.asm" -BattleCommand_ConstantDamage: ; 35726 +BattleCommand_ConstantDamage: ; constantdamage ld hl, wBattleMonLevel @@ -3564,7 +3506,7 @@ INCLUDE "engine/battle/move_effects/lock_on.asm" INCLUDE "engine/battle/move_effects/sketch.asm" -BattleCommand_DefrostOpponent: ; 35b16 +BattleCommand_DefrostOpponent: ; defrostopponent ; Thaw the opponent if frozen, and ; raise the user's Attack one stage. @@ -3590,7 +3532,6 @@ BattleCommand_DefrostOpponent: ; 35b16 ld [hl], a ret -; 35b33 INCLUDE "engine/battle/move_effects/sleep_talk.asm" @@ -3604,7 +3545,7 @@ INCLUDE "engine/battle/move_effects/false_swipe.asm" INCLUDE "engine/battle/move_effects/heal_bell.asm" -FarPlayBattleAnimation: ; 35d00 +FarPlayBattleAnimation: ; play animation de ld a, BATTLE_VARS_SUBSTATUS3 @@ -3613,9 +3554,8 @@ FarPlayBattleAnimation: ; 35d00 ret nz ; fallthrough -; 35d08 -PlayFXAnimID: ; 35d08 +PlayFXAnimID: ld a, e ld [wFXAnimID], a ld a, d @@ -3626,10 +3566,9 @@ PlayFXAnimID: ; 35d08 callfar PlayBattleAnim ret -; 35d1c -DoEnemyDamage: ; 35d1c +DoEnemyDamage: ld hl, wCurDamage ld a, [hli] ld b, a @@ -3689,10 +3628,9 @@ DoEnemyDamage: ; 35d1c .did_no_damage jp RefreshBattleHuds -; 35d7e -DoPlayerDamage: ; 35d7e +DoPlayerDamage: ld hl, wCurDamage ld a, [hli] ld b, a @@ -3752,10 +3690,9 @@ DoPlayerDamage: ; 35d7e .did_no_damage jp RefreshBattleHuds -; 35de0 -DoSubstituteDamage: ; 35de0 +DoSubstituteDamage: ld hl, SubTookDamageText call StdBattleTextBox @@ -3812,10 +3749,9 @@ DoSubstituteDamage: ; 35de0 .done jp ResetDamage -; 35e40 -UpdateMoveData: ; 35e40 +UpdateMoveData: ld a, BATTLE_VARS_MOVE_ANIM call GetBattleVarAddr @@ -3832,10 +3768,9 @@ UpdateMoveData: ; 35e40 call GetMoveName jp CopyName1 -; 35e5c -BattleCommand_SleepTarget: ; 35e5c +BattleCommand_SleepTarget: ; sleeptarget call GetOpponentItem @@ -3906,10 +3841,9 @@ BattleCommand_SleepTarget: ; 35e5c pop hl jp StdBattleTextBox -; 35ece -.CheckAIRandomFail: ; 35ece +.CheckAIRandomFail: ; Enemy turn ld a, [hBattleTurn] and a @@ -3937,10 +3871,9 @@ BattleCommand_SleepTarget: ; 35e5c xor a ret -; 35eee -BattleCommand_PoisonTarget: ; 35eee +BattleCommand_PoisonTarget: ; poisontarget call CheckSubstituteOpp @@ -3975,10 +3908,9 @@ BattleCommand_PoisonTarget: ; 35eee farcall UseHeldStatusHealingItem ret -; 35f2c -BattleCommand_Poison: ; 35f2c +BattleCommand_Poison: ; poison ld hl, DoesntAffectText @@ -4066,18 +3998,16 @@ BattleCommand_Poison: ; 35f2c pop hl jp StdBattleTextBox -; 35fc0 -.apply_poison ; 35fc0 +.apply_poison call AnimateCurrentMove call PoisonOpponent jp RefreshBattleHuds -; 35fc9 -.check_toxic ; 35fc9 +.check_toxic ld a, BATTLE_VARS_SUBSTATUS5_OPP call GetBattleVarAddr ld a, [hBattleTurn] @@ -4091,10 +4021,9 @@ BattleCommand_Poison: ; 35f2c cp EFFECT_TOXIC ret -; 35fe1 -CheckIfTargetIsPoisonType: ; 35fe1 +CheckIfTargetIsPoisonType: ld de, wEnemyMonType1 ld a, [hBattleTurn] and a @@ -4109,37 +4038,33 @@ CheckIfTargetIsPoisonType: ; 35fe1 cp POISON ret -; 35ff5 -PoisonOpponent: ; 35ff5 +PoisonOpponent: ld a, BATTLE_VARS_STATUS_OPP call GetBattleVarAddr set PSN, [hl] jp UpdateOpponentInParty -; 35fff -BattleCommand_DrainTarget: ; 35fff +BattleCommand_DrainTarget: ; draintarget call SapHealth ld hl, SuckedHealthText jp StdBattleTextBox -; 36008 -BattleCommand_EatDream: ; 36008 +BattleCommand_EatDream: ; eatdream call SapHealth ld hl, DreamEatenText jp StdBattleTextBox -; 36011 -SapHealth: ; 36011 +SapHealth: ; Divide damage by 2, store it in hDividend ld hl, wCurDamage ld a, [hli] @@ -4232,10 +4157,9 @@ SapHealth: ; 36011 call RefreshBattleHuds jp UpdateBattleMonInParty -; 3608c -BattleCommand_BurnTarget: ; 3608c +BattleCommand_BurnTarget: ; burntarget xor a @@ -4276,10 +4200,9 @@ BattleCommand_BurnTarget: ; 3608c farcall UseHeldStatusHealingItem ret -; 360dd -Defrost: ; 360dd +Defrost: ld a, [hl] and 1 << FRZ ret z @@ -4304,10 +4227,9 @@ Defrost: ; 360dd ld hl, DefrostedOpponentText jp StdBattleTextBox -; 36102 -BattleCommand_FreezeTarget: ; 36102 +BattleCommand_FreezeTarget: ; freezetarget xor a @@ -4360,10 +4282,9 @@ BattleCommand_FreezeTarget: ; 36102 ld [hl], $1 ret -; 36165 -BattleCommand_ParalyzeTarget: ; 36165 +BattleCommand_ParalyzeTarget: ; paralyzetarget xor a @@ -4399,80 +4320,79 @@ BattleCommand_ParalyzeTarget: ; 36165 ld hl, UseHeldStatusHealingItem jp CallBattleCore -; 361ac -BattleCommand_AttackUp: ; 361ac +BattleCommand_AttackUp: ; attackup ld b, ATTACK jr BattleCommand_StatUp -BattleCommand_DefenseUp: ; 361b0 +BattleCommand_DefenseUp: ; defenseup ld b, DEFENSE jr BattleCommand_StatUp -BattleCommand_SpeedUp: ; 361b4 +BattleCommand_SpeedUp: ; speedup ld b, SPEED jr BattleCommand_StatUp -BattleCommand_SpecialAttackUp: ; 361b8 +BattleCommand_SpecialAttackUp: ; specialattackup ld b, SP_ATTACK jr BattleCommand_StatUp -BattleCommand_SpecialDefenseUp: ; 361bc +BattleCommand_SpecialDefenseUp: ; specialdefenseup ld b, SP_DEFENSE jr BattleCommand_StatUp -BattleCommand_AccuracyUp: ; 361c0 +BattleCommand_AccuracyUp: ; accuracyup ld b, ACCURACY jr BattleCommand_StatUp -BattleCommand_EvasionUp: ; 361c4 +BattleCommand_EvasionUp: ; evasionup ld b, EVASION jr BattleCommand_StatUp -BattleCommand_AttackUp2: ; 361c8 +BattleCommand_AttackUp2: ; attackup2 ld b, $10 | ATTACK jr BattleCommand_StatUp -BattleCommand_DefenseUp2: ; 361cc +BattleCommand_DefenseUp2: ; defenseup2 ld b, $10 | DEFENSE jr BattleCommand_StatUp -BattleCommand_SpeedUp2: ; 361d0 +BattleCommand_SpeedUp2: ; speedup2 ld b, $10 | SPEED jr BattleCommand_StatUp -BattleCommand_SpecialAttackUp2: ; 361d4 +BattleCommand_SpecialAttackUp2: ; specialattackup2 ld b, $10 | SP_ATTACK jr BattleCommand_StatUp -BattleCommand_SpecialDefenseUp2: ; 361d8 +BattleCommand_SpecialDefenseUp2: ; specialdefenseup2 ld b, $10 | SP_DEFENSE jr BattleCommand_StatUp -BattleCommand_AccuracyUp2: ; 361dc +BattleCommand_AccuracyUp2: ; accuracyup2 ld b, $10 | ACCURACY jr BattleCommand_StatUp -BattleCommand_EvasionUp2: ; 361e0 +BattleCommand_EvasionUp2: ; evasionup2 ld b, $10 | EVASION jr BattleCommand_StatUp -BattleCommand_StatUp: ; 361e4 +BattleCommand_StatUp: ; statup call CheckIfStatCanBeRaised ld a, [wFailedMessage] @@ -4480,10 +4400,9 @@ BattleCommand_StatUp: ; 361e4 ret nz jp StatUpAnimation -; 361ef -CheckIfStatCanBeRaised: ; 361ef +CheckIfStatCanBeRaised: ld a, b ld [wLoweredStat], a ld hl, wPlayerStatLevels @@ -4562,35 +4481,31 @@ CheckIfStatCanBeRaised: ; 361ef ld [wFailedMessage], a ret -; 3626e -.stats_already_max ; 3626e +.stats_already_max pop hl dec [hl] ; fallthrough -; 36270 -.cant_raise_stat ; 36270 +.cant_raise_stat ld a, $2 ld [wFailedMessage], a ld a, $1 ld [wAttackMissed], a ret -; 3627b -.stat_raise_failed ; 3627b +.stat_raise_failed ld a, $1 ld [wFailedMessage], a ret -; 36281 -StatUpAnimation: ; 36281 +StatUpAnimation: ld bc, wPlayerMinimized ld hl, DropPlayerSub ld a, [hBattleTurn] @@ -4615,79 +4530,78 @@ StatUpAnimation: ; 36281 call WaitBGMap jp BattleCommand_MoveDelay -; 362ad -BattleCommand_AttackDown: ; 362ad +BattleCommand_AttackDown: ; attackdown ld a, ATTACK jr BattleCommand_StatDown -BattleCommand_DefenseDown: ; 362b1 +BattleCommand_DefenseDown: ; defensedown ld a, DEFENSE jr BattleCommand_StatDown -BattleCommand_SpeedDown: ; 362b5 +BattleCommand_SpeedDown: ; speeddown ld a, SPEED jr BattleCommand_StatDown -BattleCommand_SpecialAttackDown: ; 362b9 +BattleCommand_SpecialAttackDown: ; specialattackdown ld a, SP_ATTACK jr BattleCommand_StatDown -BattleCommand_SpecialDefenseDown: ; 362bd +BattleCommand_SpecialDefenseDown: ; specialdefensedown ld a, SP_DEFENSE jr BattleCommand_StatDown -BattleCommand_AccuracyDown: ; 362c1 +BattleCommand_AccuracyDown: ; accuracydown ld a, ACCURACY jr BattleCommand_StatDown -BattleCommand_EvasionDown: ; 362c5 +BattleCommand_EvasionDown: ; evasiondown ld a, EVASION jr BattleCommand_StatDown -BattleCommand_AttackDown2: ; 362c9 +BattleCommand_AttackDown2: ; attackdown2 ld a, $10 | ATTACK jr BattleCommand_StatDown -BattleCommand_DefenseDown2: ; 362cd +BattleCommand_DefenseDown2: ; defensedown2 ld a, $10 | DEFENSE jr BattleCommand_StatDown -BattleCommand_SpeedDown2: ; 362d1 +BattleCommand_SpeedDown2: ; speeddown2 ld a, $10 | SPEED jr BattleCommand_StatDown -BattleCommand_SpecialAttackDown2: ; 362d5 +BattleCommand_SpecialAttackDown2: ; specialattackdown2 ld a, $10 | SP_ATTACK jr BattleCommand_StatDown -BattleCommand_SpecialDefenseDown2: ; 362d9 +BattleCommand_SpecialDefenseDown2: ; specialdefensedown2 ld a, $10 | SP_DEFENSE jr BattleCommand_StatDown -BattleCommand_AccuracyDown2: ; 362dd +BattleCommand_AccuracyDown2: ; accuracydown2 ld a, $10 | ACCURACY jr BattleCommand_StatDown -BattleCommand_EvasionDown2: ; 362e1 +BattleCommand_EvasionDown2: ; evasiondown2 ld a, $10 | EVASION -BattleCommand_StatDown: ; 362e3 +BattleCommand_StatDown: ; statdown ld [wLoweredStat], a @@ -4810,10 +4724,9 @@ BattleCommand_StatDown: ; 362e3 ld [wAttackMissed], a ret -; 36391 -CheckMist: ; 36391 +CheckMist: ld a, BATTLE_VARS_MOVE_EFFECT call GetBattleVar cp EFFECT_ATTACK_DOWN @@ -4838,10 +4751,9 @@ CheckMist: ; 36391 bit SUBSTATUS_MIST, a ret -; 363b8 -BattleCommand_StatUpMessage: ; 363b8 +BattleCommand_StatUpMessage: ld a, [wFailedMessage] and a ret nz @@ -4871,10 +4783,9 @@ BattleCommand_StatUpMessage: ; 363b8 text_jump UnknownText_0x1c0ce0 db "@" -; 363e9 -BattleCommand_StatDownMessage: ; 363e9 +BattleCommand_StatDownMessage: ld a, [wFailedMessage] and a ret nz @@ -4903,10 +4814,9 @@ BattleCommand_StatDownMessage: ; 363e9 text_jump UnknownText_0x1c0d06 db "@" -; 3641a -TryLowerStat: ; 3641a +TryLowerStat: ; Lower stat c from stat struct hl (buffer de). push bc @@ -4949,10 +4859,9 @@ TryLowerStat: ; 3641a and a ret -; 3644c -BattleCommand_StatUpFailText: ; 3644c +BattleCommand_StatUpFailText: ; statupfailtext ld a, [wFailedMessage] and a @@ -4970,10 +4879,9 @@ BattleCommand_StatUpFailText: ; 3644c ld hl, WontRiseAnymoreText jp StdBattleTextBox -; 3646a -BattleCommand_StatDownFailText: ; 3646a +BattleCommand_StatDownFailText: ; statdownfailtext ld a, [wFailedMessage] and a @@ -4994,10 +4902,9 @@ BattleCommand_StatDownFailText: ; 3646a ld hl, WontDropAnymoreText jp StdBattleTextBox -; 3648f -GetStatName: ; 3648f +GetStatName: ld hl, StatNames ld c, "@" .CheckName: @@ -5020,7 +4927,7 @@ INCLUDE "data/battle/stat_names.asm" INCLUDE "data/battle/stat_multipliers.asm" -BattleCommand_AllStatsUp: ; 36500 +BattleCommand_AllStatsUp: ; allstatsup ; Attack @@ -5047,18 +4954,16 @@ BattleCommand_AllStatsUp: ; 36500 call ResetMiss call BattleCommand_SpecialDefenseUp jp BattleCommand_StatUpMessage -; 3652d -ResetMiss: ; 3652d +ResetMiss: xor a ld [wAttackMissed], a ret -; 36532 -LowerStat: ; 36532 +LowerStat: ld [wLoweredStat], a ld hl, wPlayerStatLevels @@ -5129,10 +5034,9 @@ LowerStat: ; 36532 ld [wFailedMessage], a ret -; 3658f -BattleCommand_TriStatusChance: ; 3658f +BattleCommand_TriStatusChance: ; tristatuschance call BattleCommand_EffectChance @@ -5152,20 +5056,18 @@ BattleCommand_TriStatusChance: ; 3658f dw BattleCommand_ParalyzeTarget ; paralyze dw BattleCommand_FreezeTarget ; freeze dw BattleCommand_BurnTarget ; burn -; 365a7 -BattleCommand_Curl: ; 365a7 +BattleCommand_Curl: ; curl ld a, BATTLE_VARS_SUBSTATUS2 call GetBattleVarAddr set SUBSTATUS_CURLED, [hl] ret -; 365af -BattleCommand_RaiseSubNoAnim: ; 365af +BattleCommand_RaiseSubNoAnim: ld hl, GetBattleMonBackpic ld a, [hBattleTurn] and a @@ -5177,10 +5079,9 @@ BattleCommand_RaiseSubNoAnim: ; 365af call CallBattleCore jp WaitBGMap -; 365c3 -BattleCommand_LowerSubNoAnim: ; 365c3 +BattleCommand_LowerSubNoAnim: ld hl, DropPlayerSub ld a, [hBattleTurn] and a @@ -5192,10 +5093,9 @@ BattleCommand_LowerSubNoAnim: ; 365c3 call CallBattleCore jp WaitBGMap -; 365d7 -CalcPlayerStats: ; 365d7 +CalcPlayerStats: ld hl, wPlayerAtkLevel ld de, wPlayerStats ld bc, wBattleMonAttack @@ -5216,10 +5116,9 @@ CalcPlayerStats: ; 365d7 jp BattleCommand_SwitchTurn -; 365fd -CalcEnemyStats: ; 365fd +CalcEnemyStats: ld hl, wEnemyAtkLevel ld de, wEnemyStats ld bc, wEnemyMonAttack @@ -5237,10 +5136,9 @@ CalcEnemyStats: ; 365fd jp BattleCommand_SwitchTurn -; 3661d -CalcStats: ; 3661d +CalcStats: .loop push af ld a, [hli] @@ -5309,13 +5207,12 @@ CalcStats: ; 3661d ret -; 36671 INCLUDE "engine/battle/move_effects/bide.asm" -BattleCommand_CheckRampage: ; 3671a +BattleCommand_CheckRampage: ; checkrampage ld de, wPlayerRolloutCount @@ -5352,10 +5249,9 @@ BattleCommand_CheckRampage: ; 3671a ld b, rampage_command jp SkipToBattleCommand -; 36751 -BattleCommand_Rampage: ; 36751 +BattleCommand_Rampage: ; rampage ; No rampage during Sleep Talk. @@ -5382,23 +5278,21 @@ BattleCommand_Rampage: ; 36751 ld [wSomeoneIsRampaging], a ret -; 36778 INCLUDE "engine/battle/move_effects/teleport.asm" -SetBattleDraw: ; 36804 +SetBattleDraw: ld a, [wBattleResult] and BATTLERESULT_BITMASK or DRAW ld [wBattleResult], a ret -; 3680f -BattleCommand_ForceSwitch: ; 3680f +BattleCommand_ForceSwitch: ; forceswitch ld a, [wBattleType] @@ -5617,10 +5511,9 @@ BattleCommand_ForceSwitch: ; 3680f .do_text jp StdBattleTextBox -; 36994 -CheckPlayerHasMonToSwitchTo: ; 36994 +CheckPlayerHasMonToSwitchTo: ld a, [wPartyCount] ld d, a ld e, 0 @@ -5649,10 +5542,9 @@ CheckPlayerHasMonToSwitchTo: ; 36994 and a ret -; 369b6 -BattleCommand_EndLoop: ; 369b6 +BattleCommand_EndLoop: ; endloop ; Loop back to 'critical'. @@ -5786,10 +5678,9 @@ BattleCommand_EndLoop: ; 369b6 ld [wBattleScriptBufferAddress], a ret -; 36a82 -BattleCommand_FakeOut: ; 36a82 +BattleCommand_FakeOut: ld a, [wAttackMissed] and a ret nz @@ -5810,10 +5701,9 @@ BattleCommand_FakeOut: ; 36a82 ld [wAttackMissed], a ret -; 36aa0 -BattleCommand_FlinchTarget: ; 36aa0 +BattleCommand_FlinchTarget: call CheckSubstituteOpp ret nz @@ -5830,19 +5720,17 @@ BattleCommand_FlinchTarget: ; 36aa0 ret nz ; fallthrough -; 36ab5 -FlinchTarget: ; 36ab5 +FlinchTarget: ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVarAddr set SUBSTATUS_FLINCHED, [hl] jp EndRechargeOpp -; 36abf -CheckOpponentWentFirst: ; 36abf +CheckOpponentWentFirst: ; Returns a=0, z if user went first ; Returns a=1, nz if opponent went first push bc @@ -5853,10 +5741,9 @@ CheckOpponentWentFirst: ; 36abf pop bc ret -; 36ac9 -BattleCommand_HeldFlinch: ; 36ac9 +BattleCommand_HeldFlinch: ; kingsrock ld a, [wAttackMissed] @@ -5884,10 +5771,9 @@ BattleCommand_HeldFlinch: ; 36ac9 set SUBSTATUS_FLINCHED, [hl] ret -; 36af3 -BattleCommand_OHKO: ; 36af3 +BattleCommand_OHKO: ; ohko call ResetDamage @@ -5933,10 +5819,9 @@ BattleCommand_OHKO: ; 36af3 ld [wAttackMissed], a ret -; 36b3a -BattleCommand_CheckCharge: ; 36b3a +BattleCommand_CheckCharge: ; checkcharge ld a, BATTLE_VARS_SUBSTATUS3 @@ -5949,10 +5834,9 @@ BattleCommand_CheckCharge: ; 36b3a ld b, charge_command jp SkipToBattleCommand -; 36b4d -BattleCommand_Charge: ; 36b4d +BattleCommand_Charge: ; charge call BattleCommand_ClearText @@ -6092,17 +5976,15 @@ BattleCommand_Charge: ; 36b4d ; 'dug a hole!' text_jump UnknownText_0x1c0d6c db "@" -; 36c2c -BattleCommand3c: ; 36c2c +BattleCommand3c: ; unused ret -; 36c2d -BattleCommand_TrapTarget: ; 36c2d +BattleCommand_TrapTarget: ; traptarget ld a, [wAttackMissed] @@ -6157,7 +6039,6 @@ BattleCommand_TrapTarget: ; 36c2d dbw FIRE_SPIN, FireSpinTrapText ; 'was trapped!' dbw CLAMP, ClampedByText ; 'was CLAMPED by' dbw WHIRLPOOL, WhirlpoolTrapText ; 'was trapped!' -; 36c7e INCLUDE "engine/battle/move_effects/mist.asm" @@ -6165,7 +6046,7 @@ INCLUDE "engine/battle/move_effects/mist.asm" INCLUDE "engine/battle/move_effects/focus_energy.asm" -BattleCommand_Recoil: ; 36cb2 +BattleCommand_Recoil: ; recoil ld hl, wBattleMonMaxHP @@ -6229,10 +6110,9 @@ BattleCommand_Recoil: ; 36cb2 ld hl, RecoilText jp StdBattleTextBox -; 36d1d -BattleCommand_ConfuseTarget: ; 36d1d +BattleCommand_ConfuseTarget: ; confusetarget call GetOpponentItem @@ -6253,7 +6133,7 @@ BattleCommand_ConfuseTarget: ; 36d1d jr BattleCommand_FinishConfusingTarget -BattleCommand_Confuse: ; 36d3b +BattleCommand_Confuse: ; confuse call GetOpponentItem @@ -6282,7 +6162,7 @@ BattleCommand_Confuse: ; 36d3b ld a, [wAttackMissed] and a jr nz, BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit -BattleCommand_FinishConfusingTarget: ; 36d70 +BattleCommand_FinishConfusingTarget: ld bc, wEnemyConfuseCount ld a, [hBattleTurn] and a @@ -6325,9 +6205,8 @@ BattleCommand_FinishConfusingTarget: ; 36d70 ld hl, UseConfusionHealingItem jp CallBattleCore -; 36db6 -BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit: ; 36db6 +BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit: ld a, BATTLE_VARS_MOVE_EFFECT call GetBattleVar cp EFFECT_CONFUSE_HIT @@ -6338,10 +6217,9 @@ BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit: ; 36db6 ret z jp PrintDidntAffect2 -; 36dc7 -BattleCommand_Paralyze: ; 36dc7 +BattleCommand_Paralyze: ; paralyze ld a, BATTLE_VARS_STATUS_OPP @@ -6421,10 +6299,9 @@ BattleCommand_Paralyze: ; 36dc7 call AnimateFailedMove jp PrintDoesntAffect -; 36e5b -CheckMoveTypeMatchesTarget: ; 36e5b +CheckMoveTypeMatchesTarget: ; Compare move type to opponent type. ; Return z if matching the opponent type, ; unless the move is Normal (Tri Attack). @@ -6459,23 +6336,21 @@ CheckMoveTypeMatchesTarget: ; 36e5b pop hl ret -; 36e7c INCLUDE "engine/battle/move_effects/substitute.asm" -BattleCommand_RechargeNextTurn: ; 36f0b +BattleCommand_RechargeNextTurn: ; rechargenextturn ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVarAddr set SUBSTATUS_RECHARGE, [hl] ret -; 36f13 -EndRechargeOpp: ; 36f13 +EndRechargeOpp: push hl ld a, BATTLE_VARS_SUBSTATUS4_OPP call GetBattleVarAddr @@ -6483,13 +6358,12 @@ EndRechargeOpp: ; 36f13 pop hl ret -; 36f1d INCLUDE "engine/battle/move_effects/rage.asm" -BattleCommand_DoubleFlyingDamage: ; 36f25 +BattleCommand_DoubleFlyingDamage: ; doubleflyingdamage ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVar @@ -6497,10 +6371,9 @@ BattleCommand_DoubleFlyingDamage: ; 36f25 ret z jr DoubleDamage -; 36f2f -BattleCommand_DoubleUndergroundDamage: ; 36f2f +BattleCommand_DoubleUndergroundDamage: ; doubleundergrounddamage ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVar @@ -6508,10 +6381,9 @@ BattleCommand_DoubleUndergroundDamage: ; 36f2f ret z ; fallthrough -; 36f37 -DoubleDamage: ; 36f37 +DoubleDamage: ld hl, wCurDamage + 1 sla [hl] dec hl @@ -6524,7 +6396,6 @@ DoubleDamage: ; 36f37 .quit ret -; 36f46 INCLUDE "engine/battle/move_effects/mimic.asm" @@ -6540,7 +6411,7 @@ INCLUDE "engine/battle/move_effects/pay_day.asm" INCLUDE "engine/battle/move_effects/conversion.asm" -BattleCommand_ResetStats: ; 3710e +BattleCommand_ResetStats: ; resetstats ld a, 7 ; neutral @@ -6573,10 +6444,9 @@ BattleCommand_ResetStats: ; 3710e jr nz, .next ret -; 3713e -BattleCommand_Heal: ; 3713e +BattleCommand_Heal: ; heal ld de, wBattleMonHP @@ -6658,13 +6528,12 @@ BattleCommand_Heal: ; 3713e ld hl, HPIsFullText jp StdBattleTextBox -; 371cd INCLUDE "engine/battle/move_effects/transform.asm" -BattleSideCopy: ; 372c6 +BattleSideCopy: ; Copy bc bytes from hl to de if it's the player's turn. ; Copy bc bytes from de to hl if it's the enemy's turn. ld a, [hBattleTurn] @@ -6679,17 +6548,15 @@ BattleSideCopy: ; 372c6 .copy jp CopyBytes -; 372d2 -BattleEffect_ButItFailed: ; 372d2 +BattleEffect_ButItFailed: call AnimateFailedMove jp PrintButItFailed -; 372d8 -ClearLastMove: ; 372d8 +ClearLastMove: ld a, BATTLE_VARS_LAST_COUNTER_MOVE call GetBattleVarAddr xor a @@ -6701,10 +6568,9 @@ ClearLastMove: ; 372d8 ld [hl], a ret -; 372e7 -ResetActorDisable: ; 372e7 +ResetActorDisable: ld a, [hBattleTurn] and a jr z, .player @@ -6720,10 +6586,9 @@ ResetActorDisable: ; 372e7 ld [wDisabledMove], a ret -; 372fc -BattleCommand_Screen: ; 372fc +BattleCommand_Screen: ; screen ld hl, wPlayerScreens @@ -6768,87 +6633,76 @@ BattleCommand_Screen: ; 372fc call AnimateFailedMove jp PrintButItFailed -; 3733d -PrintDoesntAffect: ; 3733d +PrintDoesntAffect: ; 'it doesn't affect' ld hl, DoesntAffectText jp StdBattleTextBox -; 37343 -PrintNothingHappened: ; 37343 +PrintNothingHappened: ; 'but nothing happened!' ld hl, NothingHappenedText jp StdBattleTextBox -; 37349 -TryPrintButItFailed: ; 37349 +TryPrintButItFailed: ld a, [wAlreadyFailed] and a ret nz ; fallthrough -; 3734e -PrintButItFailed: ; 3734e +PrintButItFailed: ; 'but it failed!' ld hl, ButItFailedText jp StdBattleTextBox -; 37354 FailMove: call AnimateFailedMove ; fallthrough -; 37357 -FailMimic: ; 37357 +FailMimic: ld hl, ButItFailedText ; 'but it failed!' ld de, ItFailedText ; 'it failed!' jp FailText_CheckOpponentProtect -; 37360 -PrintDidntAffect: ; 37360 +PrintDidntAffect: ; 'it didn't affect' ld hl, DidntAffect1Text jp StdBattleTextBox -; 37366 -PrintDidntAffect2: ; 37366 +PrintDidntAffect2: call AnimateFailedMove ld hl, DidntAffect1Text ; 'it didn't affect' ld de, DidntAffect2Text ; 'it didn't affect' jp FailText_CheckOpponentProtect -; 37372 -PrintParalyze: ; 37372 +PrintParalyze: ; 'paralyzed! maybe it can't attack!' ld hl, ParalyzedText jp StdBattleTextBox -; 37378 -CheckSubstituteOpp: ; 37378 +CheckSubstituteOpp: ld a, BATTLE_VARS_SUBSTATUS4_OPP call GetBattleVar bit SUBSTATUS_SUBSTITUTE, a ret -; 37380 INCLUDE "engine/battle/move_effects/selfdestruct.asm" @@ -6858,7 +6712,7 @@ INCLUDE "engine/battle/move_effects/mirror_move.asm" INCLUDE "engine/battle/move_effects/metronome.asm" -CheckUserMove: ; 37462 +CheckUserMove: ; Return z if the user has move a. ld b, a ld de, wBattleMonMoves @@ -6882,10 +6736,9 @@ CheckUserMove: ; 37462 and a ret -; 3747b -ResetTurn: ; 3747b +ResetTurn: ld hl, wPlayerCharging ld a, [hBattleTurn] and a @@ -6899,13 +6752,12 @@ ResetTurn: ; 3747b call DoMove jp EndMoveEffect -; 37492 INCLUDE "engine/battle/move_effects/thief.asm" -BattleCommand_ArenaTrap: ; 37517 +BattleCommand_ArenaTrap: ; arenatrap ; Doesn't work on an absent opponent. @@ -6931,13 +6783,12 @@ BattleCommand_ArenaTrap: ; 37517 call AnimateFailedMove jp PrintButItFailed -; 37536 INCLUDE "engine/battle/move_effects/nightmare.asm" -BattleCommand_Defrost: ; 37563 +BattleCommand_Defrost: ; defrost ; Thaw the user. @@ -6968,7 +6819,6 @@ BattleCommand_Defrost: ; 37563 ld hl, WasDefrostedText jp StdBattleTextBox -; 37588 INCLUDE "engine/battle/move_effects/curse.asm" @@ -6988,11 +6838,10 @@ INCLUDE "engine/battle/move_effects/sandstorm.asm" INCLUDE "engine/battle/move_effects/rollout.asm" -BattleCommand5d: ; 37791 +BattleCommand5d: ; unused ret -; 37792 INCLUDE "engine/battle/move_effects/fury_cutter.asm" @@ -7008,7 +6857,7 @@ INCLUDE "engine/battle/move_effects/frustration.asm" INCLUDE "engine/battle/move_effects/safeguard.asm" -SafeCheckSafeguard: ; 37962 +SafeCheckSafeguard: push hl ld hl, wEnemyScreens ld a, [hBattleTurn] @@ -7021,10 +6870,9 @@ SafeCheckSafeguard: ; 37962 pop hl ret -; 37972 -BattleCommand_CheckSafeguard: ; 37972 +BattleCommand_CheckSafeguard: ; checksafeguard ld hl, wEnemyScreens ld a, [hBattleTurn] @@ -7041,7 +6889,6 @@ BattleCommand_CheckSafeguard: ; 37972 call StdBattleTextBox jp EndMoveEffect -; 37991 INCLUDE "engine/battle/move_effects/magnitude.asm" @@ -7053,27 +6900,24 @@ INCLUDE "engine/battle/move_effects/pursuit.asm" INCLUDE "engine/battle/move_effects/rapid_spin.asm" -BattleCommand_HealMorn: ; 37b74 +BattleCommand_HealMorn: ; healmorn ld b, MORN_F jr BattleCommand_TimeBasedHealContinue -; 37b78 -BattleCommand_HealDay: ; 37b78 +BattleCommand_HealDay: ; healday ld b, DAY_F jr BattleCommand_TimeBasedHealContinue -; 37b7c -BattleCommand_HealNite: ; 37b7c +BattleCommand_HealNite: ; healnite ld b, NITE_F ; fallthrough -; 37b7e -BattleCommand_TimeBasedHealContinue: ; 37b7e +BattleCommand_TimeBasedHealContinue: ; Time- and weather-sensitive heal. ld hl, wBattleMonMaxHP @@ -7154,7 +6998,6 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e dw GetQuarterMaxHP dw GetHalfMaxHP dw GetMaxHP -; 37be8 INCLUDE "engine/battle/move_effects/hidden_power.asm" @@ -7170,7 +7013,7 @@ INCLUDE "engine/battle/move_effects/psych_up.asm" INCLUDE "engine/battle/move_effects/mirror_coat.asm" -BattleCommand_DoubleMinimizeDamage: ; 37ce6 +BattleCommand_DoubleMinimizeDamage: ; doubleminimizedamage ld hl, wEnemyMinimized @@ -7192,10 +7035,9 @@ BattleCommand_DoubleMinimizeDamage: ; 37ce6 ld [hl], a ret -; 37d02 -BattleCommand_SkipSunCharge: ; 37d02 +BattleCommand_SkipSunCharge: ; mimicsuncharge ld a, [wBattleWeather] cp WEATHER_SUN @@ -7203,7 +7045,6 @@ BattleCommand_SkipSunCharge: ; 37d02 ld b, charge_command jp SkipToBattleCommand -; 37d0d INCLUDE "engine/battle/move_effects/future_sight.asm" @@ -7211,17 +7052,16 @@ INCLUDE "engine/battle/move_effects/future_sight.asm" INCLUDE "engine/battle/move_effects/thunder.asm" -CheckHiddenOpponent: ; 37daa +CheckHiddenOpponent: ; BUG: This routine should account for Lock-On and Mind Reader. ld a, BATTLE_VARS_SUBSTATUS3_OPP call GetBattleVar and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND ret -; 37db2 -GetUserItem: ; 37db2 +GetUserItem: ; Return the effect of the user's item in bc, and its id at hl. ld hl, wBattleMonItem ld a, [hBattleTurn] @@ -7232,10 +7072,9 @@ GetUserItem: ; 37db2 ld b, [hl] jp GetItemHeldEffect -; 37dc1 -GetOpponentItem: ; 37dc1 +GetOpponentItem: ; Return the effect of the opponent's item in bc, and its id at hl. ld hl, wEnemyMonItem ld a, [hBattleTurn] @@ -7246,10 +7085,9 @@ GetOpponentItem: ; 37dc1 ld b, [hl] jp GetItemHeldEffect -; 37dd0 -GetItemHeldEffect: ; 37dd0 +GetItemHeldEffect: ; Return the effect of item b in bc. ld a, b and a @@ -7269,10 +7107,9 @@ GetItemHeldEffect: ; 37dd0 pop hl ret -; 37de9 -AnimateCurrentMoveEitherSide: ; 37de9 +AnimateCurrentMoveEitherSide: push hl push de push bc @@ -7288,10 +7125,9 @@ AnimateCurrentMoveEitherSide: ; 37de9 pop hl ret -; 37e01 -AnimateCurrentMove: ; 37e01 +AnimateCurrentMove: push hl push de push bc @@ -7307,10 +7143,9 @@ AnimateCurrentMove: ; 37e01 pop hl ret -; 37e19 -PlayDamageAnim: ; 37e19 +PlayDamageAnim: xor a ld [wFXAnimID + 1], a @@ -7332,10 +7167,9 @@ PlayDamageAnim: ; 37e19 jp PlayUserBattleAnim -; 37e36 -LoadMoveAnim: ; 37e36 +LoadMoveAnim: xor a ld [wNumHits], a ld [wFXAnimID + 1], a @@ -7346,17 +7180,15 @@ LoadMoveAnim: ; 37e36 ret z ; fallthrough -; 37e44 -LoadAnim: ; 37e44 +LoadAnim: ld [wFXAnimID], a ; fallthrough -; 37e47 -PlayUserBattleAnim: ; 37e47 +PlayUserBattleAnim: push hl push de push bc @@ -7366,10 +7198,9 @@ PlayUserBattleAnim: ; 37e47 pop hl ret -; 37e54 -PlayOpponentBattleAnim: ; 37e54 +PlayOpponentBattleAnim: ld a, e ld [wFXAnimID], a ld a, d @@ -7390,35 +7221,31 @@ PlayOpponentBattleAnim: ; 37e54 pop hl ret -; 37e73 -CallBattleCore: ; 37e73 +CallBattleCore: ld a, BANK("Battle Core") rst FarCall ret -; 37e77 -AnimateFailedMove: ; 37e77 +AnimateFailedMove: call BattleCommand_LowerSub call BattleCommand_MoveDelay jp BattleCommand_RaiseSub -; 37e80 -BattleCommand_MoveDelay: ; 37e80 +BattleCommand_MoveDelay: ; movedelay ; Wait 40 frames. ld c, 40 jp DelayFrames -; 37e85 -BattleCommand_ClearText: ; 37e85 +BattleCommand_ClearText: ; cleartext ; Used in multi-hit moves. @@ -7427,10 +7254,9 @@ BattleCommand_ClearText: ; 37e85 .text db "@" -; 37e8c -SkipToBattleCommand: ; 37e8c +SkipToBattleCommand: ; Skip over commands until reaching command b. ld a, [wBattleScriptBufferAddress + 1] ld h, a @@ -7447,10 +7273,9 @@ SkipToBattleCommand: ; 37e8c ld [wBattleScriptBufferAddress], a ret -; 37ea1 -GetMoveAttr: ; 37ea1 +GetMoveAttr: ; Assuming hl = Moves + x, return attribute x of move a. push bc ld bc, MOVE_LENGTH @@ -7459,10 +7284,9 @@ GetMoveAttr: ; 37ea1 pop bc ret -; 37ead -GetMoveData: ; 37ead +GetMoveData: ; Copy move struct a to de. ld hl, Moves ld bc, MOVE_LENGTH @@ -7470,38 +7294,33 @@ GetMoveData: ; 37ead ld a, BANK(Moves) jp FarCopyBytes -; 37ebb -GetMoveByte: ; 37ebb +GetMoveByte: ld a, BANK(Moves) jp GetFarByte -; 37ec0 -DisappearUser: ; 37ec0 +DisappearUser: farcall _DisappearUser ret -; 37ec7 -AppearUserLowerSub: ; 37ec7 +AppearUserLowerSub: farcall _AppearUserLowerSub ret -; 37ece -AppearUserRaiseSub: ; 37ece +AppearUserRaiseSub: farcall _AppearUserRaiseSub ret -; 37ed5 -_CheckBattleScene: ; 37ed5 +_CheckBattleScene: ; Checks the options. Returns carry if battle animations are disabled. push hl push de @@ -7512,4 +7331,3 @@ _CheckBattleScene: ; 37ed5 pop hl ret -; 37ee2 diff --git a/engine/battle/hidden_power.asm b/engine/battle/hidden_power.asm index 9d9a8dc0e66..5f3791e1816 100644 --- a/engine/battle/hidden_power.asm +++ b/engine/battle/hidden_power.asm @@ -1,4 +1,4 @@ -HiddenPowerDamage: ; fbced +HiddenPowerDamage: ; Override Hidden Power's type and power based on the user's DVs. ld hl, wBattleMonDVs @@ -108,4 +108,3 @@ HiddenPowerDamage: ; fbced pop af ld d, a ret -; fbd54 diff --git a/engine/battle/link_result.asm b/engine/battle/link_result.asm index 1dbc40aa976..0dd339fe4bd 100644 --- a/engine/battle/link_result.asm +++ b/engine/battle/link_result.asm @@ -1,4 +1,4 @@ -DetermineLinkBattleResult: ; 2b930 +DetermineLinkBattleResult: farcall UpdateEnemyMonInParty ld hl, wPartyMon1HP call .CountMonsRemaining @@ -58,7 +58,7 @@ DetermineLinkBattleResult: ; 2b930 ld [wBattleResult], a ret -.CountMonsRemaining: ; 2b995 +.CountMonsRemaining: ld c, 0 ld b, 3 ld de, PARTYMON_STRUCT_LENGTH - 1 @@ -74,7 +74,7 @@ DetermineLinkBattleResult: ; 2b930 jr nz, .loop ret -.CalcPercentHPRemaining: ; 2b9a6 +.CalcPercentHPRemaining: ld de, 0 ld c, $3 .loop2 @@ -117,7 +117,7 @@ DetermineLinkBattleResult: ; 2b930 jr nz, .loop2 ret -.BothSides_CheckNumberMonsAtFullHealth: ; 2b9e1 +.BothSides_CheckNumberMonsAtFullHealth: ld hl, wPartyMon1HP call .CheckFaintedOrFullHealth jr nz, .finish ; we have a pokemon that's neither fainted nor at full health @@ -136,7 +136,7 @@ DetermineLinkBattleResult: ; 2b930 and a ret -.CheckFaintedOrFullHealth: ; 2ba01 +.CheckFaintedOrFullHealth: ld d, 3 .loop3 ld a, [hli] diff --git a/engine/battle/menu.asm b/engine/battle/menu.asm index 705df3729ef..8f06b99f286 100644 --- a/engine/battle/menu.asm +++ b/engine/battle/menu.asm @@ -1,4 +1,4 @@ -LoadBattleMenu: ; 24ef2 +LoadBattleMenu: ld hl, BattleMenuHeader call LoadMenuHeader ld a, [wBattleMenuCursorBuffer] @@ -8,21 +8,18 @@ LoadBattleMenu: ; 24ef2 ld [wBattleMenuCursorBuffer], a call ExitMenu ret -; 24f0b -SafariBattleMenu: ; 24f0b +SafariBattleMenu: ; untranslated ld hl, MenuHeader_0x24f4e call LoadMenuHeader jr Function24f19 -; 24f13 -ContestBattleMenu: ; 24f13 +ContestBattleMenu: ld hl, MenuHeader_0x24f89 call LoadMenuHeader -; 24f19 -Function24f19: ; 24f19 +Function24f19: ld a, [wBattleMenuCursorBuffer] ld [wMenuCursorBuffer], a call _2DMenu @@ -30,14 +27,12 @@ Function24f19: ; 24f19 ld [wBattleMenuCursorBuffer], a call ExitMenu ret -; 24f2c -BattleMenuHeader: ; 24f2c +BattleMenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 8, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw MenuData_0x24f34 db 1 ; default option -; 24f34 MenuData_0x24f34: ; 0x24f34 db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags @@ -52,64 +47,55 @@ Strings24f3d: ; 0x24f3d db "@" db "PACK@" db "RUN@" -; 24f4e -MenuHeader_0x24f4e: ; 24f4e +MenuHeader_0x24f4e: db MENU_BACKUP_TILES ; flags menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw MenuData_0x24f56 db 1 ; default option -; 24f56 -MenuData_0x24f56: ; 24f56 +MenuData_0x24f56: db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags dn 2, 2 ; rows, columns db 11 ; spacing dba Strings24f5f dba Function24f7c -; 24f5f -Strings24f5f: ; 24f5f +Strings24f5f: db "サファりボール×  @" ; "SAFARI BALL× @" db "エサをなげる@" ; "THROW BAIT" db "いしをなげる@" ; "THROW ROCK" db "にげる@" ; "RUN" -; 24f7c -Function24f7c: ; 24f7c +Function24f7c: hlcoord 17, 13 ld de, wSafariBallsRemaining lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNum ret -; 24f89 -MenuHeader_0x24f89: ; 24f89 +MenuHeader_0x24f89: db MENU_BACKUP_TILES ; flags menu_coords 2, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw MenuData_0x24f91 db 1 ; default option -; 24f91 -MenuData_0x24f91: ; 24f91 +MenuData_0x24f91: db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags dn 2, 2 ; rows, columns db 12 ; spacing dba Strings24f9a dba Function24fb2 -; 24f9a -Strings24f9a: ; 24f9a +Strings24f9a: db "FIGHT@" db "", "@" db "PARKBALL× @" db "RUN@" -; 24fb2 -Function24fb2: ; 24fb2 +Function24fb2: hlcoord 13, 16 ld de, wParkBallsRemaining lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNum ret -; 24fbf diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm index 581f5381e48..1b6cb678346 100644 --- a/engine/battle/misc.asm +++ b/engine/battle/misc.asm @@ -1,4 +1,4 @@ -_DisappearUser: ; fbd54 +_DisappearUser: xor a ld [hBGMapMode], a ld a, [hBattleTurn] @@ -12,14 +12,14 @@ _DisappearUser: ; fbd54 call ClearBox jr FinishAppearDisappearUser -_AppearUserRaiseSub: ; fbd69 (3e:7d69) +_AppearUserRaiseSub: farcall BattleCommand_RaiseSubNoAnim jr AppearUser -_AppearUserLowerSub: ; fbd71 (3e:7d71) +_AppearUserLowerSub: farcall BattleCommand_LowerSubNoAnim -AppearUser: ; fbd77 (3e:7d77) +AppearUser: xor a ld [hBGMapMode], a ld a, [hBattleTurn] @@ -34,23 +34,23 @@ AppearUser: ; fbd77 (3e:7d77) .okay ld [hGraphicStartTile], a predef PlaceGraphic -FinishAppearDisappearUser: ; fbd91 (3e:7d91) +FinishAppearDisappearUser: ld a, $1 ld [hBGMapMode], a ret -GetEnemyFrontpicCoords: ; fbd96 (3e:7d96) +GetEnemyFrontpicCoords: hlcoord 12, 0 lb bc, 7, 7 ret -GetPlayerBackpicCoords: ; fbd9d (3e:7d9d) +GetPlayerBackpicCoords: hlcoord 2, 6 lb bc, 6, 6 ret -DoWeatherModifiers: ; fbda4 +DoWeatherModifiers: ld de, WeatherTypeModifiers ld a, [wBattleWeather] @@ -148,7 +148,7 @@ DoWeatherModifiers: ; fbda4 INCLUDE "data/battle/weather_modifiers.asm" -DoBadgeTypeBoosts: ; fbe24 +DoBadgeTypeBoosts: ld a, [wLinkMode] and a ret nz diff --git a/engine/battle/move_effects/attract.asm b/engine/battle/move_effects/attract.asm index 026176694e8..45417936f3b 100644 --- a/engine/battle/move_effects/attract.asm +++ b/engine/battle/move_effects/attract.asm @@ -1,4 +1,4 @@ -BattleCommand_Attract: ; 377ce +BattleCommand_Attract: ; attract ld a, [wAttackMissed] and a @@ -21,10 +21,9 @@ BattleCommand_Attract: ; 377ce .failed jp FailMove -; 377f5 -CheckOppositeGender: ; 377f5 +CheckOppositeGender: ld a, MON_SPECIES call BattlePartyAttr ld a, [hl] @@ -76,4 +75,3 @@ CheckOppositeGender: ; 377f5 .genderless_samegender scf ret -; 3784b diff --git a/engine/battle/move_effects/baton_pass.asm b/engine/battle/move_effects/baton_pass.asm index 369565877b0..2937a8306d5 100644 --- a/engine/battle/move_effects/baton_pass.asm +++ b/engine/battle/move_effects/baton_pass.asm @@ -1,4 +1,4 @@ -BattleCommand_BatonPass: ; 379c9 +BattleCommand_BatonPass: ; batonpass ld a, [hBattleTurn] @@ -81,10 +81,9 @@ BattleCommand_BatonPass: ; 379c9 jr ResetBatonPassStatus -; 37a67 -BatonPass_LinkPlayerSwitch: ; 37a67 +BatonPass_LinkPlayerSwitch: ld a, [wLinkMode] and a ret z @@ -101,10 +100,9 @@ BatonPass_LinkPlayerSwitch: ; 37a67 ld [wBattlePlayerAction], a ret -; 37a82 -BatonPass_LinkEnemySwitch: ; 37a82 +BatonPass_LinkEnemySwitch: ld a, [wLinkMode] and a ret z @@ -129,17 +127,15 @@ BatonPass_LinkEnemySwitch: ; 37a82 .switch jp CloseWindow -; 37aab -FailedBatonPass: ; 37aab +FailedBatonPass: call AnimateFailedMove jp PrintButItFailed -; 37ab1 -ResetBatonPassStatus: ; 37ab1 +ResetBatonPassStatus: ; Reset status changes that aren't passed by Baton Pass. ; Nightmare isn't passed. @@ -178,10 +174,9 @@ ResetBatonPassStatus: ; 37ab1 ld [wEnemyWrapCount], a ret -; 37ae9 -CheckAnyOtherAlivePartyMons: ; 37ae9 +CheckAnyOtherAlivePartyMons: ld hl, wPartyMon1HP ld a, [wPartyCount] ld d, a @@ -189,10 +184,9 @@ CheckAnyOtherAlivePartyMons: ; 37ae9 ld e, a jr CheckAnyOtherAliveMons -; 37af6 -CheckAnyOtherAliveEnemyMons: ; 37af6 +CheckAnyOtherAliveEnemyMons: ld hl, wOTPartyMon1HP ld a, [wOTPartyCount] ld d, a @@ -200,9 +194,8 @@ CheckAnyOtherAliveEnemyMons: ; 37af6 ld e, a ; fallthrough -; 37b01 -CheckAnyOtherAliveMons: ; 37b01 +CheckAnyOtherAliveMons: ; Check for nonzero HP starting from partymon ; HP at hl for d partymons, besides current mon e. @@ -238,4 +231,3 @@ CheckAnyOtherAliveMons: ; 37b01 and a ret -; 37b1d diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm index 8ea308d90cf..40a375e0de2 100644 --- a/engine/battle/move_effects/beat_up.asm +++ b/engine/battle/move_effects/beat_up.asm @@ -1,4 +1,4 @@ -BattleCommand_BeatUp: ; 35461 +BattleCommand_BeatUp: ; beatup call ResetDamage @@ -193,17 +193,15 @@ BattleCommand_BeatUp: ; 35461 ld d, a ret -; 355b0 -.beatup_fail ; 355b0 +.beatup_fail ld b, buildopponentrage_command jp SkipToBattleCommand -; 355b5 -BattleCommand_BeatUpFailText: ; 355b5 +BattleCommand_BeatUpFailText: ; beatupfailtext ld a, [wBeatUpHitAtLeastOnce] @@ -212,10 +210,9 @@ BattleCommand_BeatUpFailText: ; 355b5 jp PrintButItFailed -; 355bd -GetBeatupMonLocation: ; 355bd +GetBeatupMonLocation: push bc ld c, a ld b, 0 diff --git a/engine/battle/move_effects/belly_drum.asm b/engine/battle/move_effects/belly_drum.asm index bd300c9cd19..aec3a1d683c 100644 --- a/engine/battle/move_effects/belly_drum.asm +++ b/engine/battle/move_effects/belly_drum.asm @@ -1,4 +1,4 @@ -BattleCommand_BellyDrum: ; 37c1a +BattleCommand_BellyDrum: ; bellydrum ; This command is buggy because it raises the user's attack ; before checking that it has enough HP to use the move. @@ -33,4 +33,3 @@ BattleCommand_BellyDrum: ; 37c1a call AnimateFailedMove jp PrintButItFailed -; 37c55 diff --git a/engine/battle/move_effects/bide.asm b/engine/battle/move_effects/bide.asm index d9958ca53ca..b28773df9c7 100644 --- a/engine/battle/move_effects/bide.asm +++ b/engine/battle/move_effects/bide.asm @@ -1,4 +1,4 @@ -BattleCommand_StoreEnergy: ; 36671 +BattleCommand_StoreEnergy: ; storeenergy ld a, BATTLE_VARS_SUBSTATUS3 @@ -69,10 +69,9 @@ BattleCommand_StoreEnergy: ; 36671 call StdBattleTextBox jp EndMoveEffect -; 366e5 -BattleCommand_UnleashEnergy: ; 366e5 +BattleCommand_UnleashEnergy: ; unleashenergy ld de, wPlayerDamageTaken @@ -102,4 +101,3 @@ BattleCommand_UnleashEnergy: ; 366e5 call AnimateCurrentMove jp EndMoveEffect -; 3671a diff --git a/engine/battle/move_effects/conversion.asm b/engine/battle/move_effects/conversion.asm index d66d23a5eed..bc2c746dfb5 100644 --- a/engine/battle/move_effects/conversion.asm +++ b/engine/battle/move_effects/conversion.asm @@ -1,4 +1,4 @@ -BattleCommand_Conversion: ; 3707f +BattleCommand_Conversion: ; conversion ld hl, wBattleMonMoves @@ -95,4 +95,3 @@ BattleCommand_Conversion: ; 3707f ld hl, TransformedTypeText jp StdBattleTextBox -; 3710e diff --git a/engine/battle/move_effects/conversion2.asm b/engine/battle/move_effects/conversion2.asm index c0e39092647..b1d0e6282ff 100644 --- a/engine/battle/move_effects/conversion2.asm +++ b/engine/battle/move_effects/conversion2.asm @@ -1,4 +1,4 @@ -BattleCommand_Conversion2: ; 359e6 +BattleCommand_Conversion2: ; conversion2 ld a, [wAttackMissed] @@ -63,4 +63,3 @@ BattleCommand_Conversion2: ; 359e6 .failed jp FailMove -; 35a53 diff --git a/engine/battle/move_effects/counter.asm b/engine/battle/move_effects/counter.asm index b811b293cec..9d10d1865ec 100644 --- a/engine/battle/move_effects/counter.asm +++ b/engine/battle/move_effects/counter.asm @@ -1,4 +1,4 @@ -BattleCommand_Counter: ; 35813 +BattleCommand_Counter: ; counter ld a, 1 @@ -57,4 +57,3 @@ BattleCommand_Counter: ; 35813 ld [wAttackMissed], a ret -; 35864 diff --git a/engine/battle/move_effects/curse.asm b/engine/battle/move_effects/curse.asm index b11b9f3fb72..e0fc0144c5a 100644 --- a/engine/battle/move_effects/curse.asm +++ b/engine/battle/move_effects/curse.asm @@ -1,4 +1,4 @@ -BattleCommand_Curse: ; 37588 +BattleCommand_Curse: ; curse ld de, wBattleMonType1 @@ -94,4 +94,3 @@ BattleCommand_Curse: ; 37588 call AnimateFailedMove ld hl, WontRiseAnymoreText jp StdBattleTextBox -; 37618 diff --git a/engine/battle/move_effects/destiny_bond.asm b/engine/battle/move_effects/destiny_bond.asm index 2dc125ddfad..427c8b08a8a 100644 --- a/engine/battle/move_effects/destiny_bond.asm +++ b/engine/battle/move_effects/destiny_bond.asm @@ -1,4 +1,4 @@ -BattleCommand_DestinyBond: ; 35bff +BattleCommand_DestinyBond: ; destinybond ld a, BATTLE_VARS_SUBSTATUS5 @@ -8,4 +8,3 @@ BattleCommand_DestinyBond: ; 35bff ld hl, DestinyBondEffectText jp StdBattleTextBox -; 35c0f diff --git a/engine/battle/move_effects/disable.asm b/engine/battle/move_effects/disable.asm index 5df785d2455..b1055b20017 100644 --- a/engine/battle/move_effects/disable.asm +++ b/engine/battle/move_effects/disable.asm @@ -1,4 +1,4 @@ -BattleCommand_Disable: ; 36fed +BattleCommand_Disable: ; disable ld a, [wAttackMissed] @@ -71,4 +71,3 @@ BattleCommand_Disable: ; 36fed .failed jp FailMove -; 3705c diff --git a/engine/battle/move_effects/encore.asm b/engine/battle/move_effects/encore.asm index e6607fb11a4..e65925f5257 100644 --- a/engine/battle/move_effects/encore.asm +++ b/engine/battle/move_effects/encore.asm @@ -1,4 +1,4 @@ -BattleCommand_Encore: ; 35864 +BattleCommand_Encore: ; encore ld hl, wEnemyMonMoves @@ -119,4 +119,3 @@ BattleCommand_Encore: ; 35864 .failed jp PrintDidntAffect2 -; 35926 diff --git a/engine/battle/move_effects/endure.asm b/engine/battle/move_effects/endure.asm index ed4329ff5d8..f0555a7371b 100644 --- a/engine/battle/move_effects/endure.asm +++ b/engine/battle/move_effects/endure.asm @@ -1,4 +1,4 @@ -BattleCommand_Endure: ; 3766f +BattleCommand_Endure: ; endure ; Endure shares code with Protect. See protect.asm. @@ -14,4 +14,3 @@ BattleCommand_Endure: ; 3766f ld hl, BracedItselfText jp StdBattleTextBox -; 37683 diff --git a/engine/battle/move_effects/false_swipe.asm b/engine/battle/move_effects/false_swipe.asm index f00de91e716..c61aa534ad9 100644 --- a/engine/battle/move_effects/false_swipe.asm +++ b/engine/battle/move_effects/false_swipe.asm @@ -1,4 +1,4 @@ -BattleCommand_FalseSwipe: ; 35c94 +BattleCommand_FalseSwipe: ; falseswipe ; Makes sure wCurDamage < MonHP @@ -47,4 +47,3 @@ BattleCommand_FalseSwipe: ; 35c94 and a ret -; 35cc9 diff --git a/engine/battle/move_effects/focus_energy.asm b/engine/battle/move_effects/focus_energy.asm index 2a3726c53b0..8fa6b19ffec 100644 --- a/engine/battle/move_effects/focus_energy.asm +++ b/engine/battle/move_effects/focus_energy.asm @@ -1,4 +1,4 @@ -BattleCommand_FocusEnergy: ; 36c98 +BattleCommand_FocusEnergy: ; focusenergy ld a, BATTLE_VARS_SUBSTATUS4 @@ -14,4 +14,3 @@ BattleCommand_FocusEnergy: ; 36c98 call AnimateFailedMove jp PrintButItFailed -; 36cb2 diff --git a/engine/battle/move_effects/foresight.asm b/engine/battle/move_effects/foresight.asm index 8c51bb2207a..4235e08782b 100644 --- a/engine/battle/move_effects/foresight.asm +++ b/engine/battle/move_effects/foresight.asm @@ -1,4 +1,4 @@ -BattleCommand_Foresight: ; 376a0 +BattleCommand_Foresight: ; foresight ld a, [wAttackMissed] @@ -20,4 +20,3 @@ BattleCommand_Foresight: ; 376a0 .failed jp FailMove -; 376c2 diff --git a/engine/battle/move_effects/frustration.asm b/engine/battle/move_effects/frustration.asm index 3f8456ced33..5e45636be0e 100644 --- a/engine/battle/move_effects/frustration.asm +++ b/engine/battle/move_effects/frustration.asm @@ -1,4 +1,4 @@ -BattleCommand_FrustrationPower: ; 3790e +BattleCommand_FrustrationPower: ; frustrationpower push bc @@ -26,4 +26,3 @@ BattleCommand_FrustrationPower: ; 3790e pop bc ret -; 37939 diff --git a/engine/battle/move_effects/fury_cutter.asm b/engine/battle/move_effects/fury_cutter.asm index 91679368f5d..b34264d62f0 100644 --- a/engine/battle/move_effects/fury_cutter.asm +++ b/engine/battle/move_effects/fury_cutter.asm @@ -1,4 +1,4 @@ -BattleCommand_FuryCutter: ; 37792 +BattleCommand_FuryCutter: ; furycutter ld hl, wPlayerFuryCutterCount @@ -38,10 +38,9 @@ BattleCommand_FuryCutter: ; 37792 ld [hl], a ret -; 377be -ResetFuryCutterCount: ; 377be +ResetFuryCutterCount: push hl @@ -58,4 +57,3 @@ ResetFuryCutterCount: ; 377be pop hl ret -; 377ce diff --git a/engine/battle/move_effects/future_sight.asm b/engine/battle/move_effects/future_sight.asm index fa2148ab70a..c1b5c0e728f 100644 --- a/engine/battle/move_effects/future_sight.asm +++ b/engine/battle/move_effects/future_sight.asm @@ -1,4 +1,4 @@ -BattleCommand_CheckFutureSight: ; 37d0d +BattleCommand_CheckFutureSight: ; checkfuturesight ld hl, wPlayerFutureSightCount @@ -25,9 +25,8 @@ BattleCommand_CheckFutureSight: ; 37d0d ld b, futuresight_command jp SkipToBattleCommand -; 37d34 -BattleCommand_FutureSight: ; 37d34 +BattleCommand_FutureSight: ; futuresight call CheckUserIsCharging @@ -82,4 +81,3 @@ BattleCommand_FutureSight: ; 37d34 call PrintButItFailed jp EndMoveEffect -; 37d94 diff --git a/engine/battle/move_effects/heal_bell.asm b/engine/battle/move_effects/heal_bell.asm index c79362f9c81..060ac342349 100644 --- a/engine/battle/move_effects/heal_bell.asm +++ b/engine/battle/move_effects/heal_bell.asm @@ -1,4 +1,4 @@ -BattleCommand_HealBell: ; 35cc9 +BattleCommand_HealBell: ; healbell ld a, BATTLE_VARS_SUBSTATUS1 @@ -33,4 +33,3 @@ BattleCommand_HealBell: ; 35cc9 jp z, CalcPlayerStats jp CalcEnemyStats -; 35d00 diff --git a/engine/battle/move_effects/hidden_power.asm b/engine/battle/move_effects/hidden_power.asm index f96becf975e..19d7e0b325c 100644 --- a/engine/battle/move_effects/hidden_power.asm +++ b/engine/battle/move_effects/hidden_power.asm @@ -1,4 +1,4 @@ -BattleCommand_HiddenPower: ; 37be8 +BattleCommand_HiddenPower: ; hiddenpower ld a, [wAttackMissed] @@ -7,4 +7,3 @@ BattleCommand_HiddenPower: ; 37be8 farcall HiddenPowerDamage ret -; 37bf4 diff --git a/engine/battle/move_effects/leech_seed.asm b/engine/battle/move_effects/leech_seed.asm index 328a2c41616..44019a6ad84 100644 --- a/engine/battle/move_effects/leech_seed.asm +++ b/engine/battle/move_effects/leech_seed.asm @@ -1,4 +1,4 @@ -BattleCommand_LeechSeed: ; 36f9d +BattleCommand_LeechSeed: ; leechseed ld a, [wAttackMissed] and a @@ -39,4 +39,3 @@ BattleCommand_LeechSeed: ; 36f9d ld hl, EvadedText jp StdBattleTextBox -; 36fe1 diff --git a/engine/battle/move_effects/lock_on.asm b/engine/battle/move_effects/lock_on.asm index 36d8db9265c..7b650357541 100644 --- a/engine/battle/move_effects/lock_on.asm +++ b/engine/battle/move_effects/lock_on.asm @@ -1,4 +1,4 @@ -BattleCommand_LockOn: ; 35a53 +BattleCommand_LockOn: ; lockon call CheckSubstituteOpp @@ -20,4 +20,3 @@ BattleCommand_LockOn: ; 35a53 call AnimateFailedMove jp PrintDidntAffect -; 35a74 diff --git a/engine/battle/move_effects/magnitude.asm b/engine/battle/move_effects/magnitude.asm index f56ec5c1bdd..4dcf919d7b2 100644 --- a/engine/battle/move_effects/magnitude.asm +++ b/engine/battle/move_effects/magnitude.asm @@ -1,4 +1,4 @@ -BattleCommand_GetMagnitude: ; 37991 +BattleCommand_GetMagnitude: ; getmagnitude push bc diff --git a/engine/battle/move_effects/metronome.asm b/engine/battle/move_effects/metronome.asm index 6835ab569c4..b5632d00526 100644 --- a/engine/battle/move_effects/metronome.asm +++ b/engine/battle/move_effects/metronome.asm @@ -1,4 +1,4 @@ -BattleCommand_Metronome: ; 37418 +BattleCommand_Metronome: ; metronome call ClearLastMove @@ -40,7 +40,6 @@ BattleCommand_Metronome: ; 37418 ld [hl], b call UpdateMoveData jp ResetTurn -; 37454 INCLUDE "data/battle/metronome_exception_moves.asm" diff --git a/engine/battle/move_effects/mimic.asm b/engine/battle/move_effects/mimic.asm index 712b42df1af..2f91d6a1de4 100644 --- a/engine/battle/move_effects/mimic.asm +++ b/engine/battle/move_effects/mimic.asm @@ -1,4 +1,4 @@ -BattleCommand_Mimic: ; 36f46 +BattleCommand_Mimic: ; mimic call ClearLastMove @@ -49,4 +49,3 @@ BattleCommand_Mimic: ; 36f46 .fail jp FailMimic -; 36f9d diff --git a/engine/battle/move_effects/mirror_coat.asm b/engine/battle/move_effects/mirror_coat.asm index 41e296108d4..f8b8ca114f3 100644 --- a/engine/battle/move_effects/mirror_coat.asm +++ b/engine/battle/move_effects/mirror_coat.asm @@ -1,4 +1,4 @@ -BattleCommand_MirrorCoat: ; 37c95 +BattleCommand_MirrorCoat: ; mirrorcoat ld a, 1 @@ -58,4 +58,3 @@ BattleCommand_MirrorCoat: ; 37c95 ld [wAttackMissed], a ret -; 37ce6 diff --git a/engine/battle/move_effects/mirror_move.asm b/engine/battle/move_effects/mirror_move.asm index c4f208d775f..0894038394d 100644 --- a/engine/battle/move_effects/mirror_move.asm +++ b/engine/battle/move_effects/mirror_move.asm @@ -1,4 +1,4 @@ -BattleCommand_MirrorMove: ; 373c9 +BattleCommand_MirrorMove: ; mirrormove call ClearLastMove @@ -49,4 +49,3 @@ BattleCommand_MirrorMove: ; 373c9 .done call BattleCommand_MoveDelay jp ResetTurn -; 37418 diff --git a/engine/battle/move_effects/mist.asm b/engine/battle/move_effects/mist.asm index 9ffd86c8eb6..52e4e59f4b9 100644 --- a/engine/battle/move_effects/mist.asm +++ b/engine/battle/move_effects/mist.asm @@ -1,4 +1,4 @@ -BattleCommand_Mist: ; 36c7e +BattleCommand_Mist: ; mist ld a, BATTLE_VARS_SUBSTATUS4 @@ -14,4 +14,3 @@ BattleCommand_Mist: ; 36c7e call AnimateFailedMove jp PrintButItFailed -; 36c98 diff --git a/engine/battle/move_effects/nightmare.asm b/engine/battle/move_effects/nightmare.asm index 788e3de416e..dd85c722d51 100644 --- a/engine/battle/move_effects/nightmare.asm +++ b/engine/battle/move_effects/nightmare.asm @@ -1,4 +1,4 @@ -BattleCommand_Nightmare: ; 37536 +BattleCommand_Nightmare: ; nightmare ; Can't hit an absent opponent. @@ -35,4 +35,3 @@ BattleCommand_Nightmare: ; 37536 .failed call AnimateFailedMove jp PrintButItFailed -; 37563 diff --git a/engine/battle/move_effects/pain_split.asm b/engine/battle/move_effects/pain_split.asm index 2db3726c6f0..a4dbd3d442c 100644 --- a/engine/battle/move_effects/pain_split.asm +++ b/engine/battle/move_effects/pain_split.asm @@ -1,4 +1,4 @@ -BattleCommand_PainSplit: ; 35926 +BattleCommand_PainSplit: ; painsplit ld a, [wAttackMissed] @@ -65,7 +65,7 @@ BattleCommand_PainSplit: ; 35926 inc de inc de -.EnemyShareHP: ; 359ac +.EnemyShareHP: ld c, [hl] dec hl ld a, [wCurDamage + 1] @@ -89,9 +89,7 @@ BattleCommand_PainSplit: ; 35926 ld [wBuffer6], a ret -; 359cd .ButItFailed: jp PrintDidntAffect2 -; 359d0 diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm index a5d2fed0d1a..53705d43494 100644 --- a/engine/battle/move_effects/pay_day.asm +++ b/engine/battle/move_effects/pay_day.asm @@ -1,4 +1,4 @@ -BattleCommand_PayDay: ; 3705c +BattleCommand_PayDay: ; payday xor a @@ -25,4 +25,3 @@ BattleCommand_PayDay: ; 3705c ld hl, CoinsScatteredText jp StdBattleTextBox -; 3707f diff --git a/engine/battle/move_effects/perish_song.asm b/engine/battle/move_effects/perish_song.asm index 8c88c8739df..221ecfb468e 100644 --- a/engine/battle/move_effects/perish_song.asm +++ b/engine/battle/move_effects/perish_song.asm @@ -1,4 +1,4 @@ -BattleCommand_PerishSong: ; 376c2 +BattleCommand_PerishSong: ; perishsong @@ -37,4 +37,3 @@ BattleCommand_PerishSong: ; 376c2 .failed call AnimateFailedMove jp PrintButItFailed -; 376f8 diff --git a/engine/battle/move_effects/present.asm b/engine/battle/move_effects/present.asm index a2ef5bc6417..2bbea80286a 100644 --- a/engine/battle/move_effects/present.asm +++ b/engine/battle/move_effects/present.asm @@ -1,4 +1,4 @@ -BattleCommand_Present: ; 37874 +BattleCommand_Present: ; present ld a, [wLinkMode] diff --git a/engine/battle/move_effects/protect.asm b/engine/battle/move_effects/protect.asm index 6c65e0ed137..768e51cbbe1 100644 --- a/engine/battle/move_effects/protect.asm +++ b/engine/battle/move_effects/protect.asm @@ -1,4 +1,4 @@ -BattleCommand_Protect: ; 37618 +BattleCommand_Protect: ; protect call ProtectChance ret c @@ -11,10 +11,9 @@ BattleCommand_Protect: ; 37618 ld hl, ProtectedItselfText jp StdBattleTextBox -; 3762c -ProtectChance: ; 3762c +ProtectChance: ld de, wPlayerProtectCount ld a, [hBattleTurn] @@ -77,4 +76,3 @@ ProtectChance: ; 3762c call PrintButItFailed scf ret -; 3766f diff --git a/engine/battle/move_effects/psych_up.asm b/engine/battle/move_effects/psych_up.asm index c57fff9cdf7..743e93c86b1 100644 --- a/engine/battle/move_effects/psych_up.asm +++ b/engine/battle/move_effects/psych_up.asm @@ -1,4 +1,4 @@ -BattleCommand_PsychUp: ; 37c55 +BattleCommand_PsychUp: ; psychup ld hl, wEnemyStatLevels @@ -48,4 +48,3 @@ BattleCommand_PsychUp: ; 37c55 ld hl, CopiedStatsText jp StdBattleTextBox -; 37c95 diff --git a/engine/battle/move_effects/pursuit.asm b/engine/battle/move_effects/pursuit.asm index 969e08f7300..6409575168c 100644 --- a/engine/battle/move_effects/pursuit.asm +++ b/engine/battle/move_effects/pursuit.asm @@ -1,4 +1,4 @@ -BattleCommand_Pursuit: ; 37b1d +BattleCommand_Pursuit: ; pursuit ; Double damage if the opponent is switching. @@ -23,4 +23,3 @@ BattleCommand_Pursuit: ; 37b1d ld [hl], a ret -; 37b39 diff --git a/engine/battle/move_effects/rage.asm b/engine/battle/move_effects/rage.asm index ac01f813783..1f40cc1fbc8 100644 --- a/engine/battle/move_effects/rage.asm +++ b/engine/battle/move_effects/rage.asm @@ -1,8 +1,7 @@ -BattleCommand_Rage: ; 36f1d +BattleCommand_Rage: ; rage ld a, BATTLE_VARS_SUBSTATUS4 call GetBattleVarAddr set SUBSTATUS_RAGE, [hl] ret -; 36f25 diff --git a/engine/battle/move_effects/rain_dance.asm b/engine/battle/move_effects/rain_dance.asm index 6c587d551d7..fa8881c3c26 100644 --- a/engine/battle/move_effects/rain_dance.asm +++ b/engine/battle/move_effects/rain_dance.asm @@ -1,4 +1,4 @@ -BattleCommand_StartRain: ; 37bf4 +BattleCommand_StartRain: ; startrain ld a, WEATHER_RAIN ld [wBattleWeather], a @@ -8,4 +8,3 @@ BattleCommand_StartRain: ; 37bf4 ld hl, DownpourText jp StdBattleTextBox -; 37c07 diff --git a/engine/battle/move_effects/rapid_spin.asm b/engine/battle/move_effects/rapid_spin.asm index 84bcbad7ffa..089be766718 100644 --- a/engine/battle/move_effects/rapid_spin.asm +++ b/engine/battle/move_effects/rapid_spin.asm @@ -1,4 +1,4 @@ -BattleCommand_ClearHazards: ; 37b39 +BattleCommand_ClearHazards: ; clearhazards ld a, BATTLE_VARS_SUBSTATUS4 @@ -35,4 +35,3 @@ BattleCommand_ClearHazards: ; 37b39 ld hl, ReleasedByText jp StdBattleTextBox -; 37b74 diff --git a/engine/battle/move_effects/return.asm b/engine/battle/move_effects/return.asm index e1d568e7cb8..ee83843b3a9 100644 --- a/engine/battle/move_effects/return.asm +++ b/engine/battle/move_effects/return.asm @@ -1,4 +1,4 @@ -BattleCommand_HappinessPower: ; 3784b +BattleCommand_HappinessPower: ; happinesspower push bc ld hl, wBattleMonHappiness @@ -24,4 +24,3 @@ BattleCommand_HappinessPower: ; 3784b pop bc ret -; 37874 diff --git a/engine/battle/move_effects/rollout.asm b/engine/battle/move_effects/rollout.asm index f6966c48a32..da890f48fe2 100644 --- a/engine/battle/move_effects/rollout.asm +++ b/engine/battle/move_effects/rollout.asm @@ -1,7 +1,7 @@ MAX_ROLLOUT_COUNT EQU 5 -BattleCommand_CheckCurl: ; 37718 +BattleCommand_CheckCurl: ; checkcurl ld de, wPlayerRolloutCount @@ -22,10 +22,9 @@ BattleCommand_CheckCurl: ; 37718 xor a ld [de], a ret -; 37734 -BattleCommand_RolloutPower: ; 37734 +BattleCommand_RolloutPower: ; rolloutpower ld a, BATTLE_VARS_STATUS @@ -96,4 +95,3 @@ BattleCommand_RolloutPower: ; 37734 .done_damage ret -; 37791 diff --git a/engine/battle/move_effects/safeguard.asm b/engine/battle/move_effects/safeguard.asm index 1dc233eab63..e4e2e09510b 100644 --- a/engine/battle/move_effects/safeguard.asm +++ b/engine/battle/move_effects/safeguard.asm @@ -1,4 +1,4 @@ -BattleCommand_Safeguard: ; 37939 +BattleCommand_Safeguard: ; safeguard ld hl, wPlayerScreens @@ -22,4 +22,3 @@ BattleCommand_Safeguard: ; 37939 call AnimateFailedMove jp PrintButItFailed -; 37962 diff --git a/engine/battle/move_effects/sandstorm.asm b/engine/battle/move_effects/sandstorm.asm index 5aaa61deb14..77d6e24b502 100644 --- a/engine/battle/move_effects/sandstorm.asm +++ b/engine/battle/move_effects/sandstorm.asm @@ -1,4 +1,4 @@ -BattleCommand_StartSandstorm: ; 376f8 +BattleCommand_StartSandstorm: ; startsandstorm ld a, [wBattleWeather] @@ -16,4 +16,3 @@ BattleCommand_StartSandstorm: ; 376f8 .failed call AnimateFailedMove jp PrintButItFailed -; 37718 diff --git a/engine/battle/move_effects/selfdestruct.asm b/engine/battle/move_effects/selfdestruct.asm index 6f6b0966fa5..3c7b05ef9c5 100644 --- a/engine/battle/move_effects/selfdestruct.asm +++ b/engine/battle/move_effects/selfdestruct.asm @@ -1,4 +1,4 @@ -BattleCommand_Selfdestruct: ; 37380 +BattleCommand_Selfdestruct: farcall StubbedTrainerRankings_Selfdestruct ld a, BATTLEANIM_PLAYER_DAMAGE ld [wNumHits], a @@ -28,4 +28,3 @@ BattleCommand_Selfdestruct: ; 37380 call WaitBGMap jp RefreshBattleHuds -; 373c9 diff --git a/engine/battle/move_effects/sketch.asm b/engine/battle/move_effects/sketch.asm index 93f7ff30caf..1f2e67dd45b 100644 --- a/engine/battle/move_effects/sketch.asm +++ b/engine/battle/move_effects/sketch.asm @@ -1,4 +1,4 @@ -BattleCommand_Sketch: ; 35a74 +BattleCommand_Sketch: ; sketch call ClearLastMove @@ -116,4 +116,3 @@ BattleCommand_Sketch: ; 35a74 call AnimateFailedMove jp PrintDidntAffect -; 35b16 diff --git a/engine/battle/move_effects/sleep_talk.asm b/engine/battle/move_effects/sleep_talk.asm index 3f62d4e3656..ce7a27ed56c 100644 --- a/engine/battle/move_effects/sleep_talk.asm +++ b/engine/battle/move_effects/sleep_talk.asm @@ -1,4 +1,4 @@ -BattleCommand_SleepTalk: ; 35b33 +BattleCommand_SleepTalk: ; sleeptalk call ClearLastMove @@ -142,4 +142,3 @@ BattleCommand_SleepTalk: ; 35b33 cp EFFECT_BIDE ret -; 35bff diff --git a/engine/battle/move_effects/snore.asm b/engine/battle/move_effects/snore.asm index 49fb1b21029..4544b7fbde1 100644 --- a/engine/battle/move_effects/snore.asm +++ b/engine/battle/move_effects/snore.asm @@ -1,4 +1,4 @@ -BattleCommand_Snore: ; 359d0 +BattleCommand_Snore: ; snore ld a, BATTLE_VARS_STATUS call GetBattleVar @@ -10,4 +10,3 @@ BattleCommand_Snore: ; 359d0 call FailMove jp EndMoveEffect -; 359e6 diff --git a/engine/battle/move_effects/spikes.asm b/engine/battle/move_effects/spikes.asm index 6cab0b96fc4..1eca7ae53e4 100644 --- a/engine/battle/move_effects/spikes.asm +++ b/engine/battle/move_effects/spikes.asm @@ -1,4 +1,4 @@ -BattleCommand_Spikes: ; 37683 +BattleCommand_Spikes: ; spikes ld hl, wEnemyScreens @@ -24,4 +24,3 @@ BattleCommand_Spikes: ; 37683 .failed jp FailMove -; 376a0 diff --git a/engine/battle/move_effects/spite.asm b/engine/battle/move_effects/spite.asm index 30a908ae718..7c949907409 100644 --- a/engine/battle/move_effects/spite.asm +++ b/engine/battle/move_effects/spite.asm @@ -1,4 +1,4 @@ -BattleCommand_Spite: ; 35c0f +BattleCommand_Spite: ; spite ld a, [wAttackMissed] @@ -85,4 +85,3 @@ BattleCommand_Spite: ; 35c0f .failed jp PrintDidntAffect2 -; 35c94 diff --git a/engine/battle/move_effects/splash.asm b/engine/battle/move_effects/splash.asm index 5b5e504b8c5..ed9eeb4ca06 100644 --- a/engine/battle/move_effects/splash.asm +++ b/engine/battle/move_effects/splash.asm @@ -1,6 +1,5 @@ -BattleCommand_Splash: ; 36fe1 +BattleCommand_Splash: call AnimateCurrentMove farcall StubbedTrainerRankings_Splash jp PrintNothingHappened -; 36fed diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm index 1deaa848d01..f439afd78f9 100644 --- a/engine/battle/move_effects/substitute.asm +++ b/engine/battle/move_effects/substitute.asm @@ -1,4 +1,4 @@ -BattleCommand_Substitute: ; 36e7c +BattleCommand_Substitute: ; substitute call BattleCommand_MoveDelay @@ -87,4 +87,3 @@ BattleCommand_Substitute: ; 36e7c .jp_stdbattletextbox jp StdBattleTextBox -; 36f0b diff --git a/engine/battle/move_effects/sunny_day.asm b/engine/battle/move_effects/sunny_day.asm index ef8c37c5cc2..ad229840127 100644 --- a/engine/battle/move_effects/sunny_day.asm +++ b/engine/battle/move_effects/sunny_day.asm @@ -1,4 +1,4 @@ -BattleCommand_StartSun: ; 37c07 +BattleCommand_StartSun: ; startsun ld a, WEATHER_SUN ld [wBattleWeather], a @@ -8,4 +8,3 @@ BattleCommand_StartSun: ; 37c07 ld hl, SunGotBrightText jp StdBattleTextBox -; 37c1a diff --git a/engine/battle/move_effects/teleport.asm b/engine/battle/move_effects/teleport.asm index 1bd1eb72577..b9c7f9fb229 100644 --- a/engine/battle/move_effects/teleport.asm +++ b/engine/battle/move_effects/teleport.asm @@ -1,4 +1,4 @@ -BattleCommand_Teleport: ; 36778 +BattleCommand_Teleport: ; teleport ld a, [wBattleType] @@ -88,4 +88,3 @@ BattleCommand_Teleport: ; 36778 ld hl, FledFromBattleText jp StdBattleTextBox -; 36804 diff --git a/engine/battle/move_effects/thief.asm b/engine/battle/move_effects/thief.asm index 5397c2bdf0f..d9d2f47fd81 100644 --- a/engine/battle/move_effects/thief.asm +++ b/engine/battle/move_effects/thief.asm @@ -1,4 +1,4 @@ -BattleCommand_Thief: ; 37492 +BattleCommand_Thief: ; thief ld a, [hBattleTurn] @@ -113,4 +113,3 @@ BattleCommand_Thief: ; 37492 ld e, l ld hl, wEnemyMonItem ret -; 37517 diff --git a/engine/battle/move_effects/thunder.asm b/engine/battle/move_effects/thunder.asm index 3705e1a28dd..1a87176bdd0 100644 --- a/engine/battle/move_effects/thunder.asm +++ b/engine/battle/move_effects/thunder.asm @@ -1,4 +1,4 @@ -BattleCommand_ThunderAccuracy: ; 37d94 +BattleCommand_ThunderAccuracy: ; thunderaccuracy ld a, BATTLE_VARS_MOVE_TYPE @@ -17,4 +17,3 @@ BattleCommand_ThunderAccuracy: ; 37d94 ld [hl], 100 percent ret -; 37daa diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm index 5ae7c1511e4..fe85658e6d7 100644 --- a/engine/battle/move_effects/transform.asm +++ b/engine/battle/move_effects/transform.asm @@ -1,5 +1,5 @@ -BattleCommand_Transform: ; 371cd +BattleCommand_Transform: ; transform call ClearLastMove @@ -138,4 +138,3 @@ BattleCommand_Transform: ; 371cd ld hl, TransformedText jp StdBattleTextBox -; 372c6 diff --git a/engine/battle/move_effects/triple_kick.asm b/engine/battle/move_effects/triple_kick.asm index cef56a1ae88..4fb939d7c9d 100644 --- a/engine/battle/move_effects/triple_kick.asm +++ b/engine/battle/move_effects/triple_kick.asm @@ -1,4 +1,4 @@ -BattleCommand_TripleKick: ; 346b2 +BattleCommand_TripleKick: ; triplekick ld a, [wKickCounter] @@ -26,14 +26,12 @@ BattleCommand_TripleKick: ; 346b2 ld [hl], a ret -; 346cd -BattleCommand_KickCounter: ; 346cd +BattleCommand_KickCounter: ; kickcounter ld hl, wKickCounter inc [hl] ret -; 346d2 diff --git a/engine/battle/read_trainer_attributes.asm b/engine/battle/read_trainer_attributes.asm index 0b9507e0dfb..12554ebafd4 100644 --- a/engine/battle/read_trainer_attributes.asm +++ b/engine/battle/read_trainer_attributes.asm @@ -1,4 +1,4 @@ -GetTrainerClassName: ; 3952d +GetTrainerClassName: ld hl, wRivalName ld a, c cp RIVAL1 @@ -19,7 +19,7 @@ GetTrainerClassName: ; 3952d pop de ret -GetOTName: ; 39550 +GetOTName: ld hl, wOTPlayerName ld a, [wLinkMode] and a @@ -44,7 +44,7 @@ GetOTName: ; 39550 pop de ret -GetTrainerAttributes: ; 3957b +GetTrainerAttributes: ld a, [wTrainerClass] ld c, a call GetOTName diff --git a/engine/battle/read_trainer_dvs.asm b/engine/battle/read_trainer_dvs.asm index c021e8e8c4c..67ea0fe3cf9 100644 --- a/engine/battle/read_trainer_dvs.asm +++ b/engine/battle/read_trainer_dvs.asm @@ -1,4 +1,4 @@ -GetTrainerDVs: ; 270c4 +GetTrainerDVs: ; Return the DVs of wOtherTrainerClass in bc push hl @@ -17,4 +17,3 @@ GetTrainerDVs: ; 270c4 pop hl ret -; 270d6 diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm index 3227236c111..3b1fe3bca31 100644 --- a/engine/battle/read_trainer_party.asm +++ b/engine/battle/read_trainer_party.asm @@ -1,4 +1,4 @@ -ReadTrainerParty: ; 39771 +ReadTrainerParty: ld a, [wInBattleTowerBattle] bit 0, a ret nz @@ -79,17 +79,15 @@ ReadTrainerParty: ; 39771 call TrainerType2 call CloseSRAM jr .done -; 397e3 -TrainerTypes: ; 397e3 +TrainerTypes: ; entries correspond to TRAINERTYPE_* constants dw TrainerType1 ; level, species dw TrainerType2 ; level, species, moves dw TrainerType3 ; level, species, item dw TrainerType4 ; level, species, item, moves -; 397eb -TrainerType1: ; 397eb +TrainerType1: ; normal (level, species) ld h, d ld l, e @@ -107,9 +105,8 @@ TrainerType1: ; 397eb predef TryAddMonToParty pop hl jr .loop -; 39806 -TrainerType2: ; 39806 +TrainerType2: ; moves ld h, d ld l, e @@ -184,9 +181,8 @@ TrainerType2: ; 39806 pop hl jr .loop -; 39871 -TrainerType3: ; 39871 +TrainerType3: ; item ld h, d ld l, e @@ -213,9 +209,8 @@ TrainerType3: ; 39871 ld a, [hli] ld [de], a jr .loop -; 3989d (e:589d) -TrainerType4: ; 3989d +TrainerType4: ; item + moves ld h, d ld l, e @@ -305,9 +300,8 @@ TrainerType4: ; 3989d pop hl jr .loop -; 3991b -ComputeTrainerReward: ; 3991b (e:591b) +ComputeTrainerReward: ld hl, hProduct xor a ld [hli], a @@ -328,7 +322,7 @@ ComputeTrainerReward: ; 3991b (e:591b) ret -Battle_GetTrainerName:: ; 39939 +Battle_GetTrainerName:: ld a, [wInBattleTowerBattle] bit 0, a ld hl, wOTPlayerName @@ -339,7 +333,7 @@ Battle_GetTrainerName:: ; 39939 ld a, [wOtherTrainerClass] ld c, a -GetTrainerName:: ; 3994c +GetTrainerName:: ld a, c cp CAL jr nz, .not_cal2 @@ -379,20 +373,18 @@ GetTrainerName:: ; 3994c jr nz, .skip jr .loop -CopyTrainerName: ; 39984 +CopyTrainerName: ld de, wStringBuffer1 push de ld bc, NAME_LENGTH call CopyBytes pop de ret -; 39990 -Function39990: ; 39990 +Function39990: ; This function is useless. ld de, wStringBuffer1 push de ld bc, NAME_LENGTH pop de ret -; 39999 diff --git a/engine/battle/returntobattle_useball.asm b/engine/battle/returntobattle_useball.asm index 952239f94be..0aff780c93e 100644 --- a/engine/battle/returntobattle_useball.asm +++ b/engine/battle/returntobattle_useball.asm @@ -1,4 +1,4 @@ -_ReturnToBattle_UseBall: ; 2715c +_ReturnToBattle_UseBall: call ClearBGPalettes call ClearTileMap ld a, [wBattleType] diff --git a/engine/battle/sliding_intro.asm b/engine/battle/sliding_intro.asm index 667f1819163..6b866c6d806 100644 --- a/engine/battle/sliding_intro.asm +++ b/engine/battle/sliding_intro.asm @@ -1,4 +1,4 @@ -BattleIntroSlidingPics: ; 4e980 +BattleIntroSlidingPics: ld a, [rSVBK] push af ld a, BANK(wLYOverrides) @@ -12,9 +12,8 @@ BattleIntroSlidingPics: ; 4e980 pop af ld [rSVBK], a ret -; 4e998 -.subfunction1 ; 4e998 +.subfunction1 call .subfunction4 ld a, $90 ld [hSCX], a @@ -23,9 +22,8 @@ BattleIntroSlidingPics: ; 4e980 lb de, %11100100, %11100100 call DmgToCgbObjPals ret -; 4e9ab -.subfunction2 ; 4e9ab +.subfunction2 ld d, $90 ld e, $72 ld a, $48 @@ -57,9 +55,8 @@ BattleIntroSlidingPics: ; 4e980 dec a jr nz, .loop1 ret -; 4e9d6 -.subfunction3 ; 4e9d6 +.subfunction3 ld hl, wVirtualOAMSprite00XCoord ld c, $12 ; 18 ld de, SPRITEOAMSTRUCT_LENGTH @@ -70,17 +67,15 @@ BattleIntroSlidingPics: ; 4e980 dec c jr nz, .loop3 ret -; 4e9e5 -.subfunction4 ; 4e9e5 +.subfunction4 ld hl, wLYOverrides ld a, $90 ld bc, SCREEN_HEIGHT_PX call ByteFill ret -; 4e9f1 -.subfunction5 ; 4e9f1 +.subfunction5 ld hl, wLYOverrides ld a, d ld c, $3e ; 62 @@ -101,4 +96,3 @@ BattleIntroSlidingPics: ; 4e980 dec c jr nz, .loop6 ret -; 4ea0a diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm index 84cd1e858d3..5c2a633a880 100644 --- a/engine/battle/start_battle.asm +++ b/engine/battle/start_battle.asm @@ -1,4 +1,4 @@ -ShowLinkBattleParticipants: ; 2ee18 +ShowLinkBattleParticipants: ; If we're not in a communications room, ; we don't need to be here. ld a, [wLinkMode] @@ -12,7 +12,7 @@ ShowLinkBattleParticipants: ; 2ee18 call ClearSprites ret -FindFirstAliveMonAndStartBattle: ; 2ee2f +FindFirstAliveMonAndStartBattle: xor a ld [hMapAnims], a call DelayFrame @@ -46,7 +46,7 @@ FindFirstAliveMonAndStartBattle: ; 2ee2f ld [hMapAnims], a ret -PlayBattleMusic: ; 2ee6c +PlayBattleMusic: push hl push de push bc @@ -148,7 +148,7 @@ PlayBattleMusic: ; 2ee6c pop hl ret -ClearBattleRAM: ; 2ef18 +ClearBattleRAM: xor a ld [wBattlePlayerAction], a ld [wBattleResult], a diff --git a/engine/battle/trainer_huds.asm b/engine/battle/trainer_huds.asm index 0a18098ed4d..3930549b200 100644 --- a/engine/battle/trainer_huds.asm +++ b/engine/battle/trainer_huds.asm @@ -1,4 +1,4 @@ -BattleStart_TrainerHuds: ; 2c000 +BattleStart_TrainerHuds: ld a, $e4 ld [rOBP0], a call LoadBallIconGFX @@ -7,16 +7,14 @@ BattleStart_TrainerHuds: ; 2c000 dec a ret z jp ShowOTTrainerMonsRemaining -; 2c012 -EnemySwitch_TrainerHud: ; 2c012 +EnemySwitch_TrainerHud: ld a, $e4 ld [rOBP0], a call LoadBallIconGFX jp ShowOTTrainerMonsRemaining -; 2c01c -ShowPlayerMonsRemaining: ; 2c01c +ShowPlayerMonsRemaining: call DrawPlayerPartyIconHUDBorder ld hl, wPartyMon1HP ld de, wPartyCount @@ -30,9 +28,8 @@ ShowPlayerMonsRemaining: ; 2c01c ld [wPlaceBallsDirection], a ld hl, wVirtualOAMSprite00 jp LoadTrainerHudOAM -; 2c03a -ShowOTTrainerMonsRemaining: ; 2c03a +ShowOTTrainerMonsRemaining: call DrawEnemyHUDBorder ld hl, wOTPartyMon1HP ld de, wOTPartyCount @@ -46,9 +43,8 @@ ShowOTTrainerMonsRemaining: ; 2c03a ld [wPlaceBallsDirection], a ld hl, wVirtualOAMSprite00 + PARTY_LENGTH * SPRITEOAMSTRUCT_LENGTH jp LoadTrainerHudOAM -; 2c059 -StageBallTilesData: ; 2c059 +StageBallTilesData: ld a, [de] push af ld de, wBuffer1 @@ -69,9 +65,8 @@ StageBallTilesData: ; 2c059 dec a jr nz, .loop2 ret -; 2c075 -.GetHUDTile: ; 2c075 +.GetHUDTile: ld a, [hli] and a jr nz, .got_hp @@ -102,9 +97,8 @@ StageBallTilesData: ; 2c059 ld bc, PARTYMON_STRUCT_LENGTH + MON_HP - MON_STATUS add hl, bc ret -; 2c095 -DrawPlayerHUDBorder: ; 2c095 +DrawPlayerHUDBorder: ld hl, .tiles ld de, wTrainerHUDTiles ld bc, 4 @@ -118,9 +112,8 @@ DrawPlayerHUDBorder: ; 2c095 db $77 ; bottom right db $6f ; bottom left db $76 ; bottom side -; 2c0ad -DrawPlayerPartyIconHUDBorder: ; 2c0ad +DrawPlayerPartyIconHUDBorder: ld hl, .tiles ld de, wTrainerHUDTiles ld bc, 4 @@ -134,9 +127,8 @@ DrawPlayerPartyIconHUDBorder: ; 2c0ad db $5c ; bottom right db $6f ; bottom left db $76 ; bottom side -; 2c0c5 -DrawEnemyHUDBorder: ; 2c0c5 +DrawEnemyHUDBorder: ld hl, .tiles ld de, wTrainerHUDTiles ld bc, 4 @@ -160,9 +152,8 @@ DrawEnemyHUDBorder: ; 2c0c5 db $74 ; bottom left db $78 ; bottom right db $76 ; bottom side -; 2c0f1 -PlaceHUDBorderTiles: ; 2c0f1 +PlaceHUDBorderTiles: ld a, [wTrainerHUDTiles] ld [hl], a ld bc, SCREEN_WIDTH @@ -180,9 +171,8 @@ PlaceHUDBorderTiles: ; 2c0f1 ld a, [wEndFlypoint] ld [hl], a ret -; 2c10d -LinkBattle_TrainerHuds: ; 2c10d +LinkBattle_TrainerHuds: call LoadBallIconGFX ld hl, wPartyMon1HP ld de, wPartyCount @@ -205,9 +195,8 @@ LinkBattle_TrainerHuds: ; 2c10d ld [hl], 13 * 8 ld hl, wVirtualOAMSprite00 + PARTY_LENGTH * SPRITEOAMSTRUCT_LENGTH jp LoadTrainerHudOAM -; 2c143 -LoadTrainerHudOAM: ; 2c143 +LoadTrainerHudOAM: ld de, wBuffer1 ld c, PARTY_LENGTH .loop @@ -228,21 +217,18 @@ LoadTrainerHudOAM: ; 2c143 dec c jr nz, .loop ret -; 2c165 -LoadBallIconGFX: ; 2c165 +LoadBallIconGFX: ld de, .gfx ld hl, vTiles0 tile $31 lb bc, BANK(LoadBallIconGFX), 4 call Get2bpp_2 ret -; 2c172 -.gfx ; 2c172 +.gfx INCBIN "gfx/battle/balls.2bpp" -; 2c1b2 -_ShowLinkBattleParticipants: ; 2c1b2 +_ShowLinkBattleParticipants: call ClearBGPalettes call LoadFontsExtra hlcoord 2, 3 @@ -266,4 +252,3 @@ _ShowLinkBattleParticipants: ; 2c1b2 ld a, $e4 ld [rOBP0], a ret -; 2c1ef diff --git a/engine/battle/unreferenced_getgen1trainerclassname.asm b/engine/battle/unreferenced_getgen1trainerclassname.asm index da8e98b6142..04532523458 100644 --- a/engine/battle/unreferenced_getgen1trainerclassname.asm +++ b/engine/battle/unreferenced_getgen1trainerclassname.asm @@ -1,4 +1,4 @@ -Unreferenced_GetGen1TrainerClassName: ; 50a28 +Unreferenced_GetGen1TrainerClassName: ld hl, Gen1TrainerClassNames ld a, [wTrainerClass] dec a diff --git a/engine/battle/used_move_text.asm b/engine/battle/used_move_text.asm index f2182f3785a..2bb6b78457b 100644 --- a/engine/battle/used_move_text.asm +++ b/engine/battle/used_move_text.asm @@ -1,11 +1,10 @@ -DisplayUsedMoveText: ; 105db0 +DisplayUsedMoveText: ; battle command 03 ld hl, UsedMoveText call BattleTextBox jp WaitBGMap -; 105db9 -UsedMoveText: ; 105db9 +UsedMoveText: ; this is a stream of text and asm from 105db9 to 105ef6 text_jump _ActorNameText start_asm @@ -58,18 +57,16 @@ UsedMoveText: ; 105db9 ret c ld hl, UsedMove1Text ret -; 105e04 -UsedMove1Text: ; 105e04 +UsedMove1Text: text_jump _UsedMove1Text start_asm jr UsedMoveText_CheckObedience -; 105e0b -UsedMove2Text: ; 105e0b +UsedMove2Text: text_jump _UsedMove2Text start_asm -UsedMoveText_CheckObedience: ; 105e10 +UsedMoveText_CheckObedience: ; check obedience ld a, [wAlreadyDisobeyed] and a @@ -77,7 +74,6 @@ UsedMoveText_CheckObedience: ; 105e10 ; print "instead," ld hl, .UsedInsteadText ret -; 105e1a .UsedInsteadText: text_jump _UsedInsteadText @@ -85,9 +81,8 @@ UsedMoveText_CheckObedience: ; 105e10 .GetMoveNameText: ld hl, MoveNameText ret -; 105e23 -MoveNameText: ; 105e23 +MoveNameText: text_jump _MoveNameText start_asm ; get start address @@ -111,40 +106,33 @@ MoveNameText: ; 105e23 ld h, [hl] ld l, a ret -; 105e39 -.endusedmovetexts ; 105e39 +.endusedmovetexts ; entries correspond to MoveGrammar sets dw EndUsedMove1Text dw EndUsedMove2Text dw EndUsedMove3Text dw EndUsedMove4Text dw EndUsedMove5Text -; 105e43 -EndUsedMove1Text: ; 105e43 +EndUsedMove1Text: text_jump _EndUsedMove1Text db "@" -; 105e48 -EndUsedMove2Text: ; 105e48 +EndUsedMove2Text: text_jump _EndUsedMove2Text db "@" -; 105e4d -EndUsedMove3Text: ; 105e4d +EndUsedMove3Text: text_jump _EndUsedMove3Text db "@" -; 105e52 -EndUsedMove4Text: ; 105e52 +EndUsedMove4Text: text_jump _EndUsedMove4Text db "@" -; 105e57 -EndUsedMove5Text: ; 105e57 +EndUsedMove5Text: text_jump _EndUsedMove5Text db "@" -; 105e5c -GetMoveGrammar: ; 105e5c +GetMoveGrammar: ; store move grammar type in wd265 push bc @@ -178,12 +166,11 @@ GetMoveGrammar: ; 105e5c ; we're done pop bc ret -; 105e7a INCLUDE "data/moves/grammar.asm" -UpdateUsedMoves: ; 105ed0 +UpdateUsedMoves: ; append move a to wPlayerUsedMoves unless it has already been used push bc @@ -237,4 +224,3 @@ UpdateUsedMoves: ; 105ed0 ; list updated pop bc ret -; 105ef6 diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm index 449febf5f70..b30a42bf2f4 100644 --- a/engine/battle_anims/anim_commands.asm +++ b/engine/battle_anims/anim_commands.asm @@ -1,6 +1,6 @@ ; Battle animation command interpreter. -PlayBattleAnim: ; cc0d6 +PlayBattleAnim: ld a, [rSVBK] push af @@ -13,9 +13,8 @@ PlayBattleAnim: ; cc0d6 pop af ld [rSVBK], a ret -; cc0e4 -_PlayBattleAnim: ; cc0e4 +_PlayBattleAnim: ld c, 6 .wait @@ -52,9 +51,8 @@ _PlayBattleAnim: ; cc0e4 call BattleAnimDelayFrame call WaitSFX ret -; cc11c -BattleAnimRunScript: ; cc11c +BattleAnimRunScript: ld a, [wFXAnimID + 1] and a @@ -97,9 +95,8 @@ BattleAnimRunScript: ; cc11c .done call BattleAnim_RevertPals ret -; cc163 -RunBattleAnimScript: ; cc163 +RunBattleAnimScript: call ClearBattleAnims @@ -140,9 +137,8 @@ RunBattleAnimScript: ; cc163 call BattleAnim_ClearCGB_OAMFlags ret -; cc1a1 -BattleAnimClearHud: ; cc1a1 +BattleAnimClearHud: call BattleAnimDelayFrame call WaitTop @@ -154,9 +150,8 @@ BattleAnimClearHud: ; cc1a1 call BattleAnimDelayFrame call WaitTop ret -; cc1bb -BattleAnimRestoreHuds: ; cc1bb +BattleAnimRestoreHuds: call BattleAnimDelayFrame call WaitTop @@ -180,9 +175,8 @@ BattleAnimRestoreHuds: ; cc1bb call BattleAnimDelayFrame call WaitTop ret -; cc1e2 -BattleAnimRequestPals: ; cc1e2 +BattleAnimRequestPals: ld a, [hCGB] and a @@ -200,9 +194,8 @@ BattleAnimRequestPals: ; cc1e2 cp b call nz, BattleAnim_SetOBPals ret -; cc1fb -BattleAnimDelayFrame: ; cc1fb +BattleAnimDelayFrame: ; Like DelayFrame but wastes battery life. ld a, 1 @@ -212,9 +205,8 @@ BattleAnimDelayFrame: ; cc1fb and a jr nz, .wait ret -; cc207 -ClearActorHud: ; cc207 +ClearActorHud: ld a, [hBattleTurn] and a @@ -230,9 +222,8 @@ ClearActorHud: ; cc207 lb bc, 5, 11 call ClearBox ret -; cc220 -Unreferenced_Functioncc220: ; cc220 +Unreferenced_Functioncc220: xor a ld [hBGMapMode], a ld a, LOW(vBGMap0 tile $28) @@ -248,10 +239,9 @@ Unreferenced_Functioncc220: ; cc220 ld [hBGMapAddress + 1], a call BattleAnimDelayFrame ret -; cc23d -BattleAnim_ClearCGB_OAMFlags: ; cc23d +BattleAnim_ClearCGB_OAMFlags: ld a, [wBattleAnimFlags] bit 3, a @@ -279,16 +269,14 @@ endr dec c jr nz, .loop2 ret -; cc25f -RunBattleAnimCommand: ; cc25f +RunBattleAnimCommand: call .CheckTimer ret nc call .RunScript ret -; cc267 -.CheckTimer: ; cc267 +.CheckTimer: ld a, [wBattleAnimDuration] and a jr z, .done @@ -301,9 +289,8 @@ RunBattleAnimCommand: ; cc25f .done scf ret -; cc275 -.RunScript: ; cc275 +.RunScript: .loop call GetBattleAnimByte @@ -329,9 +316,8 @@ RunBattleAnimCommand: ; cc25f call .DoCommand jr .loop -; cc293 -.DoCommand: ; cc293 +.DoCommand: ; Execute battle animation command in [wBattleAnimByte]. ld a, [wBattleAnimByte] sub $d0 @@ -346,10 +332,9 @@ RunBattleAnimCommand: ; cc25f ld h, [hl] ld l, a jp hl -; cc2a4 -BattleAnimCommands:: ; cc2a4 (33:42a4) +BattleAnimCommands:: ; entries correspond to macros/scripts/battle_anims.asm enumeration dw BattleAnimCmd_Obj dw BattleAnimCmd_1GFX @@ -404,10 +389,10 @@ BattleAnimCommands:: ; cc2a4 (33:42a4) BattleAnimCmd_EA: BattleAnimCmd_EB: BattleAnimCmd_EC: -BattleAnimCmd_ED: ; cc304 (33:4304) +BattleAnimCmd_ED: ret -BattleAnimCmd_Ret: ; cc305 (33:4305) +BattleAnimCmd_Ret: ld hl, wBattleAnimFlags res 1, [hl] ld hl, wBattleAnimParent @@ -420,7 +405,7 @@ BattleAnimCmd_Ret: ; cc305 (33:4305) ld [hl], d ret -BattleAnimCmd_Call: ; cc317 (33:4317) +BattleAnimCmd_Call: call GetBattleAnimByte ld e, a call GetBattleAnimByte @@ -443,7 +428,7 @@ BattleAnimCmd_Call: ; cc317 (33:4317) set 1, [hl] ret -BattleAnimCmd_Jump: ; cc339 (33:4339) +BattleAnimCmd_Jump: call GetBattleAnimByte ld e, a call GetBattleAnimByte @@ -454,7 +439,7 @@ BattleAnimCmd_Jump: ; cc339 (33:4339) ld [hl], d ret -BattleAnimCmd_Loop: ; cc348 (33:4348) +BattleAnimCmd_Loop: call GetBattleAnimByte ld hl, wBattleAnimFlags bit 2, [hl] @@ -495,7 +480,7 @@ BattleAnimCmd_Loop: ; cc348 (33:4348) ld [hl], e ret -BattleAnimCmd_JumpUntil: ; cc383 (33:4383) +BattleAnimCmd_JumpUntil: ld hl, wBattleAnimParam ld a, [hl] and a @@ -524,17 +509,17 @@ BattleAnimCmd_JumpUntil: ; cc383 (33:4383) ld [hl], e ret -BattleAnimCmd_SetVar: ; cc3a6 (33:43a6) +BattleAnimCmd_SetVar: call GetBattleAnimByte ld [wBattleAnimVar], a ret -BattleAnimCmd_IncVar: ; cc3ad (33:43ad) +BattleAnimCmd_IncVar: ld hl, wBattleAnimVar inc [hl] ret -BattleAnimCmd_IfVarEqual: ; cc3b2 (33:43b2) +BattleAnimCmd_IfVarEqual: call GetBattleAnimByte ld hl, wBattleAnimVar cp [hl] @@ -562,7 +547,7 @@ BattleAnimCmd_IfVarEqual: ; cc3b2 (33:43b2) ld [hl], d ret -BattleAnimCmd_IfParamEqual: ; cc3d6 (33:43d6) +BattleAnimCmd_IfParamEqual: call GetBattleAnimByte ld hl, wBattleAnimParam cp [hl] @@ -590,7 +575,7 @@ BattleAnimCmd_IfParamEqual: ; cc3d6 (33:43d6) ld [hl], d ret -BattleAnimCmd_IfParamAnd: ; cc3fa (33:43fa) +BattleAnimCmd_IfParamAnd: call GetBattleAnimByte ld e, a ld a, [wBattleAnimParam] @@ -619,7 +604,7 @@ BattleAnimCmd_IfParamAnd: ; cc3fa (33:43fa) ld [hl], d ret -BattleAnimCmd_Obj: ; cc41f (33:441f) +BattleAnimCmd_Obj: ; index, x, y, param call GetBattleAnimByte ld [wBattleAnimTemp0], a @@ -632,7 +617,7 @@ BattleAnimCmd_Obj: ; cc41f (33:441f) call QueueBattleAnimation ret -BattleAnimCmd_BGEffect: ; cc43b (33:443b) +BattleAnimCmd_BGEffect: call GetBattleAnimByte ld [wBattleAnimTemp0], a call GetBattleAnimByte @@ -644,22 +629,22 @@ BattleAnimCmd_BGEffect: ; cc43b (33:443b) call _QueueBGEffect ret -BattleAnimCmd_BGP: ; cc457 (33:4457) +BattleAnimCmd_BGP: call GetBattleAnimByte ld [wBGP], a ret -BattleAnimCmd_OBP0: ; cc45e (33:445e) +BattleAnimCmd_OBP0: call GetBattleAnimByte ld [wOBP0], a ret -BattleAnimCmd_OBP1: ; cc465 (33:4465) +BattleAnimCmd_OBP1: call GetBattleAnimByte ld [wOBP1], a ret -BattleAnimCmd_ResetObp0: ; cc46c (33:446c) +BattleAnimCmd_ResetObp0: ld a, [hSGB] and a ld a, $e0 @@ -669,7 +654,7 @@ BattleAnimCmd_ResetObp0: ; cc46c (33:446c) ld [wOBP0], a ret -BattleAnimCmd_ClearObjs: ; cc479 (33:4479) +BattleAnimCmd_ClearObjs: ld hl, wActiveAnimObjects ld a, $a0 .loop @@ -683,7 +668,7 @@ BattleAnimCmd_1GFX: BattleAnimCmd_2GFX: BattleAnimCmd_3GFX: BattleAnimCmd_4GFX: -BattleAnimCmd_5GFX: ; cc485 (33:4485) +BattleAnimCmd_5GFX: ld a, [wBattleAnimByte] and $f ld c, a @@ -718,7 +703,7 @@ endr jr nz, .loop ret -BattleAnimCmd_IncObj: ; cc4c0 (33:44c0) +BattleAnimCmd_IncObj: call GetBattleAnimByte ld e, 10 ld bc, wActiveAnimObjects @@ -743,7 +728,7 @@ BattleAnimCmd_IncObj: ; cc4c0 (33:44c0) inc [hl] ret -BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3) +BattleAnimCmd_IncBGEffect: call GetBattleAnimByte ld e, 5 ld bc, wActiveBGEffects @@ -768,7 +753,7 @@ BattleAnimCmd_IncBGEffect: ; cc4e3 (33:44e3) inc [hl] ret -BattleAnimCmd_SetObj: ; cc506 (33:4506) +BattleAnimCmd_SetObj: call GetBattleAnimByte ld e, 10 ld bc, wActiveAnimObjects @@ -794,7 +779,7 @@ BattleAnimCmd_SetObj: ; cc506 (33:4506) ld [hl], a ret -BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c) +BattleAnimCmd_EnemyFeetObj: ld hl, wBattleAnimTileDict .loop @@ -828,7 +813,7 @@ BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c) call .LoadFootprint ret -.LoadFootprint: ; cc561 (33:4561) +.LoadFootprint: push af push hl push de @@ -849,7 +834,7 @@ BattleAnimCmd_EnemyFeetObj: ; cc52c (33:452c) jr nz, .LoadFootprint ret -BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e) +BattleAnimCmd_PlayerHeadObj: ld hl, wBattleAnimTileDict .loop @@ -883,7 +868,7 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e) call .LoadHead ret -.LoadHead: ; cc5b3 (33:45b3) +.LoadHead: push af push hl push de @@ -904,16 +889,16 @@ BattleAnimCmd_PlayerHeadObj: ; cc57e (33:457e) jr nz, .LoadHead ret -BattleAnimCmd_CheckPokeball: ; cc5d0 (33:45d0) +BattleAnimCmd_CheckPokeball: callfar GetPokeBallWobble ld a, c ld [wBattleAnimVar], a ret -BattleAnimCmd_E7: ; cc5db (33:45db) +BattleAnimCmd_E7: ret -BattleAnimCmd_Transform: ; cc5dc (33:45dc) +BattleAnimCmd_Transform: ld a, [rSVBK] push af ld a, BANK(wCurPartySpecies) @@ -948,7 +933,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc) ld [rSVBK], a ret -BattleAnimCmd_UpdateActorPic: ; cc622 (33:4622) +BattleAnimCmd_UpdateActorPic: ld de, vTiles0 tile $00 ld a, [hBattleTurn] @@ -968,7 +953,7 @@ BattleAnimCmd_UpdateActorPic: ; cc622 (33:4622) call Request2bpp ret -BattleAnimCmd_RaiseSub: ; cc640 (33:4640) +BattleAnimCmd_RaiseSub: ld a, [rSVBK] push af @@ -1037,13 +1022,13 @@ GetSubstitutePic: ; used only for BANK(GetSubstitutePic) ld [rSVBK], a ret -.CopyTile: ; cc6c6 (33:46c6) +.CopyTile: ld bc, 1 tiles ld a, BANK(MonsterSpriteGFX) call FarCopyBytes ret -BattleAnimCmd_MinimizeOpp: ; cc6cf (33:46cf) +BattleAnimCmd_MinimizeOpp: ld a, [rSVBK] push af ld a, 1 ; unnecessary bankswitch? @@ -1057,7 +1042,7 @@ BattleAnimCmd_MinimizeOpp: ; cc6cf (33:46cf) ld [rSVBK], a ret -GetMinimizePic: ; cc6e7 (33:46e7) +GetMinimizePic: ld hl, sScratch ld bc, $31 tiles .loop @@ -1087,19 +1072,17 @@ GetMinimizePic: ; cc6e7 (33:46e7) lb bc, BANK(GetMinimizePic), 6 * 6 ret -CopyMinimizePic: ; cc719 (33:4719) +CopyMinimizePic: ld hl, MinimizePic ld bc, $10 ld a, BANK(MinimizePic) call FarCopyBytes ret -; cc725 (33:4725) -MinimizePic: ; cc725 +MinimizePic: INCBIN "gfx/battle/minimize.2bpp" -; cc735 -BattleAnimCmd_Minimize: ; cc735 (33:4735) +BattleAnimCmd_Minimize: ld a, [rSVBK] push af ld a, 1 ; unnecessary bankswitch? @@ -1114,7 +1097,7 @@ BattleAnimCmd_Minimize: ; cc735 (33:4735) ld [rSVBK], a ret -BattleAnimCmd_DropSub: ; cc750 (33:4750) +BattleAnimCmd_DropSub: ld a, [rSVBK] push af ld a, BANK(wCurPartySpecies) @@ -1139,7 +1122,7 @@ BattleAnimCmd_DropSub: ; cc750 (33:4750) ld [rSVBK], a ret -BattleAnimCmd_BeatUp: ; cc776 (33:4776) +BattleAnimCmd_BeatUp: ld a, [rSVBK] push af ld a, BANK(wCurPartySpecies) @@ -1175,31 +1158,31 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776) ld [rSVBK], a ret -BattleAnimCmd_OAMOn: ; cc7bb (33:47bb) +BattleAnimCmd_OAMOn: xor a ld [hOAMUpdate], a ret -BattleAnimCmd_OAMOff: ; cc7bf (33:47bf) +BattleAnimCmd_OAMOff: ld a, $1 ld [hOAMUpdate], a ret -BattleAnimCmd_ClearSprites: ; cc7c4 (33:47c4) +BattleAnimCmd_ClearSprites: ld hl, wBattleAnimFlags set 3, [hl] ret -BattleAnimCmd_F5: ; cc7ca (33:47ca) +BattleAnimCmd_F5: ret -BattleAnimCmd_F6: ; cc7cb (33:47cb) +BattleAnimCmd_F6: ret -BattleAnimCmd_F7: ; cc7cc (33:47cc) +BattleAnimCmd_F7: ret -BattleAnimCmd_Sound: ; cc7cd (33:47cd) +BattleAnimCmd_Sound: call GetBattleAnimByte ld e, a srl a @@ -1222,13 +1205,11 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd) callfar PlayStereoSFX ret -; cc7f8 (33:47f8) -.GetPanning: ; cc7f8 +.GetPanning: db $f0, $0f, $f0, $0f -; cc7fc -.GetCryTrack: ; cc7fc (33:47fc) +.GetCryTrack: ld a, [hBattleTurn] and a jr nz, .enemy @@ -1241,7 +1222,7 @@ BattleAnimCmd_Sound: ; cc7cd (33:47cd) xor 1 ret -BattleAnimCmd_Cry: ; cc807 (33:4807) +BattleAnimCmd_Cry: call GetBattleAnimByte maskbits NUM_NOISE_CHANS ld e, a @@ -1315,18 +1296,16 @@ endr pop af ld [rSVBK], a ret -; cc871 (33:4871) -.CryData: ; cc871 +.CryData: ; +pitch, +length dw $0000, $00c0 dw $0000, $0040 dw $0000, $0000 dw $0000, $0000 -; cc881 -PlayHitSound: ; cc881 +PlayHitSound: ld a, [wNumHits] cp $1 jr z, .okay @@ -1350,9 +1329,8 @@ PlayHitSound: ; cc881 .play call PlaySFX ret -; cc8a4 -BattleAnimAssignPals: ; cc8a4 +BattleAnimAssignPals: ld a, [hCGB] and a jr nz, .cgb @@ -1378,9 +1356,8 @@ BattleAnimAssignPals: ; cc8a4 lb de, %11100100, %11100100 call DmgToCgbObjPals ret -; cc8d3 -ClearBattleAnims: ; cc8d3 +ClearBattleAnims: ; Clear animation block ld hl, wLYOverrides ld bc, wBattleAnimEnd - wLYOverrides @@ -1403,9 +1380,8 @@ ClearBattleAnims: ; cc8d3 call BattleAnimAssignPals call BattleAnimDelayFrame ret -; cc8f6 -BattleAnim_RevertPals: ; cc8f6 +BattleAnim_RevertPals: call WaitTop ld a, %11100100 ld [wBGP], a @@ -1421,9 +1397,8 @@ BattleAnim_RevertPals: ; cc8f6 ld a, $1 ld [hBGMapMode], a ret -; cc91a -BattleAnim_SetBGPals: ; cc91a +BattleAnim_SetBGPals: ld [rBGP], a ld a, [hCGB] and a @@ -1449,9 +1424,8 @@ BattleAnim_SetBGPals: ; cc91a ld a, $1 ld [hCGBPalUpdate], a ret -; cc94b -BattleAnim_SetOBPals: ; cc94b +BattleAnim_SetOBPals: ld [rOBP0], a ld a, [hCGB] and a @@ -1471,9 +1445,8 @@ BattleAnim_SetOBPals: ; cc94b ld a, $1 ld [hCGBPalUpdate], a ret -; cc96e -BattleAnim_UpdateOAM_All: ; cc96e +BattleAnim_UpdateOAM_All: ld a, $0 ld [wBattleAnimOAMPointerLo], a ld hl, wActiveAnimObjects @@ -1510,4 +1483,3 @@ BattleAnim_UpdateOAM_All: ; cc96e .done ret -; cc9a1 diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm index 3192774ddb4..89ffb0aa4a7 100644 --- a/engine/battle_anims/bg_effects.asm +++ b/engine/battle_anims/bg_effects.asm @@ -8,7 +8,7 @@ ; BG effects for use in battle animations. -ExecuteBGEffects: ; c8000 (32:4000) +ExecuteBGEffects: ld hl, wActiveBGEffects ld e, 5 .loop @@ -29,7 +29,7 @@ ExecuteBGEffects: ; c8000 (32:4000) jr nz, .loop ret -QueueBGEffect: ; c801a (32:401a) +QueueBGEffect: ld hl, wActiveBGEffects ld e, 5 .loop @@ -58,13 +58,13 @@ QueueBGEffect: ; c801a (32:401a) ld [hl], a ret -EndBattleBGEffect: ; c8043 (32:4043) +EndBattleBGEffect: ld hl, BG_EFFECT_STRUCT_FUNCTION add hl, bc ld [hl], 0 ret -DoBattleBGEffectFunction: ; c804a (32:404a) +DoBattleBGEffectFunction: ld hl, BG_EFFECT_STRUCT_FUNCTION add hl, bc ld e, [hl] @@ -77,7 +77,7 @@ DoBattleBGEffectFunction: ; c804a (32:404a) ld l, a jp hl -BattleBGEffects: ; c805a (32:405a) +BattleBGEffects: ; entries correspond to ANIM_BG_* constants dw BattleBGEffect_End dw BattleBGEffect_FlashInverted @@ -135,11 +135,11 @@ BattleBGEffects: ; c805a (32:405a) dw BattleBGEffect_35 -BattleBGEffect_End: ; c80c6 (32:40c6) +BattleBGEffect_End: call EndBattleBGEffect ret -BatttleBGEffects_GetNamedJumptablePointer: ; c80ca (32:40ca) +BatttleBGEffects_GetNamedJumptablePointer: ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc ld l, [hl] @@ -151,7 +151,7 @@ BatttleBGEffects_GetNamedJumptablePointer: ; c80ca (32:40ca) ld l, a ret -BattleBGEffects_AnonJumptable: ; c80d7 (32:40d7) +BattleBGEffects_AnonJumptable: pop de ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc @@ -164,31 +164,29 @@ BattleBGEffects_AnonJumptable: ; c80d7 (32:40d7) ld l, a jp hl -BattleBGEffects_IncrementJumptable: ; c80e5 (32:40e5) +BattleBGEffects_IncrementJumptable: ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc inc [hl] ret -BattleBGEffect_FlashInverted: ; c80eb (32:40eb) +BattleBGEffect_FlashInverted: ld de, .inverted jp BattleBGEffect_FlashContinue .inverted db %11100100 ; 3210 db %00011011 ; 0123 -; c80f3 -BattleBGEffect_FlashWhite: ; c80f3 (32:40f3) +BattleBGEffect_FlashWhite: ld de, .white jp BattleBGEffect_FlashContinue .white db %11100100 ; 3210 db %00000000 ; 0000 -; c80fb -BattleBGEffect_FlashContinue: ; c80fb (32:40fb) +BattleBGEffect_FlashContinue: ; current timer, flash duration, number of flashes ld a, $1 ld [wBattleAnimTemp0], a @@ -226,7 +224,7 @@ BattleBGEffect_FlashContinue: ; c80fb (32:40fb) ld [wBGP], a ret -BattleBGEffect_WhiteHues: ; c812d (32:412d) +BattleBGEffect_WhiteHues: ld de, .Pals call BattleBGEffect_GetNthDMGPal jr c, .quit @@ -242,9 +240,8 @@ BattleBGEffect_WhiteHues: ; c812d (32:412d) db %11100000 db %11010000 db -1 -; c8141 -BattleBGEffect_BlackHues: ; c8141 (32:4141) +BattleBGEffect_BlackHues: ld de, .Pals call BattleBGEffect_GetNthDMGPal jr c, .quit @@ -260,9 +257,8 @@ BattleBGEffect_BlackHues: ; c8141 (32:4141) db %11110100 db %11111000 db -1 -; c8155 -BattleBGEffect_AlternateHues: ; c8155 (32:4155) +BattleBGEffect_AlternateHues: ld de, .Pals call BattleBGEffect_GetNthDMGPal jr c, .quit @@ -284,9 +280,8 @@ BattleBGEffect_AlternateHues: ; c8155 (32:4155) db %01000000 db %10010000 db -2 -; c8171 -BattleBGEffect_06: ; c8171 (32:4171) +BattleBGEffect_06: call BattleBGEffects_CheckSGB jr nz, .sgb ld de, .PalsCGB @@ -308,9 +303,8 @@ BattleBGEffect_06: ; c8171 (32:4171) db %11110000 db %11000000 db -2 -; c818b -BattleBGEffect_07: ; c818b (32:418b) +BattleBGEffect_07: call BattleBGEffects_CheckSGB jr nz, .sgb ld de, .PalsCGB @@ -332,9 +326,8 @@ BattleBGEffect_07: ; c818b (32:418b) db %11110000 db %11001100 db -2 -; c81a5 -BattleBGEffect_08: ; c81a5 (32:41a5) +BattleBGEffect_08: ld de, .Pals call BattleBGEffect_GetNthDMGPal ld [wBGP], a @@ -345,9 +338,8 @@ BattleBGEffect_08: ; c81a5 (32:41a5) db %01100011 db %10000111 db -2 -; c81b3 -BattleBGEffect_HideMon: ; c81b3 (32:41b3) +BattleBGEffect_HideMon: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -384,7 +376,7 @@ BattleBGEffect_HideMon: ; c81b3 (32:41b3) call EndBattleBGEffect ret -BattleBGEffect_ShowMon: ; c81ea (32:41ea) +BattleBGEffect_ShowMon: call BGEffect_CheckFlyDigStatus jr z, .not_flying call EndBattleBGEffect @@ -412,9 +404,8 @@ BattleBGEffect_ShowMon: ; c81ea (32:41ea) .EnemyData: db 3, $00, 3 db -1 -; c8214 -BattleBGEffect_FeetFollow: ; c8214 (32:4214) +BattleBGEffect_FeetFollow: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -482,7 +473,7 @@ BattleBGEffect_FeetFollow: ; c8214 (32:4214) call EndBattleBGEffect ret -BattleBGEffect_HeadFollow: ; c8281 (32:4281) +BattleBGEffect_HeadFollow: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -550,11 +541,11 @@ BattleBGEffect_HeadFollow: ; c8281 (32:4281) call EndBattleBGEffect ret -_QueueBattleAnimation: ; c82ee (32:42ee) +_QueueBattleAnimation: callfar QueueBattleAnimation ret -BattleBGEffect_27: ; c82f5 (32:42f5) +BattleBGEffect_27: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -655,7 +646,7 @@ BattleBGEffect_27: ; c82f5 (32:42f5) call EndBattleBGEffect ret -BattleBGEffect_EnterMon: ; c837b (32:437b) +BattleBGEffect_EnterMon: call BGEffect_CheckBattleTurn jr nz, .player_turn ld de, .EnemyData @@ -681,9 +672,8 @@ BattleBGEffect_EnterMon: ; c837b (32:437b) db 4, $00, 4 db 3, $00, 3 db -1 -; c83a8 -BattleBGEffect_ReturnMon: ; c83a8 (32:43a8) +BattleBGEffect_ReturnMon: call BGEffect_CheckBattleTurn jr nz, .player_turn ld de, .EnemyData @@ -717,9 +707,8 @@ BattleBGEffect_ReturnMon: ; c83a8 (32:43a8) db -2, $33, 5 db -3, $00, 0 db -1 -; c83ed -BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed) +BattleBGEffect_RunPicResizeScript: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -918,9 +907,8 @@ ENDM db $00, $15, $2a db $03, $18, $2d db $06, $1b, $30 -; c8545 -BattleBGEffect_Surf: ; c8545 (32:4545) +BattleBGEffect_Surf: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -987,7 +975,7 @@ BattleBGEffect_Surf: ; c8545 (32:4545) jr c, .loop2 ret -BattleBGEffect_Whirlpool: ; c8599 (32:4599) +BattleBGEffect_Whirlpool: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1016,14 +1004,14 @@ BattleBGEffect_Whirlpool: ; c8599 (32:4599) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_30: ; c85c2 (32:45c2) +BattleBGEffect_30: call BattleBGEffects_ClearLYOverrides ld a, rSCY - $ff00 call BattleBGEffect_SetLCDStatCustoms1 call EndBattleBGEffect ret -BattleBGEffect_31: ; c85ce (32:45ce) +BattleBGEffect_31: ld hl, BG_EFFECT_STRUCT_03 add hl, bc ld a, [hl] @@ -1057,11 +1045,11 @@ BattleBGEffect_31: ; c85ce (32:45ce) call EndBattleBGEffect ret -BattleBGEffect_32: ; c8603 (32:4603) +BattleBGEffect_32: call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Psychic: ; c8607 (32:4607) +BattleBGEffect_Psychic: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1099,7 +1087,7 @@ BattleBGEffect_Psychic: ; c8607 (32:4607) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Teleport: ; c863f (32:463f) +BattleBGEffect_Teleport: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1124,7 +1112,7 @@ BattleBGEffect_Teleport: ; c863f (32:463f) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_NightShade: ; c8662 (32:4662) +BattleBGEffect_NightShade: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1152,7 +1140,7 @@ BattleBGEffect_NightShade: ; c8662 (32:4662) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_DoubleTeam: ; c8689 (32:4689) +BattleBGEffect_DoubleTeam: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1247,7 +1235,7 @@ BattleBGEffect_DoubleTeam: ; c8689 (32:4689) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_AcidArmor: ; c8709 (32:4709) +BattleBGEffect_AcidArmor: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1310,7 +1298,7 @@ BattleBGEffect_AcidArmor: ; c8709 (32:4709) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Withdraw: ; c8761 (32:4761) +BattleBGEffect_Withdraw: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1359,7 +1347,7 @@ BattleBGEffect_Withdraw: ; c8761 (32:4761) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Dig: ; c87a7 (32:47a7) +BattleBGEffect_Dig: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1426,7 +1414,7 @@ BattleBGEffect_Dig: ; c87a7 (32:47a7) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_Tackle: ; c8805 (32:4805) +BattleBGEffect_Tackle: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1461,7 +1449,7 @@ BattleBGEffect_Tackle: ; c8805 (32:4805) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_25: ; c8837 (32:4837) +BattleBGEffect_25: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1537,7 +1525,7 @@ Tackle_BGEffect25_2d_two: ld [hl], a ret -Functionc88a5: ; c88a5 (32:48a5) +Functionc88a5: push af ld a, [wFXAnimID + 1] ; FXAnimID + 1 or a @@ -1589,7 +1577,7 @@ Functionc88a5: ; c88a5 (32:48a5) jr nz, .loop ret -BattleBGEffect_2d: ; c88e7 (32:48e7) +BattleBGEffect_2d: call BattleBGEffects_AnonJumptable .anon_dw dw BGEffect2d_2f_zero @@ -1624,7 +1612,7 @@ BGEffect2d_2f_zero: ld [hl], a ret -BattleBGEffect_2f: ; c8919 (32:4919) +BattleBGEffect_2f: call BattleBGEffects_AnonJumptable .anon_dw dw BGEffect2d_2f_zero @@ -1638,7 +1626,7 @@ BattleBGEffect_2f: ; c8919 (32:4919) .two ret -BattleBGEffect_26: ; c892a (32:492a) +BattleBGEffect_26: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1677,7 +1665,7 @@ BattleBGEffect_26: ; c892a (32:492a) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_2c: ; c8964 (32:4964) +BattleBGEffect_2c: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1732,7 +1720,7 @@ BattleBGEffect_2c: ; c8964 (32:4964) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_28: ; c89b5 (32:49b5) +BattleBGEffect_28: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1775,7 +1763,7 @@ BattleBGEffect_28: ; c89b5 (32:49b5) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_BounceDown: ; c89ee (32:49ee) +BattleBGEffect_BounceDown: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1826,7 +1814,7 @@ BattleBGEffect_BounceDown: ; c89ee (32:49ee) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_2a: ; c8a3a (32:4a3a) +BattleBGEffect_2a: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1933,9 +1921,8 @@ BattleBGEffect_2a: ; c8a3a (32:4a3a) .data db $00, $40, $90, $e4 db -1 -; c8acc -BattleBGEffect_2b: ; c8acc (32:4acc) +BattleBGEffect_2b: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -1972,7 +1959,7 @@ BattleBGEffect_2b: ; c8acc (32:4acc) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_1c: ; c8b00 (32:4b00) +BattleBGEffect_1c: ld a, [hCGB] and a jr nz, .cgb @@ -2130,97 +2117,87 @@ BattleBGEffect_1c: ; c8b00 (32:4b00) db $90, $f8 db $40, $fc db $90, $f8 -; c8be8 -BattleBGEffect_RapidFlash: ; c8be8 (32:4be8) +BattleBGEffect_RapidFlash: ld de, .FlashPals call BGEffect_RapidCyclePals ret .FlashPals: db $e4, $6c, $fe -; c8bf2 -BattleBGEffect_16: ; c8bf2 (32:4bf2) +BattleBGEffect_16: ld de, .Pals call BGEffect_RapidCyclePals ret .Pals: db $e4, $90, $40, $ff -; c8bfd -BattleBGEffect_17: ; c8bfd (32:4bfd) +BattleBGEffect_17: ld de, .Pals call BGEffect_RapidCyclePals ret .Pals: db $e4, $f8, $fc, $ff -; c8c08 -BattleBGEffect_18: ; c8c08 (32:4c08) +BattleBGEffect_18: ld de, .Pals call BGEffect_RapidCyclePals ret .Pals: db $e4, $90, $40, $90, $fe -; c8c14 -BattleBGEffect_19: ; c8c14 (32:4c14) +BattleBGEffect_19: ld de, .Pals call BGEffect_RapidCyclePals ret .Pals: db $e4, $f8, $fc, $f8, $fe -; c8c20 -BattleBGEffect_1a: ; c8c20 (32:4c20) +BattleBGEffect_1a: ld de, .Pals call BGEffect_RapidCyclePals ret .Pals: db $e4, $f8, $fc, $f8, $e4, $90, $40, $90, $fe -; c8c30 -BattleBGEffect_1b: ; c8c30 (32:4c30) +BattleBGEffect_1b: ld de, .Pals call BGEffect_RapidCyclePals ret .Pals: db $e4, $fc, $e4, $00, $fe -; c8c3c -BattleBGEffect_1d: ; c8c3c (32:4c3c) +BattleBGEffect_1d: ld de, .Pals call BGEffect_RapidCyclePals ret .Pals: db $e4, $90, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $40, $90, $e4, $ff -; c8c55 -BattleBGEffect_1e: ; c8c55 (32:4c55) +BattleBGEffect_1e: ld de, .Pals call BGEffect_RapidCyclePals ret .Pals: db $00, $40, $90, $e4, $ff -; c8c61 -BattleBGEffect_VibrateMon: ; c8c61 (32:4c61) +BattleBGEffect_VibrateMon: call BattleBGEffects_AnonJumptable .anon_dw dw .zero dw .one -.zero ; c8c68 (32:4c68) +.zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides ld a, rSCX - $ff00 @@ -2236,7 +2213,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61) ld [hl], $20 ret -.one ; c8c85 (32:4c85) +.one ld hl, BG_EFFECT_STRUCT_03 add hl, bc ld a, [hl] @@ -2258,7 +2235,7 @@ BattleBGEffect_VibrateMon: ; c8c61 (32:4c61) call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2) +BattleBGEffect_WobbleMon: call BattleBGEffects_AnonJumptable .anon_dw dw .zero @@ -2266,7 +2243,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2) dw .two -.zero ; c8cab (32:4cab) +.zero call BattleBGEffects_IncrementJumptable call BattleBGEffects_ClearLYOverrides ld a, rSCX - $ff00 @@ -2280,7 +2257,7 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2) ld [hl], $0 ret -.one ; c8cc3 (32:4cc3) +.one ld hl, BG_EFFECT_STRUCT_03 add hl, bc ld a, [hl] @@ -2296,11 +2273,11 @@ BattleBGEffect_WobbleMon: ; c8ca2 (32:4ca2) ld [hl], a ret -.two ; c8cdd (32:4cdd) +.two call BattleAnim_ResetLCDStatCustom ret -BattleBGEffect_2e: ; c8ce1 (32:4ce1) +BattleBGEffect_2e: call Functionc8d0b jr c, .xor_a bit 7, a @@ -2317,7 +2294,7 @@ BattleBGEffect_2e: ; c8ce1 (32:4ce1) ld [wAnimObject01YOffset], a ret -BattleBGEffect_1f: ; c8cf9 (32:4cf9) +BattleBGEffect_1f: call Functionc8d0b jr nc, .skip xor a @@ -2325,7 +2302,7 @@ BattleBGEffect_1f: ; c8cf9 (32:4cf9) ld [hSCX], a ret -BattleBGEffect_20: ; c8d02 (32:4d02) +BattleBGEffect_20: call Functionc8d0b jr nc, .skip xor a @@ -2333,7 +2310,7 @@ BattleBGEffect_20: ; c8d02 (32:4d02) ld [hSCY], a ret -Functionc8d0b: ; c8d0b (32:4d0b) +Functionc8d0b: ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc ld a, [hl] @@ -2371,7 +2348,7 @@ Functionc8d0b: ; c8d0b (32:4d0b) and a ret -BattleBGEffect_35: ; c8d3a (32:4d3a) +BattleBGEffect_35: ld hl, BG_EFFECT_STRUCT_03 add hl, bc ld a, [hl] @@ -2392,7 +2369,7 @@ BattleBGEffect_35: ; c8d3a (32:4d3a) ld [hSCX], a ret -BattleBGEffect_GetNthDMGPal: ; c8d57 (32:4d57) +BattleBGEffect_GetNthDMGPal: ld hl, BG_EFFECT_STRUCT_JT_INDEX add hl, bc ld a, [hl] @@ -2415,7 +2392,7 @@ BattleBGEffect_GetNthDMGPal: ; c8d57 (32:4d57) call BattleBGEffect_GetFirstDMGPal ret -BGEffect_RapidCyclePals: ; c8d77 (32:4d77) +BGEffect_RapidCyclePals: ld a, [hCGB] and a jr nz, .cgb @@ -2431,7 +2408,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) dw .two_dmg -.zero_dmg ; c8d8b (32:4d8b) +.zero_dmg call BattleBGEffects_IncrementJumptable ld a, $e4 call BattleBGEffects_SetLYOverrides @@ -2449,7 +2426,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) ld [hl], a ret -.one_dmg ; c8daa (32:4daa) +.one_dmg ld hl, BG_EFFECT_STRUCT_BATTLE_TURN add hl, bc ld a, [hl] @@ -2474,7 +2451,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) dec [hl] ret -.two_dmg ; c8dc9 (32:4dc9) +.two_dmg call BattleBGEffects_ResetVideoHRAM ld a, %11100100 ld [rBGP], a @@ -2488,7 +2465,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) pop de jp hl -.Jumptable_CGB: ; c8ddd (32:4ddd) +.Jumptable_CGB: dw .zero_cgb dw .one_cgb dw .two_cgb @@ -2496,7 +2473,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) dw .four_cgb -.zero_cgb ; c8de7 (32:4de7) +.zero_cgb call BGEffect_CheckBattleTurn jr nz, .player_turn_cgb call BattleBGEffects_IncrementJumptable @@ -2512,7 +2489,7 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) ld [hl], a ret -.one_cgb ; c8e02 (32:4e02) +.one_cgb ld hl, BG_EFFECT_STRUCT_BATTLE_TURN add hl, bc ld a, [hl] @@ -2537,13 +2514,13 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) dec [hl] ret -.two_cgb ; c8e21 (32:4e21) +.two_cgb ld a, $e4 call BGEffects_LoadBGPal0_OBPal1 call EndBattleBGEffect ret -.three_cgb ; c8e2a (32:4e2a) +.three_cgb ld hl, BG_EFFECT_STRUCT_BATTLE_TURN add hl, bc ld a, [hl] @@ -2568,13 +2545,13 @@ BGEffect_RapidCyclePals: ; c8d77 (32:4d77) dec [hl] ret -.four_cgb ; c8e49 (32:4e49) +.four_cgb ld a, $e4 call BGEffects_LoadBGPal1_OBPal0 call EndBattleBGEffect ret -BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52) +BGEffects_LoadBGPal0_OBPal1: ld h, a ld a, [rSVBK] push af @@ -2601,7 +2578,7 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52) ld [hCGBPalUpdate], a ret -BGEffects_LoadBGPal1_OBPal0: ; c8e7f (32:4e7f) +BGEffects_LoadBGPal1_OBPal0: ld h, a ld a, [rSVBK] push af @@ -2628,12 +2605,12 @@ BGEffects_LoadBGPal1_OBPal0: ; c8e7f (32:4e7f) ld [hCGBPalUpdate], a ret -BattleBGEffect_GetFirstDMGPal: ; c8eac (32:4eac) +BattleBGEffect_GetFirstDMGPal: ld hl, BG_EFFECT_STRUCT_03 add hl, bc ld a, [hl] inc [hl] -BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2) +BattleBGEffect_GetNextDMGPal: ld l, a ld h, $0 add hl, de @@ -2654,9 +2631,9 @@ BattleBGEffect_GetNextDMGPal: ; c8eb2 (32:4eb2) scf ret -BattleBGEffects_ClearLYOverrides: ; c8eca (32:4eca) +BattleBGEffects_ClearLYOverrides: xor a -BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb) +BattleBGEffects_SetLYOverrides: ld hl, wLYOverrides ; wListPointer ld e, $99 .loop1 @@ -2671,7 +2648,7 @@ BattleBGEffects_SetLYOverrides: ; c8ecb (32:4ecb) jr nz, .loop2 ret -BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede) +BattleBGEffect_SetLCDStatCustoms1: ld [hLCDCPointer], a call BGEffect_CheckBattleTurn jr nz, .player_turn @@ -2687,7 +2664,7 @@ BattleBGEffect_SetLCDStatCustoms1: ; c8ede (32:4ede) ld [hLYOverrideEnd], a ret -BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4) +BattleBGEffect_SetLCDStatCustoms2: ld [hLCDCPointer], a call BGEffect_CheckBattleTurn jr nz, .player_turn @@ -2703,7 +2680,7 @@ BattleBGEffect_SetLCDStatCustoms2: ; c8ef4 (32:4ef4) ld [hLYOverrideEnd], a ret -BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a) +BattleAnim_ResetLCDStatCustom: xor a ld [hLYOverrideStart], a ld [hLYOverrideEnd], a @@ -2713,7 +2690,7 @@ BattleAnim_ResetLCDStatCustom: ; c8f0a (32:4f0a) call EndBattleBGEffect ret -BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19) +BattleBGEffects_ResetVideoHRAM: xor a ld [hLCDCPointer], a ld a, %11100100 @@ -2725,7 +2702,7 @@ BattleBGEffects_ResetVideoHRAM: ; c8f19 (32:4f19) call BattleBGEffects_ClearLYOverrides ret -Functionc8f2e: ; c8f2e (32:4f2e) +Functionc8f2e: push bc xor a ld [wBattleAnimTemp0], a @@ -2760,7 +2737,7 @@ Functionc8f2e: ; c8f2e (32:4f2e) pop bc ret -InitSurfWaves: ; c8f69 (32:4f69) +InitSurfWaves: push bc xor a ld [wBattleAnimTemp0], a @@ -2788,7 +2765,7 @@ InitSurfWaves: ; c8f69 (32:4f69) pop bc ret -Functionc8f9a: ; c8f9a (32:4f9a) +Functionc8f9a: push bc ld [wBattleAnimTemp3], a ld a, e @@ -2847,7 +2824,7 @@ Functionc8f9a: ; c8f9a (32:4f9a) ld d, $0 ret -BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef) +BattleBGEffect_WavyScreenFX: push bc ld a, [hLYOverrideStart] ld l, a @@ -2874,7 +2851,7 @@ BattleBGEffect_WavyScreenFX: ; c8fef (32:4fef) pop bc ret -BGEffect_FillLYOverridesBackup: ; c900b (32:500b) +BGEffect_FillLYOverridesBackup: push af ld h, HIGH(wLYOverridesBackup) ld a, [hLYOverrideStart] @@ -2889,7 +2866,7 @@ BGEffect_FillLYOverridesBackup: ; c900b (32:500b) jr nz, .loop ret -BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b) +BGEffect_DisplaceLYOverridesBackup: ; e = a; d = [hLYOverrideEnd] - [hLYOverrideStart] - a push af ld e, a @@ -2915,7 +2892,7 @@ BGEffect_DisplaceLYOverridesBackup: ; c901b (32:501b) jr nz, .loop2 ret -BGEffect_CheckBattleTurn: ; c9038 (32:5038) +BGEffect_CheckBattleTurn: ld hl, BG_EFFECT_STRUCT_BATTLE_TURN add hl, bc ld a, [hBattleTurn] @@ -2923,7 +2900,7 @@ BGEffect_CheckBattleTurn: ; c9038 (32:5038) xor [hl] ret -BGEffect_CheckFlyDigStatus: ; c9042 (32:5042) +BGEffect_CheckFlyDigStatus: ld hl, BG_EFFECT_STRUCT_BATTLE_TURN add hl, bc ld a, [hBattleTurn] @@ -2939,21 +2916,20 @@ BGEffect_CheckFlyDigStatus: ; c9042 (32:5042) and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND ret -BattleBGEffects_CheckSGB: ; c9059 (32:5059) +BattleBGEffects_CheckSGB: ld a, [hSGB] and a ret -BattleBGEffects_Sine: ; c905d (32:505d) +BattleBGEffects_Sine: ld e, a callfar BattleAnim_Sine_e ld a, e ret -BattleBGEffects_Cosine: ; c9066 (32:5066) +BattleBGEffects_Cosine: ld e, a callfar BattleAnim_Cosine_e ld a, e ret -; c906f (32:506f) diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm index 11578f7f0af..20ab74e7b6d 100644 --- a/engine/battle_anims/core.asm +++ b/engine/battle_anims/core.asm @@ -1,4 +1,4 @@ -QueueBattleAnimation: ; cc9a1 (33:49a1) +QueueBattleAnimation: ld hl, wActiveAnimObjects ld e, 10 .loop @@ -20,15 +20,14 @@ QueueBattleAnimation: ; cc9a1 (33:49a1) call InitBattleAnimation ret -DeinitBattleAnimation: ; cc9bd +DeinitBattleAnimation: ld hl, BATTLEANIMSTRUCT_INDEX add hl, bc ld [hl], $0 ret -; cc9c4 -InitBattleAnimation: ; cc9c4 (33:49c4) +InitBattleAnimation: ld a, [wBattleAnimTemp0] ld e, a ld d, 0 @@ -79,7 +78,7 @@ endr ld [hl], a ; 10 ret -BattleAnimOAMUpdate: ; cca09 +BattleAnimOAMUpdate: call InitBattleAnimBuffer call GetBattleAnimFrame cp -3 @@ -191,9 +190,8 @@ BattleAnimOAMUpdate: ; cca09 scf ret -; ccaaa -InitBattleAnimBuffer: ; ccaaa +InitBattleAnimBuffer: ld hl, BATTLEANIMSTRUCT_01 add hl, bc ld a, [hl] @@ -276,9 +274,8 @@ InitBattleAnimBuffer: ; ccaaa ld [wBattleAnimTempXOffset], a ret -; ccb31 -GetBattleAnimTileOffset: ; ccb31 (33:4b31) +GetBattleAnimTileOffset: push hl push bc ld hl, wBattleAnimTileDict @@ -301,14 +298,12 @@ GetBattleAnimTileOffset: ; ccb31 (33:4b31) pop hl ret -_ExecuteBGEffects: ; ccb48 +_ExecuteBGEffects: callfar ExecuteBGEffects ret -; ccb4f -_QueueBGEffect: ; ccb4f (33:4b4f) +_QueueBGEffect: callfar QueueBGEffect ret -; ccb56 (33:4b56) diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm index e0eedec864a..d631ca72f6a 100644 --- a/engine/battle_anims/functions.asm +++ b/engine/battle_anims/functions.asm @@ -1,4 +1,4 @@ -DoBattleAnimFrame: ; ccfbe +DoBattleAnimFrame: ld hl, BATTLEANIMSTRUCT_FUNCTION add hl, bc ld e, [hl] @@ -10,7 +10,6 @@ DoBattleAnimFrame: ; ccfbe ld h, [hl] ld l, a jp hl -; ccfce .Jumptable: ; entries correspond to BATTLEANIMFUNC_* constants @@ -95,7 +94,7 @@ DoBattleAnimFrame: ; ccfbe dw BattleAnimFunction_4E ; 4e dw BattleAnimFunction_4F ; 4f -BattleAnimFunction_Null: ; cd06e (33:506e) +BattleAnimFunction_Null: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -105,13 +104,13 @@ BattleAnimFunction_Null: ; cd06e (33:506e) .zero ret -BattleAnimFunction_ThrowFromPlayerToEnemyAndDisappear: ; cd079 (33:5079) +BattleAnimFunction_ThrowFromPlayerToEnemyAndDisappear: call BattleAnimFunction_ThrowFromPlayerToEnemy ret c call DeinitBattleAnimation ret -BattleAnimFunction_ThrowFromPlayerToEnemy: ; cd081 (33:5081) +BattleAnimFunction_ThrowFromPlayerToEnemy: ; If x coord at $88 or beyond, abort. ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc @@ -143,7 +142,7 @@ BattleAnimFunction_ThrowFromPlayerToEnemy: ; cd081 (33:5081) scf ret -BattleAnimFunction_04: ; cd0a6 (33:50a6) +BattleAnimFunction_04: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -184,7 +183,7 @@ BattleAnimFunction_04: ; cd0a6 (33:50a6) ld [hl], a ret -BattleAnimFunction_03: ; cd0e3 (33:50e3) +BattleAnimFunction_03: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -230,7 +229,7 @@ BattleAnimFunction_03: ; cd0e3 (33:50e3) inc [hl] ret -BattleAnimFunction_01: ; cd12a (33:512a) +BattleAnimFunction_01: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -251,7 +250,7 @@ BattleAnimFunction_01: ; cd12a (33:512a) call Functionce70a ret -BattleAnimFunction_02: ; cd146 (33:5146) +BattleAnimFunction_02: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -267,7 +266,7 @@ BattleAnimFunction_02: ; cd146 (33:5146) call DeinitBattleAnimation ret -BattleAnimFunction_PokeBall: ; cd15c (33:515c) +BattleAnimFunction_PokeBall: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -384,7 +383,7 @@ BattleAnimFunction_PokeBall: ; cd15c (33:515c) call DeinitBattleAnimation ret -BattleAnimFunction_PokeBallBlocked: ; cd212 (33:5212) +BattleAnimFunction_PokeBallBlocked: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -424,7 +423,7 @@ BattleAnimFunction_PokeBallBlocked: ; cd212 (33:5212) call DeinitBattleAnimation ret -GetBallAnimPal: ; cd249 (33:5249) +GetBallAnimPal: ld hl, BallColors ld a, [rSVBK] push af @@ -449,11 +448,10 @@ GetBallAnimPal: ; cd249 (33:5249) add hl, bc ld [hl], a ret -; cd26c (33:526c) INCLUDE "data/battle_anims/ball_colors.asm" -BattleAnimFunction_10: ; cd284 (33:5284) +BattleAnimFunction_10: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -495,7 +493,7 @@ BattleAnimFunction_10: ; cd284 (33:5284) .four ret -BattleAnimFunction_07: ; cd2be (33:52be) +BattleAnimFunction_07: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -542,7 +540,7 @@ BattleAnimFunction_07: ; cd2be (33:52be) call DeinitBattleAnimation ret -BattleAnimFunction_08: ; cd306 (33:5306) +BattleAnimFunction_08: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -654,7 +652,7 @@ BattleAnimFunction_08: ; cd306 (33:5306) jr nz, .loop ret -BattleAnimFunction_09: ; cd3ae (33:53ae) +BattleAnimFunction_09: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -702,7 +700,7 @@ BattleAnimFunction_09: ; cd3ae (33:53ae) call DeinitBattleAnimation ret -BattleAnimFunction_0A: ; cd3f2 (33:53f2) +BattleAnimFunction_0A: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -798,7 +796,7 @@ BattleAnimFunction_0A: ; cd3f2 (33:53f2) .six ret -BattleAnimFunction_RazorLeaf: ; cd478 (33:5478) +BattleAnimFunction_RazorLeaf: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -945,7 +943,7 @@ BattleAnimFunction_RazorLeaf: ; cd478 (33:5478) call Functionce70a ret -Functioncd557: ; cd557 (33:5557) +Functioncd557: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -983,7 +981,7 @@ Functioncd557: ; cd557 (33:5557) ld de, -$100 ret -BattleAnimFunction_4E: ; cd58a (33:558a) +BattleAnimFunction_4E: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -1045,7 +1043,7 @@ BattleAnimFunction_4E: ; cd58a (33:558a) ld [hl], e ret -BattleAnimFunction_0C: ; cd5e9 (33:55e9) +BattleAnimFunction_0C: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -1129,7 +1127,7 @@ BattleAnimFunction_0C: ; cd5e9 (33:55e9) ld [hl], d ret -BattleAnimFunction_0D: ; cd66a (33:566a) +BattleAnimFunction_0D: call BattleAnim_AnonJumptable .anon_dw dw .zero @@ -1205,7 +1203,7 @@ BattleAnimFunction_0D: ; cd66a (33:566a) call DeinitBattleAnimation ret -asm_cd6da: ; cd6da (33:56da) +asm_cd6da: inc a inc a ld [hl], a @@ -1214,13 +1212,13 @@ asm_cd6da: ; cd6da (33:56da) ld [hLYOverrideStart], a ret -BattleAnimFunction_0E: ; cd6e3 (33:56e3) +BattleAnimFunction_0E: call BattleAnim_AnonJumptable .anon_dw dw Functioncd6ea dw Functioncd6f7 -Functioncd6ea: ; cd6ea (33:56ea) +Functioncd6ea: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -1228,7 +1226,7 @@ Functioncd6ea: ; cd6ea (33:56ea) add [hl] ; offset call ReinitBattleAnimFrameset -Functioncd6f7: ; cd6f7 (33:56f7) +Functioncd6f7: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -1251,7 +1249,7 @@ Functioncd6f7: ; cd6f7 (33:56f7) ld [hl], a ret -BattleAnimFunction_0F: ; cd71a (33:571a) +BattleAnimFunction_0F: call BattleAnim_AnonJumptable .anon_dw dw Functioncd725 @@ -1259,9 +1257,9 @@ BattleAnimFunction_0F: ; cd71a (33:571a) dw Functioncd763 dw Functioncd776 -Functioncd725: ; cd725 (33:5725) +Functioncd725: call BattleAnim_IncAnonJumptableIndex -Functioncd728: ; cd728 (33:5728) +Functioncd728: ld hl, BATTLEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] @@ -1295,7 +1293,7 @@ Functioncd728: ; cd728 (33:5728) ld a, [hl] and $1 ld [hl], a -Functioncd763: ; cd763 (33:5763) +Functioncd763: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -1308,10 +1306,10 @@ Functioncd763: ; cd763 (33:5763) call BattleAnim_IncAnonJumptableIndex ld a, BATTLEANIMFRAMESET_29 call ReinitBattleAnimFrameset -Functioncd776: ; cd776 (33:5776) +Functioncd776: ret -BattleAnimFunction_11: ; cd777 (33:5777) +BattleAnimFunction_11: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -1343,13 +1341,13 @@ BattleAnimFunction_11: ; cd777 (33:5777) ld [hl], a ret -BattleAnimFunction_14: ; cd7a4 (33:57a4) +BattleAnimFunction_14: call BattleAnim_AnonJumptable .anon_dw dw Functioncd7ab dw Functioncd7d2 -Functioncd7ab: ; cd7ab (33:57ab) +Functioncd7ab: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -1371,7 +1369,7 @@ Functioncd7ab: ; cd7ab (33:57ab) ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld [hl], $1 -Functioncd7d2: ; cd7d2 (33:57d2) +Functioncd7d2: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -1411,7 +1409,7 @@ Functioncd7d2: ; cd7d2 (33:57d2) dec [hl] ret -BattleAnimFunction_15: ; cd80c (33:580c) +BattleAnimFunction_15: call BattleAnim_AnonJumptable .anon_dw dw Functioncd81f @@ -1419,18 +1417,18 @@ BattleAnimFunction_15: ; cd80c (33:580c) dw Functioncd81f dw Functioncd820 -Functioncd817: ; cd817 (33:5817) +Functioncd817: call BattleAnim_IncAnonJumptableIndex ld a, BATTLEANIMFRAMESET_35 call ReinitBattleAnimFrameset -Functioncd81f: ; cd81f (33:581f) +Functioncd81f: ret -Functioncd820: ; cd820 (33:5820) +Functioncd820: call DeinitBattleAnimation ret -BattleAnimFunction_16: ; cd824 (33:5824) +BattleAnimFunction_16: call BattleAnim_AnonJumptable .anon_dw dw Functioncd835 @@ -1441,7 +1439,7 @@ BattleAnimFunction_16: ; cd824 (33:5824) dw Functioncd88f dw Functioncd893 -Functioncd835: ; cd835 (33:5835) +Functioncd835: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_FRAMESET_ID add hl, bc @@ -1468,7 +1466,7 @@ Functioncd835: ; cd835 (33:5835) ld a, [hl] and $7f ld [hl], a -Functioncd860: ; cd860 (33:5860) +Functioncd860: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -1499,17 +1497,17 @@ Functioncd860: ; cd860 (33:5860) ld a, [hl] and $1f ret nz -Functioncd88f: ; cd88f (33:588f) +Functioncd88f: call BattleAnim_IncAnonJumptableIndex ret -Functioncd893: ; cd893 (33:5893) +Functioncd893: ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX add hl, bc ld [hl], $1 ret -BattleAnimFunction_17: ; cd89a (33:589a) +BattleAnimFunction_17: call BattleAnim_AnonJumptable .anon_dw dw Functioncd8ab @@ -1520,7 +1518,7 @@ BattleAnimFunction_17: ; cd89a (33:589a) dw Functioncd8f5 dw Functioncd8f9 -Functioncd8ab: ; cd8ab (33:58ab) +Functioncd8ab: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -1542,7 +1540,7 @@ Functioncd8ab: ; cd8ab (33:58ab) and $7f ld [hl], a -Functioncd8cc: ; cd8cc (33:58cc) +Functioncd8cc: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -1570,30 +1568,30 @@ Functioncd8cc: ; cd8cc (33:58cc) and $1f ret nz -Functioncd8f5: ; cd8f5 (33:58f5) +Functioncd8f5: call BattleAnim_IncAnonJumptableIndex ret -Functioncd8f9: ; cd8f9 (33:58f9) +Functioncd8f9: ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX add hl, bc ld [hl], $1 ret -BattleAnimFunction_18: ; cd900 (33:5900) +BattleAnimFunction_18: call BattleAnim_AnonJumptable .anon_dw dw Functioncd907 dw Functioncd913 -Functioncd907: ; cd907 (33:5907) +Functioncd907: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld [hl], $28 inc hl ld [hl], $0 -Functioncd913: ; cd913 (33:5913) +Functioncd913: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -1637,7 +1635,7 @@ Functioncd913: ; cd913 (33:5913) call DeinitBattleAnimation ret -BattleAnimFunction_19: ; cd954 (33:5954) +BattleAnimFunction_19: call BattleAnim_AnonJumptable .anon_dw dw Functioncd961 @@ -1646,16 +1644,16 @@ BattleAnimFunction_19: ; cd954 (33:5954) dw Functioncd96a dw Functioncd97b -Functioncd961: ; cd961 (33:5961) +Functioncd961: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld [hl], $0 -Functioncd96a: ; cd96a (33:596a) +Functioncd96a: call Functioncd99a ret -Functioncd96e: ; cd96e (33:596e) +Functioncd96e: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -1664,7 +1662,7 @@ Functioncd96e: ; cd96e (33:596e) call BattleAnim_IncAnonJumptableIndex ret -Functioncd97b: ; cd97b (33:597b) +Functioncd97b: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -1673,7 +1671,7 @@ Functioncd97b: ; cd97b (33:597b) call DeinitBattleAnimation ret -asm_cd988: ; cd988 (33:5988) +asm_cd988: call Functioncd99a ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc @@ -1686,7 +1684,7 @@ asm_cd988: ; cd988 (33:5988) dec [hl] ret -Functioncd99a: ; cd99a (33:599a) +Functioncd99a: call Functioncd9f4 ld hl, BATTLEANIMSTRUCT_0F add hl, bc @@ -1746,7 +1744,7 @@ Functioncd99a: ; cd99a (33:599a) ld [hl], a ret -Functioncd9f4: ; cd9f4 (33:59f4) +Functioncd9f4: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld e, [hl] @@ -1756,12 +1754,10 @@ Functioncd9f4: ; cd9f4 (33:59f4) ld d, [hl] ret -; cda01 (33:5a01) -Unknown_cda01: ; cda01 +Unknown_cda01: db 8, 6, 5, 4, 5, 6, 8, 12, 16 -; cda0a -BattleAnimFunction_1C: ; cda0a (33:5a0a) +BattleAnimFunction_1C: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -1790,14 +1786,14 @@ BattleAnimFunction_1C: ; cda0a (33:5a0a) jr nz, .asm_cda2c ret -BattleAnimFunction_1F: ; cda31 (33:5a31) +BattleAnimFunction_1F: call BattleAnim_AnonJumptable .anon_dw dw Functioncda4c dw Functioncda3a dw Functioncda4c -Functioncda3a: ; cda3a (33:5a3a) +Functioncda3a: ld hl, BATTLEANIMSTRUCT_FRAMESET_ID add hl, bc ld a, [hl] @@ -1807,24 +1803,24 @@ Functioncda3a: ; cda3a (33:5a3a) ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld [hl], $8 -Functioncda4c: ; cda4c (33:5a4c) +Functioncda4c: ret -BattleAnimFunction_LeechSeed: ; cda4d (33:5a4d) +BattleAnimFunction_LeechSeed: call BattleAnim_AnonJumptable .anon_dw dw .zero dw .one dw .two dw .three -.zero: ; cda58 (33:5a58) +.zero: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld [hl], $40 ret -.one: ; cda62 (33:5a62) +.one: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -1840,7 +1836,7 @@ BattleAnimFunction_LeechSeed: ; cda4d (33:5a4d) call BattleAnim_IncAnonJumptableIndex ret -.two: ; cda7a (33:5a7a) +.two: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -1853,10 +1849,10 @@ BattleAnimFunction_LeechSeed: ; cda4d (33:5a4d) call BattleAnim_IncAnonJumptableIndex ld a, BATTLEANIMFRAMESET_58 call ReinitBattleAnimFrameset -.three: ; cda8c (33:5a8c) +.three: ret -Functioncda8d: ; cda8d (33:5a8d) +Functioncda8d: dec [hl] ld d, $20 call BattleAnim_Sine @@ -1904,21 +1900,21 @@ Functioncda8d: ; cda8d (33:5a8d) dec [hl] ret -BattleAnimFunction_3F: ; cdad6 (33:5ad6) +BattleAnimFunction_3F: call BattleAnim_AnonJumptable .anon_dw dw Functioncdadf dw Functioncdae9 dw Functioncdaf9 -Functioncdadf: ; cdadf (33:5adf) +Functioncdadf: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld [hl], $40 ret -Functioncdae9: ; cdae9 (33:5ae9) +Functioncdae9: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -1929,10 +1925,10 @@ Functioncdae9: ; cdae9 (33:5ae9) .asm_cdaf6 call BattleAnim_IncAnonJumptableIndex -Functioncdaf9: ; cdaf9 (33:5af9) +Functioncdaf9: ret -BattleAnimFunction_1A: ; cdafa (33:5afa) +BattleAnimFunction_1A: call BattleAnimFunction_03 ld hl, BATTLEANIMSTRUCT_0F add hl, bc @@ -1941,7 +1937,7 @@ BattleAnimFunction_1A: ; cdafa (33:5afa) ld [hl], a ret -BattleAnimFunction_1B: ; cdb06 (33:5b06) +BattleAnimFunction_1B: call BattleAnim_AnonJumptable .anon_dw dw Functioncdb13 @@ -1950,10 +1946,10 @@ BattleAnimFunction_1B: ; cdb06 (33:5b06) dw Functioncdb50 dw Functioncdb65 -Functioncdb13: ; cdb13 (33:5b13) +Functioncdb13: ret -Functioncdb14: ; cdb14 (33:5b14) +Functioncdb14: ld hl, BATTLEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] @@ -1969,7 +1965,7 @@ Functioncdb14: ; cdb14 (33:5b14) ld [hl], a ret -Functioncdb28: ; cdb28 (33:5b28) +Functioncdb28: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -1994,7 +1990,7 @@ Functioncdb28: ; cdb28 (33:5b28) dec [hl] ret -Functioncdb50: ; cdb50 (33:5b50) +Functioncdb50: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0F add hl, bc @@ -2005,7 +2001,7 @@ Functioncdb50: ; cdb50 (33:5b50) ld hl, BATTLEANIMSTRUCT_DURATION add hl, bc ld [hl], $80 -Functioncdb65: ; cdb65 (33:5b65) +Functioncdb65: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -2024,7 +2020,7 @@ Functioncdb65: ; cdb65 (33:5b65) ld [hl], a ret -BattleAnimFunction_1D: ; cdb80 (33:5b80) +BattleAnimFunction_1D: call BattleAnim_AnonJumptable .anon_dw dw Functioncdb9f @@ -2042,7 +2038,7 @@ BattleAnimFunction_1D: ; cdb80 (33:5b80) dw Functioncdc57 dw Functioncdc74 -Functioncdb9f: ; cdb9f (33:5b9f) +Functioncdb9f: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld [hl], $28 @@ -2056,7 +2052,7 @@ Functioncdb9f: ; cdb9f (33:5b9f) ld [hl], a ret -Functioncdbb3: ; cdbb3 (33:5bb3) +Functioncdbb3: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -2067,7 +2063,7 @@ Functioncdbb3: ; cdbb3 (33:5bb3) call Functioncdc75 ret -Functioncdbc1: ; cdbc1 (33:5bc1) +Functioncdbc1: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -2078,7 +2074,7 @@ Functioncdbc1: ; cdbc1 (33:5bc1) call Functioncdc75 ret -Functioncdbcf: ; cdbcf (33:5bcf) +Functioncdbcf: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -2097,7 +2093,7 @@ Functioncdbcf: ; cdbcf (33:5bcf) inc [hl] ret -Functioncdbeb: ; cdbeb (33:5beb) +Functioncdbeb: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -2110,7 +2106,7 @@ Functioncdbeb: ; cdbeb (33:5beb) ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX add hl, bc dec [hl] -asm_cdbfa: ; cdbfa (33:5bfa) +asm_cdbfa: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc inc [hl] @@ -2132,17 +2128,17 @@ asm_cdbfa: ; cdbfa (33:5bfa) ld [hl], e ret -Functioncdc1a: ; cdc1a (33:5c1a) +Functioncdc1a: call DeinitBattleAnimation ret -Functioncdc1e: ; cdc1e (33:5c1e) +Functioncdc1e: ld a, BATTLEANIMFRAMESET_4E call ReinitBattleAnimFrameset call BattleAnim_IncAnonJumptableIndex ret -Functioncdc27: ; cdc27 (33:5c27) +Functioncdc27: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2155,7 +2151,7 @@ Functioncdc27: ; cdc27 (33:5c27) ld [hl], a ret -Functioncdc39: ; cdc39 (33:5c39) +Functioncdc39: ld a, BATTLEANIMFRAMESET_50 call ReinitBattleAnimFrameset ld hl, BATTLEANIMSTRUCT_YOFFSET @@ -2164,7 +2160,7 @@ Functioncdc39: ; cdc39 (33:5c39) call BattleAnim_IncAnonJumptableIndex ret -Functioncdc48: ; cdc48 (33:5c48) +Functioncdc48: ld a, BATTLEANIMFRAMESET_4F call ReinitBattleAnimFrameset call BattleAnim_IncAnonJumptableIndex @@ -2173,7 +2169,7 @@ Functioncdc48: ; cdc48 (33:5c48) ld [hl], $40 ret -Functioncdc57: ; cdc57 (33:5c57) +Functioncdc57: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2192,10 +2188,10 @@ Functioncdc57: ; cdc57 (33:5c57) .asm_cdc71 call BattleAnim_IncAnonJumptableIndex -Functioncdc74: ; cdc74 (33:5c74) +Functioncdc74: ret -Functioncdc75: ; cdc75 (33:5c75) +Functioncdc75: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hli] @@ -2227,7 +2223,7 @@ Functioncdc75: ; cdc75 (33:5c75) call BattleAnim_IncAnonJumptableIndex ret -BattleAnimFunction_1E: ; cdca6 (33:5ca6) +BattleAnimFunction_1E: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -2249,13 +2245,13 @@ BattleAnimFunction_1E: ; cdca6 (33:5ca6) ld [hl], a ret -BattleAnimFunction_21: ; cdcc3 (33:5cc3) +BattleAnimFunction_21: call BattleAnim_AnonJumptable .anon_dw dw Functioncdcca dw Functioncdced -Functioncdcca: ; cdcca (33:5cca) +Functioncdcca: ld a, [hBattleTurn] and a jr z, .asm_cdcd9 @@ -2277,7 +2273,7 @@ Functioncdcca: ; cdcca (33:5cca) call ReinitBattleAnimFrameset ret -Functioncdced: ; cdced (33:5ced) +Functioncdced: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2291,7 +2287,7 @@ Functioncdced: ; cdced (33:5ced) call DeinitBattleAnimation ret -Functioncdcfe: ; cdcfe (33:5cfe) +Functioncdcfe: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -2324,13 +2320,13 @@ Functioncdcfe: ; cdcfe (33:5cfe) ld [hl], a ret -BattleAnimFunction_22: ; cdd2a (33:5d2a) +BattleAnimFunction_22: call BattleAnim_AnonJumptable .anon_dw dw Functioncdd31 dw Functioncdd4f -Functioncdd31: ; cdd31 (33:5d31) +Functioncdd31: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -2349,7 +2345,7 @@ Functioncdd31: ; cdd31 (33:5d31) call ReinitBattleAnimFrameset ret -Functioncdd4f: ; cdd4f (33:5d4f) +Functioncdd4f: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -2392,13 +2388,13 @@ Functioncdd4f: ; cdd4f (33:5d4f) inc [hl] ret -BattleAnimFunction_23: ; cdd90 (33:5d90) +BattleAnimFunction_23: call BattleAnim_AnonJumptable .anon_dw dw Functioncdd97 dw Functioncddbc -Functioncdd97: ; cdd97 (33:5d97) +Functioncdd97: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_FRAMESET_ID add hl, bc @@ -2420,7 +2416,7 @@ Functioncdd97: ; cdd97 (33:5d97) ld a, [hl] and $7f ld [hl], a -Functioncddbc: ; cddbc (33:5dbc) +Functioncddbc: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -2461,14 +2457,14 @@ Functioncddbc: ; cddbc (33:5dbc) call ReinitBattleAnimFrameset ret -BattleAnimFunction_24: ; cddf9 (33:5df9) +BattleAnimFunction_24: call BattleAnim_AnonJumptable .anon_dw dw Functioncde02 dw Functioncde20 dw Functioncde21 -Functioncde02: ; cde02 (33:5e02) +Functioncde02: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -2485,19 +2481,17 @@ Functioncde02: ; cde02 (33:5e02) ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld [hl], a -Functioncde20: ; cde20 (33:5e20) +Functioncde20: ret -Functioncde21: ; cde21 (33:5e21) +Functioncde21: call DeinitBattleAnimation ret -; cde25 (33:5e25) -Unknown_cde25: ; cde25 +Unknown_cde25: db $ec, $f8, $00 -; cde28 -BattleAnimFunction_25: ; cde28 (33:5e28) +BattleAnimFunction_25: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2526,7 +2520,7 @@ BattleAnimFunction_25: ; cde28 (33:5e28) ld [hl], e ret -BattleAnimFunction_26: ; cde54 (33:5e54) +BattleAnimFunction_26: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2542,13 +2536,13 @@ BattleAnimFunction_26: ; cde54 (33:5e54) inc [hl] ret -BattleAnimFunction_27: ; cde6b (33:5e6b) +BattleAnimFunction_27: call BattleAnim_AnonJumptable .anon_dw dw Functioncde72 dw Functioncde88 -Functioncde72: ; cde72 (33:5e72) +Functioncde72: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -2561,16 +2555,16 @@ Functioncde72: ; cde72 (33:5e72) .asm_cde83 add BATTLEANIMFRAMESET_6A call ReinitBattleAnimFrameset -Functioncde88: ; cde88 (33:5e88) +Functioncde88: ret -BattleAnimFunction_28: ; cde89 (33:5e89) +BattleAnimFunction_28: call BattleAnim_AnonJumptable .anon_dw dw Functioncde90 dw Functioncdebf -Functioncde90: ; cde90 (33:5e90) +Functioncde90: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0F add hl, bc @@ -2602,7 +2596,7 @@ Functioncde90: ; cde90 (33:5e90) call ReinitBattleAnimFrameset ret -Functioncdebf: ; cdebf (33:5ebf) +Functioncdebf: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2626,7 +2620,7 @@ Functioncdebf: ; cdebf (33:5ebf) ld [hl], a ret -BattleAnimFunction_SpiralDescent: ; cdedd (33:5edd) +BattleAnimFunction_SpiralDescent: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2667,7 +2661,7 @@ BattleAnimFunction_SpiralDescent: ; cdedd (33:5edd) call DeinitBattleAnimation ret -BattleAnimFunction_2D: ; cdf1b (33:5f1b) +BattleAnimFunction_2D: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2708,13 +2702,13 @@ BattleAnimFunction_2D: ; cdf1b (33:5f1b) call DeinitBattleAnimation ret -BattleAnimFunction_PoisonGas: ; cdf59 (33:5f59) +BattleAnimFunction_PoisonGas: call BattleAnim_AnonJumptable .anon_dw dw Functioncdf60 dw BattleAnimFunction_SpiralDescent -Functioncdf60: ; cdf60 (33:5f60) +Functioncdf60: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -2744,7 +2738,7 @@ Functioncdf60: ; cdf60 (33:5f60) call BattleAnim_IncAnonJumptableIndex ret -BattleAnimFunction_34: ; cdf8c (33:5f8c) +BattleAnimFunction_34: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -2786,7 +2780,7 @@ BattleAnimFunction_34: ; cdf8c (33:5f8c) call DeinitBattleAnimation ret -BattleAnimFunction_3C: ; cdfcb (33:5fcb) +BattleAnimFunction_3C: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -2829,14 +2823,14 @@ BattleAnimFunction_3C: ; cdfcb (33:5fcb) call DeinitBattleAnimation ret -BattleAnimFunction_35: ; ce00b (33:600b) +BattleAnimFunction_35: call BattleAnim_AnonJumptable .anon_dw dw Functionce014 dw Functionce023 dw Functionce05f -Functionce014: ; ce014 (33:6014) +Functionce014: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0F add hl, bc @@ -2844,7 +2838,7 @@ Functionce014: ; ce014 (33:6014) ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld [hl], $10 -Functionce023: ; ce023 (33:6023) +Functionce023: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -2883,18 +2877,18 @@ Functionce023: ; ce023 (33:6023) srl [hl] ret -Functionce05f: ; ce05f (33:605f) +Functionce05f: call DeinitBattleAnimation ret -BattleAnimFunction_Horn: ; ce063 (33:6063) +BattleAnimFunction_Horn: call BattleAnim_AnonJumptable .anon_dw dw .zero dw .one dw .two dw Functionce09e -.zero: ; ce06e (33:606e) +.zero: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -2909,7 +2903,7 @@ BattleAnimFunction_Horn: ; ce063 (33:6063) ld [hl], a ret -.one: ; ce083 (33:6083) +.one: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -2919,7 +2913,7 @@ BattleAnimFunction_Horn: ; ce063 (33:6063) call Functionce70a ret -.two: ; ce091 (33:6091) +.two: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -2928,7 +2922,7 @@ BattleAnimFunction_Horn: ; ce063 (33:6063) call DeinitBattleAnimation ret -Functionce09e: ; ce09e (33:609e) +Functionce09e: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -2953,14 +2947,14 @@ Functionce09e: ; ce09e (33:609e) ld [hl], a ret -BattleAnimFunction_2C: ; ce0c5 (33:60c5) +BattleAnimFunction_2C: call BattleAnim_AnonJumptable .anon_dw dw Functionce0ce dw Functionce0f8 dw Functionce0dd -Functionce0ce: ; ce0ce (33:60ce) +Functionce0ce: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -2971,7 +2965,7 @@ Functionce0ce: ; ce0ce (33:60ce) ld [hl], a ret -Functionce0dd: ; ce0dd (33:60dd) +Functionce0dd: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -2988,7 +2982,7 @@ Functionce0dd: ; ce0dd (33:60dd) ld a, [hl] sub $4 ld [hl], a -Functionce0f8: ; ce0f8 (33:60f8) +Functionce0f8: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -3004,13 +2998,13 @@ Functionce0f8: ; ce0f8 (33:60f8) call Functionce70a ret -BattleAnimFunction_2E: ; ce10e (33:610e) +BattleAnimFunction_2E: call BattleAnim_AnonJumptable .anon_dw dw Functionce115 dw Functionce12a -Functionce115: ; ce115 (33:6115) +Functionce115: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0F add hl, bc @@ -3022,7 +3016,7 @@ Functionce115: ; ce115 (33:6115) ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld [hl], a -Functionce12a: ; ce12a (33:612a) +Functionce12a: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hli] @@ -3055,7 +3049,7 @@ Functionce12a: ; ce12a (33:612a) srl [hl] ret -BattleAnimFunction_2F: ; ce15c (33:615c) +BattleAnimFunction_2F: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3114,7 +3108,7 @@ BattleAnimFunction_2F: ; ce15c (33:615c) call DeinitBattleAnimation ret -BattleAnimFunction_42: ; ce1b0 (33:61b0) +BattleAnimFunction_42: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3153,13 +3147,13 @@ BattleAnimFunction_42: ; ce1b0 (33:61b0) call DeinitBattleAnimation ret -BattleAnimFunction_30: ; ce1e7 (33:61e7) +BattleAnimFunction_30: call BattleAnim_AnonJumptable .anon_dw dw Functionce1ee dw Functionce1fb -Functionce1ee: ; ce1ee (33:61ee) +Functionce1ee: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_YCOORD add hl, bc @@ -3167,7 +3161,7 @@ Functionce1ee: ; ce1ee (33:61ee) ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld [hl], a -Functionce1fb: ; ce1fb (33:61fb) +Functionce1fb: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3193,13 +3187,13 @@ Functionce1fb: ; ce1fb (33:61fb) inc [hl] ret -BattleAnimFunction_31: ; ce226 (33:6226) +BattleAnimFunction_31: call BattleAnim_AnonJumptable .anon_dw dw Functionce22d dw Functionce254 -Functionce22d: ; ce22d (33:622d) +Functionce22d: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -3220,10 +3214,10 @@ Functionce22d: ; ce22d (33:622d) ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld [hl], $f -Functionce254: ; ce254 (33:6254) +Functionce254: ret -BattleAnimFunction_32: ; ce255 (33:6255) +BattleAnimFunction_32: call BattleAnim_AnonJumptable .anon_dw dw Functionce260 @@ -3231,7 +3225,7 @@ BattleAnimFunction_32: ; ce255 (33:6255) dw Functionce278 dw Functionce289 -Functionce260: ; ce260 (33:6260) +Functionce260: call BattleAnim_IncAnonJumptableIndex ld a, [hBattleTurn] and a @@ -3247,11 +3241,11 @@ Functionce260: ; ce260 (33:6260) ld [hl], a ret -Functionce274: ; ce274 (33:6274) +Functionce274: call Functionce29f ret -Functionce278: ; ce278 (33:6278) +Functionce278: call Functionce29f ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc @@ -3262,7 +3256,7 @@ Functionce278: ; ce278 (33:6278) call Functionce70a ret -Functionce289: ; ce289 (33:6289) +Functionce289: call Functionce29f ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc @@ -3277,7 +3271,7 @@ Functionce289: ; ce289 (33:6289) call DeinitBattleAnimation ret -Functionce29f: ; ce29f (33:629f) +Functionce29f: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -3303,14 +3297,12 @@ Functionce29f: ; ce29f (33:629f) ld [wOBP0], a ret -; ce2c4 (33:62c4) -Unknown_ce2c4: ; ce2c4 +Unknown_ce2c4: db $ff, $aa, $55, $aa -Unknown_ce2c8: ; ce2c8 +Unknown_ce2c8: db $ff, $ff, $00, $00 -; ce2cc -BattleAnimFunction_33: ; ce2cc (33:62cc) +BattleAnimFunction_33: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3340,14 +3332,14 @@ BattleAnimFunction_33: ; ce2cc (33:62cc) dec [hl] ret -BattleAnimFunction_36: ; ce2fd (33:62fd) +BattleAnimFunction_36: call BattleAnim_AnonJumptable .anon_dw dw Functionce306 dw Functionce330 dw Functionce34c -Functionce306: ; ce306 (33:6306) +Functionce306: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3376,7 +3368,7 @@ Functionce306: ; ce306 (33:6306) ld [hl], e ret -Functionce330: ; ce330 (33:6330) +Functionce330: ld hl, BATTLEANIMSTRUCT_10 add hl, bc ld a, [hl] @@ -3399,7 +3391,7 @@ Functionce330: ; ce330 (33:6330) ld [hl], a ret -Functionce34c: ; ce34c (33:634c) +Functionce34c: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -3413,13 +3405,13 @@ Functionce34c: ; ce34c (33:634c) call DeinitBattleAnimation ret -BattleAnimFunction_37: ; ce35f (33:635f) +BattleAnimFunction_37: call BattleAnim_AnonJumptable .anon_dw dw Functionce366 dw Functionce375 -Functionce366: ; ce366 (33:6366) +Functionce366: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -3427,7 +3419,7 @@ Functionce366: ; ce366 (33:6366) and $7f add BATTLEANIMFRAMESET_81 call ReinitBattleAnimFrameset -Functionce375: ; ce375 (33:6375) +Functionce375: ld hl, BATTLEANIMSTRUCT_0B add hl, bc bit 7, [hl] @@ -3443,21 +3435,21 @@ Functionce375: ; ce375 (33:6375) dec [hl] ret -BattleAnimFunction_38: ; ce389 (33:6389) +BattleAnimFunction_38: call BattleAnim_AnonJumptable .anon_dw dw Functionce392 dw Functionce39c dw Functionce3ae -Functionce392: ; ce392 (33:6392) +Functionce392: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld [hl], $c ret -Functionce39c: ; ce39c (33:639c) +Functionce39c: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -3470,13 +3462,13 @@ Functionce39c: ; ce39c (33:639c) call BattleAnim_IncAnonJumptableIndex ld a, BATTLEANIMFRAMESET_20 call ReinitBattleAnimFrameset -Functionce3ae: ; ce3ae (33:63ae) +Functionce3ae: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc dec [hl] ret -BattleAnimFunction_39: ; ce3b4 (33:63b4) +BattleAnimFunction_39: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -3496,7 +3488,7 @@ BattleAnimFunction_39: ; ce3b4 (33:63b4) ld [hl], a ret -BattleAnimFunction_3A: ; ce3d2 (33:63d2) +BattleAnimFunction_3A: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3526,13 +3518,13 @@ BattleAnimFunction_3A: ; ce3d2 (33:63d2) inc [hl] ret -BattleAnimFunction_3B: ; ce3ff (33:63ff) +BattleAnimFunction_3B: call BattleAnim_AnonJumptable .anon_dw dw Functionce406 dw Functionce412 -Functionce406: ; ce406 (33:6406) +Functionce406: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3542,11 +3534,11 @@ Functionce406: ; ce406 (33:6406) ld [hl], a ret -Functionce412: ; ce412 (33:6412) +Functionce412: call DeinitBattleAnimation ret -BattleAnimFunction_3D: ; ce416 (33:6416) +BattleAnimFunction_3D: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3570,14 +3562,14 @@ BattleAnimFunction_3D: ; ce416 (33:6416) inc [hl] ret -BattleAnimFunction_3E: ; ce43a (33:643a) +BattleAnimFunction_3E: call BattleAnim_AnonJumptable .anon_dw dw Functionce443 dw Functionce465 dw Functionce490 -Functionce443: ; ce443 (33:6443) +Functionce443: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0F add hl, bc @@ -3596,7 +3588,7 @@ Functionce443: ; ce443 (33:6443) and $f0 or $8 ld [hl], a -Functionce465: ; ce465 (33:6465) +Functionce465: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -3625,7 +3617,7 @@ Functionce465: ; ce465 (33:6465) .asm_ce48b ld [hl], $10 call BattleAnim_IncAnonJumptableIndex -Functionce490: ; ce490 (33:6490) +Functionce490: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -3635,20 +3627,20 @@ Functionce490: ; ce490 (33:6490) call DeinitBattleAnimation ret -BattleAnimFunction_40: ; ce49c (33:649c) +BattleAnimFunction_40: call BattleAnim_AnonJumptable .anon_dw dw Functionce4a3 dw Functionce4b0 -Functionce4a3: ; ce4a3 (33:64a3) +Functionce4a3: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, BATTLEANIMFRAMESET_24 add [hl] call ReinitBattleAnimFrameset -Functionce4b0: ; ce4b0 (33:64b0) +Functionce4b0: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3678,7 +3670,7 @@ Functionce4b0: ; ce4b0 (33:64b0) call DeinitBattleAnimation ret -BattleAnimFunction_41: ; ce4dc (33:64dc) +BattleAnimFunction_41: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3708,7 +3700,7 @@ BattleAnimFunction_41: ; ce4dc (33:64dc) srl [hl] ret -BattleAnimFunction_43: ; ce508 (33:6508) +BattleAnimFunction_43: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -3738,7 +3730,7 @@ BattleAnimFunction_43: ; ce508 (33:6508) call DeinitBattleAnimation ret -BattleAnimFunction_44: ; ce532 (33:6532) +BattleAnimFunction_44: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld e, [hl] @@ -3767,14 +3759,14 @@ BattleAnimFunction_44: ; ce532 (33:6532) ld [hl], a ret -BattleAnimFunction_45: ; ce55b (33:655b) +BattleAnimFunction_45: call BattleAnim_AnonJumptable .anon_dw dw Functionce564 dw Functionce56e dw Functionce577 -Functionce564: ; ce564 (33:6564) +Functionce564: ld d, $18 ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -3782,12 +3774,12 @@ Functionce564: ; ce564 (33:6564) inc [hl] jr asm_ce58f -Functionce56e: ; ce56e (33:656e) +Functionce56e: call BattleAnim_IncAnonJumptableIndex ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld [hl], $18 -Functionce577: ; ce577 (33:6577) +Functionce577: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -3805,17 +3797,17 @@ Functionce577: ; ce577 (33:6577) call DeinitBattleAnimation ret -asm_ce58f: ; ce58f (33:658f) +asm_ce58f: call Functionce6f1 ret -BattleAnimFunction_46: ; ce593 (33:6593) +BattleAnimFunction_46: call BattleAnim_AnonJumptable .anon_dw dw Functionce5b3 dw Functionce59a -Functionce59a: ; ce59a (33:659a) +Functionce59a: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -3833,10 +3825,10 @@ Functionce59a: ; ce59a (33:659a) .asm_ce5b0 call DeinitBattleAnimation -Functionce5b3: ; ce5b3 (33:65b3) +Functionce5b3: ret -BattleAnimFunction_47: ; ce5b4 (33:65b4) +BattleAnimFunction_47: ld d, $50 ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -3863,7 +3855,7 @@ BattleAnimFunction_47: ; ce5b4 (33:65b4) ld [hl], a ret -BattleAnimFunction_48: ; ce5dc (33:65dc) +BattleAnimFunction_48: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3879,7 +3871,7 @@ BattleAnimFunction_48: ; ce5dc (33:65dc) call DeinitBattleAnimation ret -BattleAnimFunction_49: ; ce5ee (33:65ee) +BattleAnimFunction_49: call BattleAnim_AnonJumptable .anon_dw dw Functionce5f9 @@ -3887,7 +3879,7 @@ BattleAnimFunction_49: ; ce5ee (33:65ee) dw Functionce622 dw Functionce618 -Functionce5f9: ; ce5f9 (33:65f9) +Functionce5f9: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3897,7 +3889,7 @@ Functionce5f9: ; ce5f9 (33:65f9) ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld [hl], $ec -Functionce60a: ; ce60a (33:660a) +Functionce60a: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3909,14 +3901,14 @@ Functionce60a: ; ce60a (33:660a) inc [hl] ret -Functionce618: ; ce618 (33:6618) +Functionce618: call DeinitBattleAnimation ret -asm_ce61c: ; ce61c (33:661c) +asm_ce61c: call BattleAnim_IncAnonJumptableIndex call BattleAnim_IncAnonJumptableIndex -Functionce622: ; ce622 (33:6622) +Functionce622: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3928,7 +3920,7 @@ Functionce622: ; ce622 (33:6622) dec [hl] ret -BattleAnimFunction_4A: ; ce62f (33:662f) +BattleAnimFunction_4A: call BattleAnim_AnonJumptable .anon_dw dw Functionce63a @@ -3936,7 +3928,7 @@ BattleAnimFunction_4A: ; ce62f (33:662f) dw Functionce65c dw Functionce672 -Functionce63a: ; ce63a (33:663a) +Functionce63a: ld hl, BATTLEANIMSTRUCT_0B add hl, bc ld a, [hl] @@ -3946,7 +3938,7 @@ Functionce63a: ; ce63a (33:663a) call BattleAnim_IncAnonJumptableIndex ret -Functionce648: ; ce648 (33:6648) +Functionce648: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3962,7 +3954,7 @@ Functionce648: ; ce648 (33:6648) inc [hl] ret -Functionce65c: ; ce65c (33:665c) +Functionce65c: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3979,7 +3971,7 @@ Functionce65c: ; ce65c (33:665c) ld [hl], a ret -Functionce672: ; ce672 (33:6672) +Functionce672: ld hl, BATTLEANIMSTRUCT_YOFFSET add hl, bc ld a, [hl] @@ -3996,7 +3988,7 @@ Functionce672: ; ce672 (33:6672) ld [hl], a ret -BattleAnimFunction_4B: ; ce688 (33:6688) +BattleAnimFunction_4B: ld hl, BATTLEANIMSTRUCT_XCOORD add hl, bc ld d, [hl] @@ -4027,7 +4019,7 @@ BattleAnimFunction_4B: ; ce688 (33:6688) ld [hl], e ret -BattleAnimFunction_4C: ; ce6b3 (33:66b3) +BattleAnimFunction_4C: ld d, $18 ld hl, BATTLEANIMSTRUCT_0B add hl, bc @@ -4036,7 +4028,7 @@ BattleAnimFunction_4C: ; ce6b3 (33:66b3) call Functionce6f1 ret -BattleAnimFunction_4F: ; ce6bf (33:66bf) +BattleAnimFunction_4F: ld d, $18 ld hl, BATTLEANIMSTRUCT_10 add hl, bc @@ -4049,7 +4041,7 @@ BattleAnimFunction_4F: ; ce6bf (33:66bf) call Functionce6f1 ret -BattleAnimFunction_4D: ; ce6d2 (33:66d2) +BattleAnimFunction_4D: ld hl, BATTLEANIMSTRUCT_0F add hl, bc ld a, [hl] @@ -4071,7 +4063,7 @@ BattleAnimFunction_4D: ; ce6d2 (33:66d2) call DeinitBattleAnimation ret -Functionce6f1: ; ce6f1 (33:66f1) +Functionce6f1: push af push de call BattleAnim_Sine @@ -4088,7 +4080,7 @@ Functionce6f1: ; ce6f1 (33:66f1) ld [hl], a ret -Functionce70a: ; ce70a (33:670a) +Functionce70a: and $f ld e, a ld hl, BATTLEANIMSTRUCT_XCOORD @@ -4104,7 +4096,7 @@ Functionce70a: ; ce70a (33:670a) jr nz, .asm_ce719 ret -BattleAnim_AnonJumptable: ; ce71e (33:671e) +BattleAnim_AnonJumptable: pop de ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX add hl, bc @@ -4117,49 +4109,45 @@ BattleAnim_AnonJumptable: ; ce71e (33:671e) ld l, a jp hl -BattleAnim_IncAnonJumptableIndex: ; ce72c (33:672c) +BattleAnim_IncAnonJumptableIndex: ld hl, BATTLEANIMSTRUCT_ANON_JT_INDEX add hl, bc inc [hl] ret -BattleAnim_Cosine: ; ce732 (33:6732) +BattleAnim_Cosine: ; a = d * cos(a * pi/32) add %010000 ; cos(x) = sin(x + pi/2) ; fallthrough -BattleAnim_Sine: ; ce734 (33:6734) +BattleAnim_Sine: ; a = d * sin(a * pi/32) calc_sine_wave BattleAnimSineWave -BattleAnim_Sine_e: ; ce765 (33:6765) +BattleAnim_Sine_e: ld a, e call BattleAnim_Sine ld e, a ret -BattleAnim_Cosine_e: ; ce76b (33:676b) +BattleAnim_Cosine_e: ld a, e call BattleAnim_Cosine ld e, a ret -; ce771 (33:6771) -BattleAnim_AbsSinePrecise: ; ce771 +BattleAnim_AbsSinePrecise: ld a, e call BattleAnim_Sine ld e, l ld d, h ret -; ce778 -BattleAnim_AbsCosinePrecise: ; ce778 +BattleAnim_AbsCosinePrecise: ld a, e call BattleAnim_Cosine ld e, l ld d, h ret -; ce77f -BattleAnimSineWave: ; ce77f +BattleAnimSineWave: sine_table 32 -; ce7bf diff --git a/engine/battle_anims/helpers.asm b/engine/battle_anims/helpers.asm index 0a00b65a44f..09eb3479fda 100644 --- a/engine/battle_anims/helpers.asm +++ b/engine/battle_anims/helpers.asm @@ -1,4 +1,4 @@ -ReinitBattleAnimFrameset: ; ce7bf (33:67bf) +ReinitBattleAnimFrameset: ld hl, BATTLEANIMSTRUCT_FRAMESET_ID add hl, bc ld [hl], a @@ -10,7 +10,7 @@ ReinitBattleAnimFrameset: ; ce7bf (33:67bf) ld [hl], -1 ret -GetBattleAnimFrame: ; ce7d1 +GetBattleAnimFrame: .loop ld hl, BATTLEANIMSTRUCT_DURATION add hl, bc @@ -72,9 +72,8 @@ GetBattleAnimFrame: ; ce7d1 ld [hl], a jr .loop -; ce823 -.GetPointer: ; ce823 +.GetPointer: ld hl, BATTLEANIMSTRUCT_FRAMESET_ID add hl, bc ld e, [hl] @@ -93,9 +92,8 @@ GetBattleAnimFrame: ; ce7d1 add hl, de ret -; ce83c -GetBattleAnimOAMPointer: ; ce83c +GetBattleAnimOAMPointer: ld l, a ld h, 0 ld de, BattleAnimOAMData @@ -104,9 +102,8 @@ GetBattleAnimOAMPointer: ; ce83c add hl, de ret -; ce846 -LoadBattleAnimObj: ; ce846 (33:6846) +LoadBattleAnimObj: push hl ld l, a ld h, 0 @@ -127,4 +124,3 @@ LoadBattleAnimObj: ; ce846 (33:6846) pop bc ret -; ce85e (33:685e) diff --git a/engine/battle_anims/pokeball_wobble.asm b/engine/battle_anims/pokeball_wobble.asm index d85240f0811..21f963f7ea4 100644 --- a/engine/battle_anims/pokeball_wobble.asm +++ b/engine/battle_anims/pokeball_wobble.asm @@ -1,4 +1,4 @@ -GetPokeBallWobble: ; f971 (3:7971) +GetPokeBallWobble: ; Returns whether a Poke Ball will wobble in the catch animation. ; Whether a Pokemon is caught is determined beforehand. diff --git a/engine/events/basement_key.asm b/engine/events/basement_key.asm index 879c86a34e5..64c172ac26c 100644 --- a/engine/events/basement_key.asm +++ b/engine/events/basement_key.asm @@ -1,4 +1,4 @@ -_BasementKey: ; 507b4 +_BasementKey: ; Are we even in the right map to use this? ld a, [wMapGroup] cp GROUP_GOLDENROD_UNDERGROUND @@ -26,7 +26,6 @@ _BasementKey: ; 507b4 ld a, FALSE ld [wItemEffectSucceeded], a ret -; 507e1 .BasementKeyScript: ; 0x507e1 closetext diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm index d75015d5b7f..e1aa177e9e0 100644 --- a/engine/events/battle_tower/battle_tower.asm +++ b/engine/events/battle_tower/battle_tower.asm @@ -1,17 +1,15 @@ -BattleTowerRoomMenu: ; 1700b0 +BattleTowerRoomMenu: ; special call InitBattleTowerChallengeRAM farcall _BattleTowerRoomMenu ret -; 1700ba -Function1700ba: ; 1700ba +Function1700ba: call InitBattleTowerChallengeRAM farcall Function11811a ret -; 1700c4 -Function1700c4: ; 1700c4 +Function1700c4: ld a, [rSVBK] push af ld a, $3 @@ -51,16 +49,14 @@ Function1700c4: ; 1700c4 pop af ld [rSVBK], a ret -; 170114 -Function170114: ; 170114 +Function170114: call InitBattleTowerChallengeRAM call .Function170121 farcall Function11805f ret -; 170121 -.Function170121: ; 170121 +.Function170121: ld a, $5 call GetSRAMBank ld hl, $a948 @@ -70,9 +66,8 @@ Function170114: ; 170114 call CloseSRAM call Function170c8b ret -; 170139 -Function170139: ; 170139 +Function170139: ; Convert the 4-digit decimal number at 5:aa41 into binary ld a, $5 call GetSRAMBank @@ -167,9 +162,8 @@ Function170139: ; 170139 call CopyBytes call CloseSRAM ret -; 17020c -.DecToBin: ; 17020c +.DecToBin: ld a, [de] inc de and a @@ -180,29 +174,25 @@ Function170139: ; 170139 dec a jr nz, .digit_loop ret -; 170215 -BattleTowerBattle: ; 170215 +BattleTowerBattle: xor a ld [wBattleTowerBattleEnded], a call _BattleTowerBattle ret -; 17021d -DummySpecial_17021d: ; 17021d +DummySpecial_17021d: ret -; 17021e -InitBattleTowerChallengeRAM: ; 17021e +InitBattleTowerChallengeRAM: xor a ld [wBattleTowerBattleEnded], a ld [wNrOfBeatenBattleTowerTrainers], a ld [wcf65], a ld [wcf66], a ret -; 17022c -_BattleTowerBattle: ; 17022c +_BattleTowerBattle: .loop call .do_dw call DelayFrame @@ -210,9 +200,8 @@ _BattleTowerBattle: ; 17022c cp $1 jr nz, .loop ret -; 17023a -.do_dw ; 17023a +.do_dw ld a, [wBattleTowerBattleEnded] ld e, a ld d, 0 @@ -223,14 +212,12 @@ _BattleTowerBattle: ; 17022c ld h, [hl] ld l, a jp hl -; 170249 -.dw ; 170249 +.dw dw RunBattleTowerTrainer dw SkipBattleTowerTrainer -; 17024d -RunBattleTowerTrainer: ; 17024d +RunBattleTowerTrainer: ld a, [wOptions] push af ld hl, wOptions @@ -278,7 +265,7 @@ RunBattleTowerTrainer: ; 17024d ret -ReadBTTrainerParty: ; 1702b7 +ReadBTTrainerParty: ; Initialise the BattleTower-Trainer and his mon call CopyBTTrainer_FromBT_OT_TowBT_OTTemp @@ -394,9 +381,8 @@ ReadBTTrainerParty: ; 1702b7 ld a, -1 ld [bc], a ret -; 170394 -ValidateBTParty: ; 170394 +ValidateBTParty: ; Check for and fix errors in party data ld hl, wBT_OTTempMon1Species ld d, BATTLETOWER_PARTY_LENGTH @@ -501,13 +487,11 @@ endr dec d jp nz, .pkmn_loop ret -; 170426 -BT_ChrisName: ; 170426 +BT_ChrisName: db "CHRIS@" -; 17042c -Function17042c: ; 17042c +Function17042c: ld hl, w3_d202TrainerData ld a, BATTLETOWER_STREAK_LENGTH .loop @@ -568,12 +552,11 @@ Function17042c: ; 17042c dec a jr nz, .loop ret -; 170470 INCLUDE "data/battle_tower/unknown_levels.asm" -CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2 +CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; copy the BattleTower-Trainer data that lies at 'wBT_OTTrainer' to 'wBT_OTTemp' ld a, [rSVBK] push af @@ -595,11 +578,10 @@ CopyBTTrainer_FromBT_OT_TowBT_OTTemp: ; 1704a2 ld hl, sNrOfBeatenBattleTowerTrainers inc [hl] call CloseSRAM -SkipBattleTowerTrainer: ; 1704c9 +SkipBattleTowerTrainer: ret -; 1704ca -Unreferenced_Function1704ca: ; 1704ca +Unreferenced_Function1704ca: ld a, [$be46] cp $7 jr c, .asm_1704d3 @@ -617,18 +599,16 @@ Unreferenced_Function1704ca: ; 1704ca .asm_1704e0 ret -; 1704e1 -Function1704e1: ; 1704e1 +Function1704e1: call SpeechTextBox call FadeToMenu call InitBattleTowerChallengeRAM call .JumptableLoop call CloseSubmenu ret -; 1704f1 -.JumptableLoop: ; 1704f1 +.JumptableLoop: call ClearBGPalettes call ClearSprites call ClearScreen @@ -643,9 +623,8 @@ Function1704e1: ; 1704e1 .done ret -; 170510 -.DoJumptable: ; 170510 +.DoJumptable: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -656,15 +635,13 @@ Function1704e1: ; 1704e1 ld h, [hl] ld l, a jp hl -; 17051f -.dw ; 17051f +.dw dw .Jumptable_0 dw .Jumptable_1 dw .Jumptable_2 -; 170525 -.Jumptable_0: ; 170525 +.Jumptable_0: ld a, $5 call GetSRAMBank @@ -744,9 +721,8 @@ Function1704e1: ; 1704e1 ld hl, wJumptableIndex inc [hl] ret -; 1705b7 -.DrawBorder: ; 1705b7 +.DrawBorder: hlcoord 0, 4 ld a, "┌" ld [hli], a @@ -786,9 +762,8 @@ Function1704e1: ; 1704e1 dec c jr nz, .right_border_loop ret -; 1705f0 -.PlaceTextItems: ; 1705f0 +.PlaceTextItems: call .ClearBox call .PlaceUpDownArrows ld a, $50 @@ -855,9 +830,8 @@ Function1704e1: ; 1704e1 dec a jr nz, .loop1 ret -; 17064b -.ClearBox: ; 17064b +.ClearBox: hlcoord 1, 5 xor a ld b, 12 @@ -872,9 +846,8 @@ Function1704e1: ; 1704e1 dec b jr nz, .clearbox_row ret -; 17065d -.PlaceUpDownArrows: ; 17065d +.PlaceUpDownArrows: ld a, [wNrOfBeatenBattleTowerTrainers] and a jr z, .nope @@ -890,17 +863,14 @@ Function1704e1: ; 1704e1 ld a, "▼" ld [hl], a ret -; 170676 -.String_Mail: ; 170676 +.String_Mail: db "ルーム@" -; 17067a -.String_PastReaders: ; 17067a +.String_PastReaders: db "れきだいりーダーいちらん@" -; 170687 -BattleTowerAction: ; 170687 +BattleTowerAction: ld a, [wScriptVar] ld e, a ld d, 0 @@ -911,10 +881,9 @@ BattleTowerAction: ; 170687 ld h, [hl] ld l, a jp hl -; 170696 -.dw ; 170696 (5c:4696) +.dw dw BattleTowerAction_CheckExplanationRead ; 0x00 dw BattleTowerAction_SetExplanationRead ; 0x01 dw BattleTowerAction_GetChallengeState ; 0x02 @@ -950,7 +919,7 @@ BattleTowerAction: ; 170687 ; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes) -ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6) BattleTowerAction $1a +ResetBattleTowerTrainersSRAM: ; BattleTowerAction $1a ld a, BANK(sBTTrainers) call GetSRAMBank @@ -966,7 +935,7 @@ ResetBattleTowerTrainersSRAM: ; 1706d6 (5c:46d6) BattleTowerAction $1a ret -BattleTower_GiveReward: ; 1706ee (5c:46ee) BattleTowerAction $1b +BattleTower_GiveReward: ; BattleTowerAction $1b ld a, BANK(sBattleTowerReward) call GetSRAMBank @@ -995,7 +964,7 @@ BattleTower_GiveReward: ; 1706ee (5c:46ee) BattleTowerAction $1b ld [wScriptVar], a ret -Function17071b: ; 17071b (5c:471b) BattleTowerAction $1c +Function17071b: ; BattleTowerAction $1c ld a, BANK(sBattleTowerChallengeState) call GetSRAMBank ld a, BATTLETOWER_WON_CHALLENGE @@ -1003,7 +972,7 @@ Function17071b: ; 17071b (5c:471b) BattleTowerAction $1c call CloseSRAM ret -Function170729: ; 170729 (5c:4729) BattleTowerAction $1d +Function170729: ; BattleTowerAction $1d ld a, BANK(sBattleTowerChallengeState) call GetSRAMBank ld a, BATTLETOWER_RECEIVED_REWARD @@ -1011,11 +980,11 @@ Function170729: ; 170729 (5c:4729) BattleTowerAction $1d call CloseSRAM ret -BattleTower_SaveOptions: ; 170737 (5c:4737) BattleTowerAction $1f +BattleTower_SaveOptions: ; BattleTowerAction $1f farcall SaveOptions ret -BattleTower_RandomlyChooseReward: ; 17073e (5c:473e) BattleTowerAction $1e +BattleTower_RandomlyChooseReward: ; BattleTowerAction $1e ; Generate a random stat boosting item. .loop call Random @@ -1036,7 +1005,7 @@ BattleTower_RandomlyChooseReward: ; 17073e (5c:473e) BattleTowerAction $1e call CloseSRAM ret -BattleTowerAction_CheckExplanationRead: ; 17075f (5c:475f) BattleTowerAction $00 +BattleTowerAction_CheckExplanationRead: ; BattleTowerAction $00 call BattleTower_CheckSaveFileExistsAndIsYours ld a, [wScriptVar] and a @@ -1050,7 +1019,7 @@ BattleTowerAction_CheckExplanationRead: ; 17075f (5c:475f) BattleTowerAction $00 call CloseSRAM ret -BattleTowerAction_GetChallengeState: ; 170778 (5c:4778) BattleTowerAction $02 +BattleTowerAction_GetChallengeState: ; BattleTowerAction $02 ld hl, sBattleTowerChallengeState ld a, BANK(sBattleTowerChallengeState) call GetSRAMBank @@ -1059,7 +1028,7 @@ BattleTowerAction_GetChallengeState: ; 170778 (5c:4778) BattleTowerAction $02 call CloseSRAM ret -BattleTowerAction_SetExplanationRead: ; 170788 (5c:4788) BattleTowerAction $01 +BattleTowerAction_SetExplanationRead: ; BattleTowerAction $01 ld a, BANK(sBattleTowerSaveFileFlags) call GetSRAMBank ld a, [sBattleTowerSaveFileFlags] @@ -1068,13 +1037,13 @@ BattleTowerAction_SetExplanationRead: ; 170788 (5c:4788) BattleTowerAction $01 call CloseSRAM ret -BattleTowerAction_SetByteToQuickSaveChallenge: ; 170799 (5c:4799) BattleTowerAction $03 +BattleTowerAction_SetByteToQuickSaveChallenge: ; BattleTowerAction $03 ld c, BATTLETOWER_SAVED_AND_LEFT jr asm_17079f -BattleTowerAction_SetByteToCancelChallenge: ; 17079d (5c:479d) BattleTowerAction $04 +BattleTowerAction_SetByteToCancelChallenge: ; BattleTowerAction $04 ld c, BATTLETOWER_NO_CHALLENGE -asm_17079f: ; 17079f (5c:479f) +asm_17079f: ld a, BANK(sBattleTowerChallengeState) call GetSRAMBank ld a, c @@ -1082,7 +1051,7 @@ asm_17079f: ; 17079f (5c:479f) call CloseSRAM ret -Function1707ac: ; 1707ac (5c:47ac) BattleTowerAction $05 +Function1707ac: ; BattleTowerAction $05 ld a, $5 call GetSRAMBank ld a, [$aa8c] @@ -1123,7 +1092,7 @@ Function1707ac: ; 1707ac (5c:47ac) BattleTowerAction $05 ld a, $8 ld [wScriptVar], a -Function1707f4: ; 1707f4 (5c:47f4) BattleTowerAction $06 +Function1707f4: ; BattleTowerAction $06 ld a, $5 call GetSRAMBank xor a @@ -1133,7 +1102,7 @@ Function1707f4: ; 1707f4 (5c:47f4) BattleTowerAction $06 call CloseSRAM ret -Function170807: ; 170807 (5c:4807) BattleTowerAction $16 +Function170807: ; BattleTowerAction $16 call UpdateTime ld a, $5 call GetSRAMBank @@ -1144,7 +1113,7 @@ Function170807: ; 170807 (5c:4807) BattleTowerAction $16 call CloseSRAM ret -Function17081d: ; 17081d (5c:481d) BattleTowerAction $17 +Function17081d: ; BattleTowerAction $17 xor a ld [wScriptVar], a ld a, $5 @@ -1187,7 +1156,7 @@ Function17081d: ; 17081d (5c:481d) BattleTowerAction $17 call CloseSRAM ret -SaveBattleTowerLevelGroup: ; 170868 (5c:4868) BattleTowerAction $07 +SaveBattleTowerLevelGroup: ; BattleTowerAction $07 ld a, BANK(sBTChoiceOfLevelGroup) call GetSRAMBank ld a, [rSVBK] @@ -1201,7 +1170,7 @@ SaveBattleTowerLevelGroup: ; 170868 (5c:4868) BattleTowerAction $07 call CloseSRAM ret -LoadBattleTowerLevelGroup: ; 170881 (5c:4881) BattleTowerAction $08 ; Load level group choice +LoadBattleTowerLevelGroup: ; BattleTowerAction $08 ; Load level group choice ld a, BANK(sBTChoiceOfLevelGroup) call GetSRAMBank ld a, [rSVBK] @@ -1215,7 +1184,7 @@ LoadBattleTowerLevelGroup: ; 170881 (5c:4881) BattleTowerAction $08 ; Load level call CloseSRAM ret -BattleTower_CheckSaveFileExistsAndIsYours: ; 17089a BattleTowerAction $09 +BattleTower_CheckSaveFileExistsAndIsYours: ; BattleTowerAction $09 ld a, [wSaveFileExists] and a jr z, .nope @@ -1230,16 +1199,15 @@ BattleTower_CheckSaveFileExistsAndIsYours: ; 17089a BattleTowerAction $09 .nope ld [wScriptVar], a ret -; 1708b1 -Function1708b1: ; 1708b1 (5c:48b1) BattleTowerAction $0a +Function1708b1: ; BattleTowerAction $0a xor a ld [wMusicFade], a call MaxVolume ret -CheckMobileEventIndex: ; 1708b9 (5c:48b9) BattleTowerAction $0b something to do with GS Ball +CheckMobileEventIndex: ; BattleTowerAction $0b something to do with GS Ball ld a, BANK(sMobileEventIndex) call GetSRAMBank ld a, [sMobileEventIndex] @@ -1247,7 +1215,7 @@ CheckMobileEventIndex: ; 1708b9 (5c:48b9) BattleTowerAction $0b something to do call CloseSRAM ret -Function1708c8: ; 1708c8 (5c:48c8) BattleTowerAction $0c +Function1708c8: ; BattleTowerAction $0c call UpdateTime ld a, $5 call GetSRAMBank @@ -1266,7 +1234,7 @@ Function1708c8: ; 1708c8 (5c:48c8) BattleTowerAction $0c call CloseSRAM ret -Function1708f0: ; 1708f0 (5c:48f0) BattleTowerAction $0d +Function1708f0: ; BattleTowerAction $0d xor a ld [wScriptVar], a call UpdateTime @@ -1293,7 +1261,7 @@ Function1708f0: ; 1708f0 (5c:48f0) BattleTowerAction $0d ret -Function170923: ; 170923 +Function170923: ld a, $5 call GetSRAMBank xor a @@ -1304,10 +1272,9 @@ Function170923: ; 170923 call ByteFill call CloseSRAM ret -; 17093c -BattleTowerAction_EggTicket: ; 17093c (5c:493c) BattleTowerAction $0e +BattleTowerAction_EggTicket: ; BattleTowerAction $0e xor a ld [wScriptVar], a ld a, EGG_TICKET @@ -1373,12 +1340,11 @@ endr dec c jr nz, .loop ret -; 1709a4 (5c:49a4) -String_MysteryJP: ; 1709a4 +String_MysteryJP: db "なぞナゾ@@" ; MYSTERY -Function1709aa: ; 1709aa (5c:49aa) BattleTowerAction $0f +Function1709aa: ; BattleTowerAction $0f ld a, [rSVBK] push af ld a, BANK(w3_d090) @@ -1389,7 +1355,7 @@ Function1709aa: ; 1709aa (5c:49aa) BattleTowerAction $0f ld [rSVBK], a ret -Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10 +Function1709bb: ; BattleTowerAction $10 xor a ld [wScriptVar], a ld a, $5 @@ -1415,29 +1381,26 @@ Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10 ld [$a800], a call CloseSRAM ret -; 1709e7 (5c:49e7) -.jumptable: ; 1709e7 +.jumptable: dw .NoAction dw .NoAction dw .DoAction1 dw .DoAction1 dw .Action4 dw .Action5 -; 1709f3 -.DoAction1: ; 1709f3 +.DoAction1: ld a, $5 call GetSRAMBank ld a, $1 ld [$a800], a call CloseSRAM -.NoAction: ; 170a00 +.NoAction: ret -; 170a01 -.Action4: ; 170a01 +.Action4: ld a, $5 call GetSRAMBank ld hl, $b023 @@ -1454,9 +1417,8 @@ Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10 ld a, $1 ld [wScriptVar], a ret -; 170a33 -.Action5: ; 170a33 +.Action5: ld a, $0 call GetSRAMBank ld hl, wRTC @@ -1516,15 +1478,14 @@ Function1709bb: ; 1709bb (5c:49bb) BattleTowerAction $10 .no_scene_2 ret -; 170a9c -Function170a9c: ; 170a9c (5c:4a9c) BattleTowerAction $11 +Function170a9c: ; BattleTowerAction $11 ld c, FALSE jr asm_170aa2 -Function170aa0: ; 170aa0 (5c:4aa0) BattleTowerAction $12 +Function170aa0: ; BattleTowerAction $12 ld c, TRUE -asm_170aa2: ; 170aa2 (5c:4aa2) +asm_170aa2: ld a, $5 call GetSRAMBank ld a, c @@ -1532,7 +1493,7 @@ asm_170aa2: ; 170aa2 (5c:4aa2) call CloseSRAM ret -Function170aaf: ; 170aaf (5c:4aaf) BattleTowerAction $13 +Function170aaf: ; BattleTowerAction $13 ld a, $5 call GetSRAMBank ld a, [$aa8d] @@ -1540,7 +1501,7 @@ Function170aaf: ; 170aaf (5c:4aaf) BattleTowerAction $13 call CloseSRAM ret -Function170abe: ; 170abe (5c:4abe) BattleTowerAction $14 +Function170abe: ; BattleTowerAction $14 call BattleTower_CheckSaveFileExistsAndIsYours ld a, [wScriptVar] and a @@ -1554,7 +1515,7 @@ Function170abe: ; 170abe (5c:4abe) BattleTowerAction $14 call CloseSRAM ret -Function170ad7: ; 170ad7 (5c:4ad7) BattleTowerAction $15 +Function170ad7: ; BattleTowerAction $15 ld a, BANK(sBattleTowerSaveFileFlags) call GetSRAMBank ld a, [sBattleTowerSaveFileFlags] @@ -1563,7 +1524,7 @@ Function170ad7: ; 170ad7 (5c:4ad7) BattleTowerAction $15 call CloseSRAM ret -BattleTowerAction_LevelCheck: ; 170ae8 (5c:4ae8) BattleTowerAction $18 +BattleTowerAction_LevelCheck: ; BattleTowerAction $18 ld a, $5 call GetSRAMBank ld a, [$b2fb] @@ -1583,7 +1544,7 @@ BattleTowerAction_LevelCheck: ; 170ae8 (5c:4ae8) BattleTowerAction $18 ld [wScriptVar], a ret -BattleTowerAction_UbersCheck: ; 170b16 (5c:4b16) BattleTowerAction $19 +BattleTowerAction_UbersCheck: ; BattleTowerAction $19 ld a, $5 call GetSRAMBank ld a, [$b2fb] @@ -1646,15 +1607,13 @@ LoadOpponentTrainerAndPokemonWithOTSprite: ; 0x170b44 ld [hUsedSpriteTile], a farcall GetUsedSprite ret -; 170b90 INCLUDE "data/trainers/sprites.asm" -DummySpecial_170bd2: ; 170bd2 +DummySpecial_170bd2: ret -; 170bd3 -CheckForBattleTowerRules: ; 170bd3 +CheckForBattleTowerRules: farcall _CheckForBattleTowerRules jr c, .asm_170bde xor a ; FALSE @@ -1666,4 +1625,3 @@ CheckForBattleTowerRules: ; 170bd3 .asm_170be0 ld [wScriptVar], a ret -; 170be4 diff --git a/engine/events/battle_tower/get_trainer_class.asm b/engine/events/battle_tower/get_trainer_class.asm index 570104a2a5e..3b94b4d35b4 100644 --- a/engine/events/battle_tower/get_trainer_class.asm +++ b/engine/events/battle_tower/get_trainer_class.asm @@ -5,7 +5,7 @@ GetMobileOTTrainerClass: ; mobile function ld c, a ret -.GetMobileOTTrainerClass: ; 4e930 +.GetMobileOTTrainerClass: ld a, [hli] xor [hl] ld c, a diff --git a/engine/events/battle_tower/load_trainer.asm b/engine/events/battle_tower/load_trainer.asm index f3db162932c..3e6dead8ac5 100644 --- a/engine/events/battle_tower/load_trainer.asm +++ b/engine/events/battle_tower/load_trainer.asm @@ -1,4 +1,4 @@ -Function_LoadOpponentTrainerAndPokemons: ; 1f8000 +Function_LoadOpponentTrainerAndPokemons: ld a, [rSVBK] push af ld a, BANK(wBT_OTTrainer) @@ -92,7 +92,7 @@ endc ret -Function_LoadRandomBattleTowerMon: ; 1f8081 +Function_LoadRandomBattleTowerMon: ld c, BATTLETOWER_PARTY_LENGTH .loop push bc @@ -207,7 +207,6 @@ Function_LoadRandomBattleTowerMon: ; 1f8081 ld [sBTMonPrevTrainer3], a call CloseSRAM ret -; 1f814e INCLUDE "data/battle_tower/classes.asm" diff --git a/engine/events/battle_tower/rules.asm b/engine/events/battle_tower/rules.asm index 7ed51315f84..49b7b1af009 100644 --- a/engine/events/battle_tower/rules.asm +++ b/engine/events/battle_tower/rules.asm @@ -1,27 +1,24 @@ -CheckForMobileBattleRules: ; 8b1e1 +CheckForMobileBattleRules: ld de, .PointerTables call BattleTower_ExecuteJumptable ret z call BattleTower_PleaseReturnWhenReady scf ret -; 8b1ed -.PointerTables: ; 8b1ed +.PointerTables: db 2 dw .Functions dw .TextPointers -.Functions: ; 8b1f2 +.Functions: dw BattleTower_CheckPartyLengthIs3 dw BattleTower_CheckPartyHasThreeMonsThatAreNotEggs -; 8b1f6 -.TextPointers: ; 8b1f6 +.TextPointers: dw .ExcuseMeText dw JumpText_NeedAtLeastThreeMon dw JumpText_EggDoesNotQualify -; 8b1fc .ExcuseMeText: ; 0x8b1fc ; Excuse me! @@ -29,7 +26,7 @@ CheckForMobileBattleRules: ; 8b1e1 db "@" ; 0x8b201 -_CheckForBattleTowerRules: ; 8b201 +_CheckForBattleTowerRules: ld hl, wStringBuffer2 ld [hl], "3" inc hl @@ -40,27 +37,24 @@ _CheckForBattleTowerRules: ; 8b201 call BattleTower_PleaseReturnWhenReady scf ret -; 8b215 -.PointerTables: ; 8b215 +.PointerTables: db 4 dw .Functions dw .TextPointers -.Functions: ; 8b21a +.Functions: dw Function_PartyCountEq3 dw Function_PartySpeciesAreUnique dw Function_PartyItemsAreUnique dw Function_HasPartyAnEgg -; 8b222 -.TextPointers: ; 8b222 +.TextPointers: dw JumpText_ExcuseMeYoureNotReady dw JumpText_OnlyThreeMonMayBeEntered dw JumpText_TheMonMustAllBeDifferentKinds dw JumpText_TheMonMustNotHoldTheSameItems dw JumpText_YouCantTakeAnEgg -; 8b22c JumpText_ExcuseMeYoureNotReady: ; 0x8b22c ; Excuse me. You're not ready. @@ -68,11 +62,10 @@ JumpText_ExcuseMeYoureNotReady: ; 0x8b22c db "@" ; 0x8b231 -BattleTower_PleaseReturnWhenReady: ; 8b231 +BattleTower_PleaseReturnWhenReady: ld hl, .PleaseReturnWhenReady call PrintText ret -; 8b238 .PleaseReturnWhenReady: ; 0x8b238 ; Please return when you're ready. @@ -116,7 +109,7 @@ JumpText_YouCantTakeAnEgg: ; 0x8b256 db "@" ; 0x8b25b -BattleTower_ExecuteJumptable: ; 8b25b +BattleTower_ExecuteJumptable: ld bc, 0 .loop call .DoJumptableFunction @@ -126,9 +119,8 @@ BattleTower_ExecuteJumptable: ; 8b25b ld a, b and a ret -; 8b26c -.DoJumptableFunction: ; 8b26c +.DoJumptableFunction: push de push bc call .GetFunctionPointer @@ -137,16 +129,14 @@ BattleTower_ExecuteJumptable: ; 8b25b pop bc pop de ret -; 8b276 -.Next_CheckReachedEnd: ; 8b276 +.Next_CheckReachedEnd: inc c ld a, [de] cp c ret -; 8b27a -.GetFunctionPointer: ; 8b27a +.GetFunctionPointer: inc de ld a, [de] ld l, a @@ -154,9 +144,8 @@ BattleTower_ExecuteJumptable: ; 8b25b ld a, [de] ld h, a ret -; 8b281 -.GetTextPointers: ; 8b281 +.GetTextPointers: inc de inc de inc de @@ -166,16 +155,14 @@ BattleTower_ExecuteJumptable: ; 8b25b ld a, [de] ld h, a ret -; 8b28a -.LoadTextPointer: ; 8b28a +.LoadTextPointer: ld a, [hli] ld h, [hl] ld l, a ret -; 8b28e -.PrintFailureText: ; 8b28e +.PrintFailureText: push de push bc ld a, b @@ -186,18 +173,16 @@ BattleTower_ExecuteJumptable: ; 8b25b ld b, $1 pop de ret -; 8b29d -.PrintFirstText: ; 8b29d +.PrintFirstText: push de call .GetTextPointers call .LoadTextPointer call PrintText pop de ret -; 8b2a9 -.PrintNthText: ; 8b2a9 +.PrintNthText: push bc call .GetTextPointers inc hl @@ -209,15 +194,13 @@ BattleTower_ExecuteJumptable: ; 8b25b call PrintText pop bc ret -; 8b2bb -BattleTower_CheckPartyLengthIs3: ; 8b2bb +BattleTower_CheckPartyLengthIs3: ld a, [wPartyCount] cp BATTLETOWER_PARTY_LENGTH ret -; 8b2c1 -BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1 +BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ld hl, wPartyCount ld a, [hli] ld b, $0 @@ -237,23 +220,20 @@ BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1 ld a, b cp BATTLETOWER_PARTY_LENGTH ret -; 8b2da -Function_PartyCountEq3: ; 8b2da +Function_PartyCountEq3: ld a, [wPartyCount] cp BATTLETOWER_PARTY_LENGTH ret z scf ret -; 8b2e2 -Function_PartySpeciesAreUnique: ; 8b2e2 +Function_PartySpeciesAreUnique: ld hl, wPartyMon1Species call VerifyUniqueness ret -; 8b2e9 -VerifyUniqueness: ; 8b2e9 +VerifyUniqueness: ld de, wPartyCount ld a, [de] inc de @@ -296,18 +276,16 @@ VerifyUniqueness: ; 8b2e9 pop hl scf ret -; 8b31a -.nextmon ; 8b31a +.nextmon push bc ld bc, PARTYMON_STRUCT_LENGTH add hl, bc inc de pop bc ret -; 8b322 -.isegg ; 8b322 +.isegg push bc ld b, a ld a, [de] @@ -315,15 +293,13 @@ VerifyUniqueness: ; 8b2e9 ld a, b pop bc ret -; 8b32a -Function_PartyItemsAreUnique: ; 8b32a +Function_PartyItemsAreUnique: ld hl, wPartyMon1Item call VerifyUniqueness ret -; 8b331 -Function_HasPartyAnEgg: ; 8b331 +Function_HasPartyAnEgg: ld hl, wPartyCount ld a, [hli] ld c, a @@ -339,4 +315,3 @@ Function_HasPartyAnEgg: ; 8b331 .found scf ret -; 8b342 diff --git a/engine/events/battle_tower/trainer_text.asm b/engine/events/battle_tower/trainer_text.asm index c4bcedf64a7..968bd4366b7 100644 --- a/engine/events/battle_tower/trainer_text.asm +++ b/engine/events/battle_tower/trainer_text.asm @@ -1,4 +1,4 @@ -BattleTowerText:: ; 11c000 +BattleTowerText:: ; Print text c for trainer [wBT_OTTrainerClass] ; 1: Intro text ; 2: Player lost @@ -83,19 +83,18 @@ endc ld [rSVBK], a call PlaceHLTextAtBC ret -; 11c05d INCLUDE "mobile/fixed_words.asm" INCLUDE "data/trainers/genders.asm" -BTMaleTrainerTexts: ; 11f332 +BTMaleTrainerTexts: dw .Greetings dw .PlayerLost dw .PlayerWon -.Greetings: ; 11f338 +.Greetings: dw BTGreetingM1 dw BTGreetingM2 dw BTGreetingM3 @@ -122,7 +121,7 @@ BTMaleTrainerTexts: ; 11f332 dw BTGreetingM24 dw BTGreetingM25 -.PlayerLost: ; 11f36a +.PlayerLost: dw BTLossM1 dw BTLossM2 dw BTLossM3 @@ -149,7 +148,7 @@ BTMaleTrainerTexts: ; 11f332 dw BTLossM24 dw BTLossM25 -.PlayerWon: ; 11f39c +.PlayerWon: dw BTWinM1 dw BTWinM2 dw BTWinM3 @@ -182,7 +181,7 @@ BTFemaleTrainerTexts: dw .PlayerLost dw .PlayerWon -.Greetings: ; 11f3d4 +.Greetings: dw BTGreetingF1 dw BTGreetingF2 dw BTGreetingF3 @@ -199,7 +198,7 @@ BTFemaleTrainerTexts: dw BTGreetingF14 dw BTGreetingF15 -.PlayerLost: ; 11f3f2 +.PlayerLost: dw BTLossF1 dw BTLossF2 dw BTLossF3 @@ -216,7 +215,7 @@ BTFemaleTrainerTexts: dw BTLossF14 dw BTLossF15 -.PlayerWon: ; 11f410 +.PlayerWon: dw BTWinF1 dw BTWinF2 dw BTWinF3 diff --git a/engine/events/buena.asm b/engine/events/buena.asm index 533ce43efef..637fa086227 100644 --- a/engine/events/buena.asm +++ b/engine/events/buena.asm @@ -1,4 +1,4 @@ -BuenasPassword: ; 8af6b +BuenasPassword: xor a ld [wWhichIndexSet], a ld hl, .MenuHeader @@ -26,7 +26,6 @@ BuenasPassword: ; 8af6b ld a, b ld [wScriptVar], a ret -; 8afa9 .MenuHeader: ; 0x8afa9 db MENU_BACKUP_TILES ; flags @@ -44,7 +43,7 @@ BuenasPassword: ; 8af6b dw .PlacePasswordChoices ; 0x8afb4 -.PasswordIndices: ; 8afb8 +.PasswordIndices: db NUM_PASSWORDS_PER_CATEGORY x = 0 rept NUM_PASSWORDS_PER_CATEGORY @@ -53,7 +52,7 @@ x = x + 1 endr db -1 -.PlacePasswordChoices: ; 8afbd +.PlacePasswordChoices: push de ld a, [wBuenasPassword] and $f0 @@ -65,9 +64,8 @@ endr pop hl call PlaceString ret -; 8afd4 -BuenaPrize: ; 8afd4 +BuenaPrize: xor a ld [wMenuScrollPosition], a ld a, $1 @@ -149,7 +147,6 @@ BuenaPrize: ; 8afd4 call JoyWaitAorB call PlayClickSFX ret -; 8b072 .Text_AskWhichPrize: ; 0x8b072 ; Which prize would you like? @@ -186,19 +183,17 @@ BuenaPrize: ; 8afd4 db "@" ; 0x8b090 -Buena_DisplayBlueCardBalance: ; 8b090 +Buena_DisplayBlueCardBalance: ld hl, BlueCardBalanceMenuHeader call LoadMenuHeader ret -; 8b097 -PrintBlueCardBalance: ; 8b097 +PrintBlueCardBalance: ld de, wBlueCardBalance call .DrawBox ret -; 8b09e -.DrawBox: ; 8b09e +.DrawBox: push de xor a ld [hBGMapMode], a @@ -221,29 +216,24 @@ PrintBlueCardBalance: ; 8b097 lb bc, 1, 2 call PrintNum ret -; 8b0ca .Points_string: db "Points@" -; 8b0d1 BlueCardBalanceMenuHeader: ; 0x8b0d1 db MENU_BACKUP_TILES ; flags menu_coords 0, 11, 11, 13 -; 8b0d6 -Buena_PlacePrizeMenuBox: ; 8b0d6 +Buena_PlacePrizeMenuBox: ld hl, .MenuHeader call LoadMenuHeader ret -; 8b0dd .MenuHeader ; 0x8b0dd db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 17, TEXTBOX_Y - 1 -; 8b0e2 -Buena_PrizeMenu: ; 8b0e2 +Buena_PrizeMenu: ld hl, .MenuHeader call CopyMenuHeader ld a, [wMenuSelection] @@ -268,7 +258,6 @@ Buena_PrizeMenu: ; 8b0e2 .cancel xor a ret -; 8b113 .MenuHeader: ; 0x8b113 db MENU_BACKUP_TILES ; flags @@ -286,11 +275,10 @@ Buena_PrizeMenu: ; 8b0e2 dba .indices dba .prizeitem dba .prizepoints -; 8b129 NUM_BUENA_PRIZES EQU 9 ; ((BuenaPrizeItems.End - BuenaPrizeItems) / 2) -.indices ; 8b129 +.indices db NUM_BUENA_PRIZES x = 1 rept NUM_BUENA_PRIZES @@ -298,9 +286,8 @@ rept NUM_BUENA_PRIZES x = x + 1 endr db -1 -; 8b134 -.prizeitem ; 8b134 +.prizeitem ld a, [wMenuSelection] call Buena_getprize ld a, [hl] @@ -310,9 +297,8 @@ endr pop hl call PlaceString ret -; 8b147 -.prizepoints ; 8b147 +.prizepoints ld a, [wMenuSelection] call Buena_getprize inc hl @@ -321,9 +307,8 @@ endr add c ld [de], a ret -; 8b154 -Buena_getprize: ; 8b154 +Buena_getprize: dec a ld hl, BuenaPrizeItems ld b, 0 @@ -331,6 +316,5 @@ Buena_getprize: ; 8b154 add hl, bc add hl, bc ret -; 8b15e INCLUDE "data/items/buena_prizes.asm" diff --git a/engine/events/buena_menu.asm b/engine/events/buena_menu.asm index d55a6c9fa7c..e498a3ab8a5 100644 --- a/engine/events/buena_menu.asm +++ b/engine/events/buena_menu.asm @@ -1,4 +1,4 @@ -AskRememberPassword: ; 4ae12 +AskRememberPassword: call .DoMenu ld a, $0 jr c, .okay @@ -8,7 +8,7 @@ AskRememberPassword: ; 4ae12 ld [wScriptVar], a ret -.DoMenu: ; 4ae1f +.DoMenu: lb bc, 14, 7 push bc ld hl, YesNoMenuHeader @@ -42,7 +42,7 @@ AskRememberPassword: ; 4ae12 scf ret -Buena_ExitMenu: ; 4ae5e +Buena_ExitMenu: ld a, [hOAMUpdate] push af call ExitMenu diff --git a/engine/events/bug_contest/caught_mon.asm b/engine/events/bug_contest/caught_mon.asm index 4bad0182971..fcde2b70a57 100644 --- a/engine/events/bug_contest/caught_mon.asm +++ b/engine/events/bug_contest/caught_mon.asm @@ -1,4 +1,4 @@ -BugContest_SetCaughtContestMon: ; e6ce +BugContest_SetCaughtContestMon: ld a, [wContestMon] and a jr z, .firstcatch @@ -18,7 +18,7 @@ BugContest_SetCaughtContestMon: ; e6ce call PrintText ret -.generatestats ; e6fd +.generatestats ld a, [wTempEnemyMonSpecies] ld [wCurSpecies], a ld [wCurPartySpecies], a diff --git a/engine/events/bug_contest/contest.asm b/engine/events/bug_contest/contest.asm index c25da1658e9..e08a434e02e 100644 --- a/engine/events/bug_contest/contest.asm +++ b/engine/events/bug_contest/contest.asm @@ -1,4 +1,4 @@ -GiveParkBalls: ; 135db +GiveParkBalls: xor a ld [wContestMon], a ld a, 20 diff --git a/engine/events/bug_contest/contest_2.asm b/engine/events/bug_contest/contest_2.asm index 3e3b16b21e3..9cf70a03e86 100644 --- a/engine/events/bug_contest/contest_2.asm +++ b/engine/events/bug_contest/contest_2.asm @@ -1,4 +1,4 @@ -SelectRandomBugContestContestants: ; 139a8 +SelectRandomBugContestContestants: ; Select five random people to participate in the current contest. ; First we have to make sure that any old data is cleared away. @@ -54,9 +54,8 @@ SelectRandomBugContestContestants: ; 139a8 dec c jr nz, .loop2 ret -; 139ed -CheckBugContestContestantFlag: ; 139ed +CheckBugContestContestantFlag: ; Checks the flag of the Bug Catching Contestant whose index is loaded in a. ; Bug: If a >= NUM_BUG_CONTESTANTS when this is called, @@ -73,11 +72,10 @@ CheckBugContestContestantFlag: ; 139ed ld b, CHECK_FLAG call EventFlagAction ret -; 139fe INCLUDE "data/events/bug_contest_flags.asm" -ContestDropOffMons: ; 13a12 +ContestDropOffMons: ld hl, wPartyMon1HP ld a, [hli] or [hl] @@ -100,9 +98,8 @@ ContestDropOffMons: ; 13a12 ld a, $1 ld [wScriptVar], a ret -; 13a31 -ContestReturnMons: ; 13a31 +ContestReturnMons: ; Restore the species of the second mon. ld hl, wPartySpecies + 1 ld a, [wBugContestSecondPartySpecies] @@ -120,4 +117,3 @@ ContestReturnMons: ; 13a31 ld a, b ld [wPartyCount], a ret -; 13a47 diff --git a/engine/events/bug_contest/display_stats.asm b/engine/events/bug_contest/display_stats.asm index 9f6eb50d033..21380149b88 100644 --- a/engine/events/bug_contest/display_stats.asm +++ b/engine/events/bug_contest/display_stats.asm @@ -1,4 +1,4 @@ -DisplayCaughtContestMonStats: ; cc000 +DisplayCaughtContestMonStats: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -86,12 +86,12 @@ DisplayCaughtContestMonStats: ; cc000 .This: db " THIS @" -SwitchMonText: ; cc0c2 +SwitchMonText: ; Switch #MON? text_jump UnknownText_0x1c10cf db "@" -DisplayAlreadyCaughtText: ; cc0c7 +DisplayAlreadyCaughtText: call GetPokemonName ld hl, .AlreadyCaughtText jp PrintText @@ -103,5 +103,5 @@ DisplayAlreadyCaughtText: ; cc0c7 DummyPredef2F: DummyPredef38: -DummyPredef39: ; cc0d5 +DummyPredef39: ret diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm index a338e83ecc5..8a77f6ab738 100644 --- a/engine/events/bug_contest/judging.asm +++ b/engine/events/bug_contest/judging.asm @@ -1,4 +1,4 @@ -_BugContestJudging: ; 1369d +_BugContestJudging: call ContestScore farcall StubbedTrainerRankings_BugContestScore call BugContest_JudgeContestants @@ -24,7 +24,6 @@ _BugContestJudging: ; 1369d ld hl, BugContest_FirstPlaceText call PrintText jp BugContest_GetPlayersResult -; 136eb BugContest_FirstPlaceText: ; 0x136eb text_jump ContestJudging_FirstPlaceText @@ -34,7 +33,6 @@ BugContest_FirstPlaceText: ; 0x136eb call WaitSFX ld hl, BugContest_FirstPlaceScoreText ret -; 136fd BugContest_FirstPlaceScoreText: ; 0x136fd ; The winning score was @ points! @@ -51,7 +49,6 @@ BugContest_SecondPlaceText: ; 0x13702 call WaitSFX ld hl, BugContest_SecondPlaceScoreText ret -; 13714 BugContest_SecondPlaceScoreText: ; 0x13714 ; The score was @ points! @@ -68,7 +65,6 @@ BugContest_ThirdPlaceText: ; 0x13719 call WaitSFX ld hl, BugContest_ThirdPlaceScoreText ret -; 1372b BugContest_ThirdPlaceScoreText: ; 0x1372b ; The score was @ points! @@ -76,7 +72,7 @@ BugContest_ThirdPlaceScoreText: ; 0x1372b db "@" ; 0x13730 -LoadContestantName: ; 13730 +LoadContestantName: ; If a = 1, get your name. dec a ; BUG_CONTEST_PLAYER jr z, .player @@ -131,14 +127,12 @@ LoadContestantName: ; 13730 ld de, wBugContestWinnerName ld bc, NAME_LENGTH jp CopyBytes -; 13783 INCLUDE "data/events/bug_contest_winners.asm" -; 13807 -BugContest_GetPlayersResult: ; 13807 +BugContest_GetPlayersResult: ld hl, wBugContestThirdPlaceWinnerID ld de, - BUG_CONTESTANT_SIZE ld b, 3 ; 3rd, 2nd, or 1st @@ -152,9 +146,8 @@ BugContest_GetPlayersResult: ; 13807 .done ret -; 13819 -BugContest_JudgeContestants: ; 13819 +BugContest_JudgeContestants: call ClearContestResults call ComputeAIContestantScores ld hl, wBugContestTempWinnerID @@ -168,9 +161,8 @@ BugContest_JudgeContestants: ; 13819 ld [hl], a call DetermineContestWinners ret -; 13833 -ClearContestResults: ; 13833 +ClearContestResults: ld hl, wBugContestResults ld b, wBugContestWinnersEnd - wBugContestResults xor a @@ -179,9 +171,8 @@ ClearContestResults: ; 13833 dec b jr nz, .loop ret -; 1383e -DetermineContestWinners: ; 1383e +DetermineContestWinners: ld de, wBugContestTempScore ld hl, wBugContestFirstPlaceScore ld c, 2 @@ -224,9 +215,8 @@ DetermineContestWinners: ; 1383e .done ret -; 138a0 -CopyTempContestant: ; 138a0 +CopyTempContestant: ; Could've just called CopyBytes. ld de, wBugContestTempWinnerID rept BUG_CONTESTANT_SIZE + -1 @@ -238,9 +228,8 @@ endr inc de ld [hl], a ret -; 138b0 -ComputeAIContestantScores: ; 138b0 +ComputeAIContestantScores: ld e, 0 .loop push de @@ -298,9 +287,8 @@ ComputeAIContestantScores: ; 138b0 cp NUM_BUG_CONTESTANTS jr nz, .loop ret -; 13900 -ContestScore: ; 13900 +ContestScore: ; Determine the player's score in the Bug Catching Contest. xor a @@ -383,9 +371,8 @@ ContestScore: ; 13900 .done ret -; 1397f -.AddContestStat: ; 1397f +.AddContestStat: ld hl, hMultiplicand add [hl] ld [hl], a @@ -393,4 +380,3 @@ ContestScore: ; 13900 dec hl inc [hl] ret -; 13988 diff --git a/engine/events/card_key.asm b/engine/events/card_key.asm index f4f36e40219..6a2dda75d79 100644 --- a/engine/events/card_key.asm +++ b/engine/events/card_key.asm @@ -1,4 +1,4 @@ -_CardKey: ; 50779 +_CardKey: ; Are we even in the right map to use this? ld a, [wMapGroup] cp GROUP_RADIO_TOWER_3F @@ -31,7 +31,6 @@ _CardKey: ; 50779 ld a, FALSE ld [wItemEffectSucceeded], a ret -; 507af .CardKeyScript: ; 0x507af closetext diff --git a/engine/events/catch_tutorial.asm b/engine/events/catch_tutorial.asm index 6ae3b4a3b88..898fb826f1e 100644 --- a/engine/events/catch_tutorial.asm +++ b/engine/events/catch_tutorial.asm @@ -1,4 +1,4 @@ -CatchTutorial:: ; 4e554 +CatchTutorial:: ld a, [wBattleType] dec a ld c, a @@ -11,12 +11,12 @@ CatchTutorial:: ; 4e554 ld l, a jp hl -.dw ; 4e564 (13:6564) +.dw dw .DudeTutorial dw .DudeTutorial dw .DudeTutorial -.DudeTutorial: ; 4e56a (13:656a) +.DudeTutorial: ; Back up your name to your Mom's name. ld hl, wPlayerName ld de, wMomsName @@ -52,7 +52,7 @@ CatchTutorial:: ; 4e554 call CopyBytes ret -.LoadDudeData: ; 4e5b7 (13:65b7) +.LoadDudeData: ld hl, wDudeNumItems ld [hl], 1 inc hl @@ -68,14 +68,14 @@ CatchTutorial:: ; 4e554 ld hl, wDudeNumBalls ld a, 1 ld [hli], a - ld a, POKE_BALL ; 5 + ld a, POKE_BALL ld [hli], a ld [hli], a ld [hl], -1 ret -.Dude: ; 4e5da +.Dude: db "DUDE@" -.AutoInput: ; 4e5df +.AutoInput: db NO_INPUT, $ff ; end diff --git a/engine/events/catch_tutorial_input.asm b/engine/events/catch_tutorial_input.asm index 70f4f0ef7ab..cca2db2d5c0 100644 --- a/engine/events/catch_tutorial_input.asm +++ b/engine/events/catch_tutorial_input.asm @@ -1,35 +1,35 @@ -_DudeAutoInput_A:: ; 1de28a +_DudeAutoInput_A:: ld hl, DudeAutoInput_A jr _DudeAutoInput -_DudeAutoInput_RightA: ; 1de28f +_DudeAutoInput_RightA: ld hl, DudeAutoInput_RightA jr _DudeAutoInput -_DudeAutoInput_DownA: ; 1de294 +_DudeAutoInput_DownA: ld hl, DudeAutoInput_DownA jr _DudeAutoInput -_DudeAutoInput: ; 1de299 +_DudeAutoInput: ld a, BANK(DudeAutoInputs) call StartAutoInput ret DudeAutoInputs: ; used only for BANK(DudeAutoInputs) -DudeAutoInput_A: ; 1de29f +DudeAutoInput_A: db NO_INPUT, $50 db A_BUTTON, $00 db NO_INPUT, $ff ; end -DudeAutoInput_RightA: ; 1de2a5 +DudeAutoInput_RightA: db NO_INPUT, $08 db D_RIGHT, $00 db NO_INPUT, $08 db A_BUTTON, $00 db NO_INPUT, $ff ; end -DudeAutoInput_DownA: ; 1de2af +DudeAutoInput_DownA: db NO_INPUT, $fe db NO_INPUT, $fe db NO_INPUT, $fe diff --git a/engine/events/celebi.asm b/engine/events/celebi.asm index cb5d08d9556..c0f4fcf36e6 100644 --- a/engine/events/celebi.asm +++ b/engine/events/celebi.asm @@ -1,6 +1,6 @@ SPECIALCELEBIEVENT_CELEBI EQU $84 -CelebiShrineEvent: ; 4989a +CelebiShrineEvent: call DelayFrame ld a, [wVramState] push af @@ -49,9 +49,8 @@ CelebiShrineEvent: ; 4989a call CelebiEvent_SetBattleType ret -; 498f9 -.RestorePlayerSprite_DespawnLeaves: ; 498f9 +.RestorePlayerSprite_DespawnLeaves: ld hl, wVirtualOAMSprite00TileID xor a ld c, 4 @@ -69,9 +68,8 @@ endr call ByteFill ret -; 49912 -LoadCelebiGFX: ; 49912 +LoadCelebiGFX: farcall ClearSpriteAnims ld de, SpecialCelebiLeafGFX ld hl, vTiles1 @@ -85,9 +83,8 @@ LoadCelebiGFX: ; 49912 ld [wJumptableIndex], a ret -; 49935 -CelebiEvent_CountDown: ; 49935 +CelebiEvent_CountDown: ld hl, wFrameCounter ld a, [hl] and a @@ -101,9 +98,8 @@ CelebiEvent_CountDown: ; 49935 set 7, [hl] ret -; 49944 -CelebiEvent_SpawnLeaf: ; 49944 +CelebiEvent_SpawnLeaf: ; unused ld hl, wcf65 ld a, [hl] @@ -123,19 +119,18 @@ CelebiEvent_SpawnLeaf: ; 49944 ld [hl], $80 ret -; 49962 -SpecialCelebiLeafGFX: ; 49962 +SpecialCelebiLeafGFX: INCBIN "gfx/overworld/cut_grass.2bpp" -SpecialCelebiGFX: ; 499a2 +SpecialCelebiGFX: INCBIN "gfx/overworld/celebi/1.2bpp" INCBIN "gfx/overworld/celebi/2.2bpp" INCBIN "gfx/overworld/celebi/3.2bpp" INCBIN "gfx/overworld/celebi/4.2bpp" -UpdateCelebiPosition: ; 49aa2 (12:5aa2) +UpdateCelebiPosition: ld hl, SPRITEANIMSTRUCT_XOFFSET add hl, bc ld a, [hl] @@ -230,7 +225,7 @@ UpdateCelebiPosition: ; 49aa2 (12:5aa2) ret -.FreezeCelebiPosition: ; 49b30 (12:5b30) +.FreezeCelebiPosition: pop af ld hl, SPRITEANIMSTRUCT_FRAMESET_ID add hl, bc @@ -239,13 +234,12 @@ UpdateCelebiPosition: ; 49aa2 (12:5aa2) ret -CelebiEvent_Cosine: ; 49b3b (12:5b3b) +CelebiEvent_Cosine: ; a = d * cos(a * pi/32) add %010000 ; cos(x) = sin(x + pi/2) calc_sine_wave -; 49bae -GetCelebiSpriteTile: ; 49bae +GetCelebiSpriteTile: push hl push bc push de @@ -304,9 +298,8 @@ GetCelebiSpriteTile: ; 49bae pop hl ret -; 49bed -.AddE: ; 49bed +.AddE: push af ld a, d add e @@ -314,16 +307,14 @@ GetCelebiSpriteTile: ; 49bae pop af ret -; 49bf3 -CelebiEvent_SetBattleType: ; 49bf3 +CelebiEvent_SetBattleType: ld a, BATTLETYPE_CELEBI ld [wBattleType], a ret -; 49bf9 -CheckCaughtCelebi: ; 49bf9 +CheckCaughtCelebi: ld a, [wBattleResult] bit BATTLERESULT_CAUGHT_CELEBI, a jr z, .false @@ -339,4 +330,3 @@ CheckCaughtCelebi: ; 49bf9 .done ret -; 49c0c diff --git a/engine/events/checkforhiddenitems.asm b/engine/events/checkforhiddenitems.asm index 7396bd39a71..2af9a1a1f8d 100644 --- a/engine/events/checkforhiddenitems.asm +++ b/engine/events/checkforhiddenitems.asm @@ -1,4 +1,4 @@ -CheckForHiddenItems: ; b8172 +CheckForHiddenItems: ; Checks to see if there are hidden items on the screen that have not yet been found. If it finds one, returns carry. call GetMapScriptsBank ld [wBuffer1], a @@ -75,11 +75,9 @@ CheckForHiddenItems: ; b8172 pop hl scf ret -; b81e2 -.GetFarByte: ; b81e2 +.GetFarByte: ld a, [wBuffer1] call GetFarByte inc hl ret -; b81ea diff --git a/engine/events/checksave.asm b/engine/events/checksave.asm index 2280f0e53b2..1e9d18e71f8 100644 --- a/engine/events/checksave.asm +++ b/engine/events/checksave.asm @@ -1,4 +1,4 @@ -CheckSave:: ; 4cffe +CheckSave:: ld a, BANK(sCheckValue1) ; BANK(sCheckValue2) call GetSRAMBank ld a, [sCheckValue1] diff --git a/engine/events/checktime.asm b/engine/events/checktime.asm index 4c7d033ff51..6e470e88337 100644 --- a/engine/events/checktime.asm +++ b/engine/events/checktime.asm @@ -1,4 +1,4 @@ -CheckTime:: ; c000 +CheckTime:: ld a, [wTimeOfDay] ld hl, .TimeOfDayTable ld de, 2 @@ -11,7 +11,7 @@ CheckTime:: ; c000 ld c, a ret -.TimeOfDayTable: ; c012 +.TimeOfDayTable: db MORN_F, MORN db DAY_F, DAY db NITE_F, NITE diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm index 4b256da28f3..904a4b69834 100644 --- a/engine/events/daycare.asm +++ b/engine/events/daycare.asm @@ -21,7 +21,7 @@ const DAYCARETEXT_OH_FINE const DAYCARETEXT_COME_AGAIN -DayCareMan: ; 166d6 +DayCareMan: ld hl, wDayCareMan bit DAYCAREMAN_HAS_MON_F, [hl] jr nz, .AskWithdrawMon @@ -58,9 +58,8 @@ DayCareMan: ; 166d6 ld a, DAYCARETEXT_COME_AGAIN call PrintDayCareText ret -; 1672a -DayCareLady: ; 1672a +DayCareLady: ld hl, wDayCareLady bit DAYCARELADY_HAS_MON_F, [hl] jr nz, .AskWithdrawMon @@ -98,9 +97,8 @@ DayCareLady: ; 1672a ld a, DAYCARETEXT_COME_AGAIN call PrintDayCareText ret -; 16781 -DayCareLadyIntroText: ; 16781 +DayCareLadyIntroText: bit DAYCARELADY_ACTIVE_F, [hl] jr nz, .okay set DAYCARELADY_ACTIVE_F, [hl] @@ -109,16 +107,14 @@ DayCareLadyIntroText: ; 16781 call PrintDayCareText call YesNoBox ret -; 1678f -DayCareManIntroText: ; 1678f +DayCareManIntroText: set DAYCAREMAN_ACTIVE_F, [hl] call PrintDayCareText call YesNoBox ret -; 16798 -DayCareAskDepositPokemon: ; 16798 +DayCareAskDepositPokemon: ld a, [wPartyCount] cp 2 jr c, .OnlyOneMon @@ -169,7 +165,6 @@ DayCareAskDepositPokemon: ; 16798 ld a, DAYCARETEXT_REMOVE_MAIL scf ret -; 167f1 .DummyText: ; 0x167f1 ; @@ -177,7 +172,7 @@ DayCareAskDepositPokemon: ; 16798 db "@" ; 0x167f6 -DayCare_DepositPokemonText: ; 167f6 +DayCare_DepositPokemonText: ld a, DAYCARETEXT_DEPOSIT call PrintDayCareText ld a, [wCurPartySpecies] @@ -185,9 +180,8 @@ DayCare_DepositPokemonText: ; 167f6 ld a, DAYCARETEXT_COME_BACK_LATER call PrintDayCareText ret -; 16807 -DayCare_AskWithdrawBreedMon: ; 16807 +DayCare_AskWithdrawBreedMon: ld a, [wStringBuffer2 + 1] and a jr nz, .grew_at_least_one_level @@ -232,9 +226,8 @@ DayCare_AskWithdrawBreedMon: ; 16807 ld a, DAYCARETEXT_PARTY_FULL scf ret -; 16850 -DayCare_GetBackMonForMoney: ; 16850 +DayCare_GetBackMonForMoney: ld bc, wStringBuffer2 + 2 ld de, wMoney farcall TakeMoney @@ -245,9 +238,8 @@ DayCare_GetBackMonForMoney: ; 16850 ld a, DAYCARETEXT_GOT_BACK call PrintDayCareText ret -; 1686d -GetPriceToRetrieveBreedmon: ; 1686d +GetPriceToRetrieveBreedmon: ld a, b ld [wStringBuffer2], a ld a, d @@ -268,9 +260,8 @@ GetPriceToRetrieveBreedmon: ; 1686d ld a, l ld [wStringBuffer2 + 4], a ret -; 1689b -PrintDayCareText: ; 1689b +PrintDayCareText: ld e, a ld d, 0 ld hl, .TextTable @@ -281,9 +272,8 @@ PrintDayCareText: ; 1689b ld l, a call PrintText ret -; 168aa -.TextTable: ; 168aa +.TextTable: ; entries correspond to DAYCARETEXT_* constants dw .DayCareManIntro ; 00 dw .DayCareManOddEgg ; 01 @@ -305,7 +295,6 @@ PrintDayCareText: ; 1689b dw .NotEnoughMoney ; 11 dw .OhFineThen ; 12 dw .ComeAgain ; 13 -; 168d2 .DayCareManIntro: ; 0x168d2 ; I'm the DAY-CARE MAN. Want me to raise a #MON? @@ -427,7 +416,7 @@ PrintDayCareText: ; 1689b db "@" ; 0x16936 -DayCareManOutside: ; 16936 +DayCareManOutside: ld hl, wDayCareMan bit DAYCAREMAN_HAS_EGG_F, [hl] jr nz, .AskGiveEgg @@ -441,7 +430,7 @@ DayCareManOutside: ; 16936 db "@" ; 0x16949 -.AskGiveEgg: ; 16949 +.AskGiveEgg: ld hl, .IntroText call PrintText call YesNoBox @@ -477,7 +466,6 @@ DayCareManOutside: ; 16936 ld a, TRUE ld [wScriptVar], a ret -; 16993 .IntroText: ; 0x16993 ; Ah, it's you! We were raising your #MON, and my goodness, were we surprised! Your #MON had an EGG! We don't know how it got there, but your #MON had it. You want it? @@ -509,7 +497,7 @@ DayCareManOutside: ; 16936 db "@" ; 0x169ac -DayCare_GiveEgg: ; 169ac +DayCare_GiveEgg: ld a, [wEggMonLevel] ld [wCurPartyLevel], a ld hl, wPartyCount @@ -580,18 +568,16 @@ DayCare_GiveEgg: ; 169ac .PartyFull: scf ret -; 16a31 -DayCare_GetCurrentPartyMember: ; 16a31 +DayCare_GetCurrentPartyMember: ld a, [wPartyCount] dec a call AddNTimes ld d, h ld e, l ret -; 16a3b -DayCare_InitBreeding: ; 16a3b +DayCare_InitBreeding: ld a, [wDayCareLady] bit DAYCARELADY_HAS_MON_F, a ret z @@ -612,9 +598,8 @@ DayCare_InitBreeding: ; 16a3b jr c, .loop ld [wStepsToEgg], a jp .UselessJump -; 16a66 -.UselessJump: ; 16a66 +.UselessJump: xor a ld hl, wEggMon ld bc, wEggMonEnd - wEggMon @@ -788,8 +773,6 @@ DayCare_InitBreeding: ; 16a3b ld a, [wCurPartyLevel] ld [wEggMonLevel], a ret -; 16be0 -.String_EGG: ; 16be0 +.String_EGG: db "EGG@" -; 16be4 diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm index 5d0482cc4d4..aa4755e4f4e 100644 --- a/engine/events/diploma.asm +++ b/engine/events/diploma.asm @@ -1,10 +1,9 @@ -_Diploma: ; 1dd702 +_Diploma: call PlaceDiplomaOnScreen call WaitPressAorB_BlinkCursor ret -; 1dd709 -PlaceDiplomaOnScreen: ; 1dd709 +PlaceDiplomaOnScreen: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -35,7 +34,6 @@ PlaceDiplomaOnScreen: ; 1dd709 call SetPalettes call DelayFrame ret -; 1dd760 .Player: db "PLAYER@" @@ -50,9 +48,8 @@ PlaceDiplomaOnScreen: ; 1dd709 next "new #DEX." next "Congratulations!" db "@" -; 1dd7ae -PrintDiplomaPage2: ; 1dd7ae +PrintDiplomaPage2: hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, $7f @@ -77,17 +74,15 @@ PrintDiplomaPage2: ; 1dd7ae lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNum ret -; 1dd7f0 .PlayTime: db "PLAY TIME@" .GameFreak: db "GAME FREAK@" -; 1dd805 -DiplomaGFX: ; 1dd805 +DiplomaGFX: INCBIN "gfx/diploma/diploma.2bpp.lz" -DiplomaPage1Tilemap: ; 1ddc4b +DiplomaPage1Tilemap: INCBIN "gfx/diploma/page1.tilemap" -DiplomaPage2Tilemap: ; 1dddb3 +DiplomaPage2Tilemap: INCBIN "gfx/diploma/page2.tilemap" diff --git a/engine/events/dratini.asm b/engine/events/dratini.asm index 1019e302edc..7d8a224bafa 100644 --- a/engine/events/dratini.asm +++ b/engine/events/dratini.asm @@ -109,4 +109,3 @@ GiveDratini: ; 0x8b170 .EmptyParty: scf ret -; 8b1e1 diff --git a/engine/events/elevator.asm b/engine/events/elevator.asm index bcad170d474..377560071c0 100644 --- a/engine/events/elevator.asm +++ b/engine/events/elevator.asm @@ -1,4 +1,4 @@ -Elevator:: ; 1342d +Elevator:: call .LoadPointer call .FindCurrentFloor jr c, .quit @@ -15,9 +15,8 @@ Elevator:: ; 1342d .quit scf ret -; 1344a -.LoadPointer: ; 1344a +.LoadPointer: ld a, b ld [wElevatorPointerBank], a ld a, e @@ -26,9 +25,8 @@ Elevator:: ; 1342d ld [wElevatorPointer + 1], a call .LoadFloors ret -; 1345a -.LoadFloors: ; 1345a +.LoadFloors: ld de, wCurElevator ld bc, 4 ld hl, wElevatorPointer @@ -49,9 +47,8 @@ Elevator:: ; 1342d cp -1 jr nz, .loop ret -; 1347d -.FindCurrentFloor: ; 1347d +.FindCurrentFloor: ld hl, wElevatorPointer ld a, [hli] ld h, [hl] @@ -98,9 +95,8 @@ Elevator:: ; 1342d .fail scf ret -; 134c0 -Elevator_GoToFloor: ; 134c0 +Elevator_GoToFloor: push af ld hl, wElevatorPointer ld a, [hli] @@ -116,9 +112,8 @@ Elevator_GoToFloor: ; 134c0 ld bc, 3 call FarCopyBytes ret -; 134dd -Elevator_AskWhichFloor: ; 134dd +Elevator_AskWhichFloor: call LoadStandardMenuHeader ld hl, Elevator_WhichFloorText call PrintText @@ -141,7 +136,6 @@ Elevator_AskWhichFloor: ; 134dd .cancel scf ret -; 1350d Elevator_WhichFloorText: ; 0x1350d ; Which floor? @@ -150,7 +144,7 @@ Elevator_WhichFloorText: ; 0x1350d ; 0x13512 -Elevator_GetCurrentFloorText: ; 13512 +Elevator_GetCurrentFloorText: ld hl, wOptions ld a, [hl] push af @@ -167,14 +161,12 @@ Elevator_GetCurrentFloorText: ; 13512 pop af ld [wOptions], a ret -; 13537 -Elevator_CurrentFloorText: ; 13537 +Elevator_CurrentFloorText: db "Now on:@" -; 1353f -Elevator_GetCurrentFloorString: ; 1353f +Elevator_GetCurrentFloorString: push hl ld a, [wElevatorOriginFloor] ld e, a @@ -185,7 +177,6 @@ Elevator_GetCurrentFloorString: ; 1353f pop de call GetFloorString ret -; 13550 Elevator_MenuHeader: ; 0x13550 db MENU_BACKUP_TILES ; flags @@ -202,20 +193,18 @@ Elevator_MenuData: ; 0x13558 dba GetElevatorFloorStrings dba NULL dba NULL -; 13568 -GetElevatorFloorStrings: ; 13568 +GetElevatorFloorStrings: ld a, [wMenuSelection] -GetFloorString: ; 1356b +GetFloorString: push de call FloorToString ld d, h ld e, l pop hl jp PlaceString -; 13575 -FloorToString: ; 13575 +FloorToString: push de ld e, a ld d, 0 @@ -227,6 +216,5 @@ FloorToString: ; 13575 ld l, a pop de ret -; 13583 INCLUDE "data/events/elevator_floors.asm" diff --git a/engine/events/engine_flags.asm b/engine/events/engine_flags.asm index acda9ede73a..7c894587c24 100644 --- a/engine/events/engine_flags.asm +++ b/engine/events/engine_flags.asm @@ -1,4 +1,4 @@ -EngineFlagAction:: ; 80430 +EngineFlagAction:: ; Do action b on engine flag de ; ; b = 0: reset flag @@ -80,7 +80,6 @@ EngineFlagAction:: ; 80430 and c ld [de], a ret -; 80462 INCLUDE "data/engine_flags.asm" diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm index 2fc30d25c71..b8157fe3877 100644 --- a/engine/events/field_moves.asm +++ b/engine/events/field_moves.asm @@ -1,12 +1,11 @@ -PlayWhirlpoolSound: ; 8c7d4 +PlayWhirlpoolSound: call WaitSFX ld de, SFX_SURF call PlaySFX call WaitSFX ret -; 8c7e1 -BlindingFlash: ; 8c7e1 +BlindingFlash: farcall FadeOutPalettes ld hl, wStatusFlags set STATUSFLAGS_FLASH_F, [hl] @@ -17,9 +16,8 @@ BlindingFlash: ; 8c7e1 farcall LoadOW_BGPal7 farcall FadeInPalettes ret -; 8c80a -ShakeHeadbuttTree: ; 8c80a +ShakeHeadbuttTree: farcall ClearSpriteAnims ld de, CutGrassGFX ld hl, vTiles1 @@ -72,13 +70,11 @@ ShakeHeadbuttTree: ; 8c80a call Get1bpp call ReplaceKrisSprite ret -; 8c893 -HeadbuttTreeGFX: ; 8c893 +HeadbuttTreeGFX: INCBIN "gfx/overworld/headbutt_tree.2bpp" -; 8c913 -HideHeadbuttTree: ; 8c913 +HideHeadbuttTree: xor a ld [hBGMapMode], a ld a, [wPlayerDirection] @@ -103,16 +99,14 @@ HideHeadbuttTree: ; 8c913 xor a ld [hBGMapMode], a ret -; 8c938 -TreeRelativeLocationTable: ; 8c938 +TreeRelativeLocationTable: dwcoord 8, 8 + 2 ; RIGHT dwcoord 8, 8 - 2 ; LEFT dwcoord 8 - 2, 8 ; DOWN dwcoord 8 + 2, 8 ; UP -; 8c940 -OWCutAnimation: ; 8c940 +OWCutAnimation: ; Animation index in e ; 0: Split tree in half ; 1: Mow the lawn @@ -136,9 +130,8 @@ OWCutAnimation: ; 8c940 .finish ret -; 8c96d -.LoadCutGFX: ; 8c96d +.LoadCutGFX: callfar ClearSpriteAnims ; pointless to farcall ld de, CutGrassGFX ld hl, vTiles1 @@ -149,17 +142,14 @@ OWCutAnimation: ; 8c940 lb bc, BANK(CutTreeGFX), 4 call Request2bpp ret -; 8c98c -CutTreeGFX: ; c898c +CutTreeGFX: INCBIN "gfx/overworld/cut_tree.2bpp" -; c89cc -CutGrassGFX: ; 8c9cc +CutGrassGFX: INCBIN "gfx/overworld/cut_grass.2bpp" -; 8ca0c -OWCutJumptable: ; 8ca0c +OWCutJumptable: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -170,17 +160,16 @@ OWCutJumptable: ; 8ca0c ld h, [hl] ld l, a jp hl -; 8ca1b -.dw ; 8ca1b (23:4a1b) +.dw dw Cut_SpawnAnimateTree dw Cut_SpawnAnimateLeaves dw Cut_StartWaiting dw Cut_WaitAnimSFX -Cut_SpawnAnimateTree: ; 8ca23 (23:4a23) +Cut_SpawnAnimateTree: call Cut_Headbutt_GetPixelFacing ld a, SPRITE_ANIM_INDEX_CUT_TREE ; cut tree call _InitSpriteAnimStruct @@ -195,7 +184,7 @@ Cut_SpawnAnimateTree: ; 8ca23 (23:4a23) inc [hl] ret -Cut_SpawnAnimateLeaves: ; 8ca3c (23:4a3c) +Cut_SpawnAnimateLeaves: call Cut_GetLeafSpawnCoords xor a call Cut_SpawnLeaf @@ -212,14 +201,14 @@ Cut_SpawnAnimateLeaves: ; 8ca3c (23:4a3c) inc [hl] ret -Cut_StartWaiting: ; 8ca5c (23:4a5c) +Cut_StartWaiting: ld a, $1 ld [hBGMapMode], a ; Cut_WaitAnimSFX ld hl, wJumptableIndex inc [hl] -Cut_WaitAnimSFX: ; 8ca64 (23:4a64) +Cut_WaitAnimSFX: ld hl, wFrameCounter ld a, [hl] and a @@ -232,7 +221,7 @@ Cut_WaitAnimSFX: ; 8ca64 (23:4a64) set 7, [hl] ret -Cut_SpawnLeaf: ; 8ca73 (23:4a73) +Cut_SpawnLeaf: push de push af ld a, SPRITE_ANIM_INDEX_LEAF ; leaf @@ -250,7 +239,7 @@ Cut_SpawnLeaf: ; 8ca73 (23:4a73) pop de ret -Cut_GetLeafSpawnCoords: ; 8ca8e (23:4a8e) +Cut_GetLeafSpawnCoords: ld de, 0 ld a, [wMetatileStandingX] bit 0, a @@ -273,9 +262,8 @@ Cut_GetLeafSpawnCoords: ; 8ca8e (23:4a8e) inc hl ld d, [hl] ret -; 8cab3 (23:4ab3) -.Coords: ; 8cab3 +.Coords: dbpixel 11, 12 ; facing down, top left dbpixel 9, 12 ; facing down, top right dbpixel 11, 14 ; facing down, bottom left @@ -295,9 +283,8 @@ Cut_GetLeafSpawnCoords: ; 8ca8e (23:4a8e) dbpixel 13, 12 ; facing right, top right dbpixel 11, 10 ; facing right, bottom left dbpixel 13, 10 ; facing right, bottom right -; 8cad3 -Cut_Headbutt_GetPixelFacing: ; 8cad3 (23:4ad3) +Cut_Headbutt_GetPixelFacing: ld a, [wPlayerDirection] and %00001100 srl a @@ -309,17 +296,15 @@ Cut_Headbutt_GetPixelFacing: ; 8cad3 (23:4ad3) inc hl ld d, [hl] ret -; 8cae5 (23:4ae5) -.Coords: ; 8cae5 +.Coords: dbpixel 10, 13 dbpixel 10, 9 dbpixel 8, 11 dbpixel 12, 11 -; 8caed -FlyFromAnim: ; 8caed +FlyFromAnim: call DelayFrame ld a, [wVramState] push af @@ -352,9 +337,8 @@ FlyFromAnim: ; 8caed pop af ld [wVramState], a ret -; 8cb33 -FlyToAnim: ; 8cb33 +FlyToAnim: call DelayFrame ld a, [wVramState] push af @@ -392,7 +376,7 @@ FlyToAnim: ; 8cb33 call .RestorePlayerSprite_DespawnLeaves ret -.RestorePlayerSprite_DespawnLeaves: ; 8cb82 (23:4b82) +.RestorePlayerSprite_DespawnLeaves: ld hl, wVirtualOAMSprite00TileID xor a ld c, 4 @@ -410,7 +394,7 @@ endr call ByteFill ret -FlyFunction_InitGFX: ; 8cb9b (23:4b9b) +FlyFunction_InitGFX: callfar ClearSpriteAnims ld de, CutGrassGFX ld hl, vTiles1 tile $00 @@ -429,7 +413,7 @@ FlyFunction_InitGFX: ; 8cb9b (23:4b9b) ld [wJumptableIndex], a ret -FlyFunction_FrameTimer: ; 8cbc8 (23:4bc8) +FlyFunction_FrameTimer: call .SpawnLeaf ld hl, wFrameCounter ld a, [hl] @@ -449,7 +433,7 @@ FlyFunction_FrameTimer: ; 8cbc8 (23:4bc8) set 7, [hl] ret -.SpawnLeaf: ; 8cbe6 (23:4be6) +.SpawnLeaf: ld hl, wcf65 ld a, [hl] inc [hl] diff --git a/engine/events/fish.asm b/engine/events/fish.asm index 09de8f2b7ae..ec3e9a727d4 100644 --- a/engine/events/fish.asm +++ b/engine/events/fish.asm @@ -1,4 +1,4 @@ -Fish: ; 92402 +Fish: ; Using a fishing rod. ; Fish for monsters with rod e in encounter group d. ; Return monster e at level d. @@ -20,10 +20,9 @@ endr pop bc pop af ret -; 9241a -.Fish: ; 9241a +.Fish: ; Fish for monsters with rod b from encounter data in FishGroup at hl. ; Return monster e at level d. @@ -90,10 +89,9 @@ endr ld d, [hl] inc hl ret -; 9245b -GetFishGroupIndex: ; 9245b +GetFishGroupIndex: ; Return the index of fishgroup d in de. push hl @@ -127,7 +125,6 @@ GetFishGroupIndex: ; 9245b jr nz, .done ld d, FISHGROUP_REMORAID_SWARM jr .done -; 92488 INCLUDE "data/wild/fish.asm" diff --git a/engine/events/fishing_gfx.asm b/engine/events/fishing_gfx.asm index 3d3ab0ba059..25d1ee77aa1 100644 --- a/engine/events/fishing_gfx.asm +++ b/engine/events/fishing_gfx.asm @@ -1,4 +1,4 @@ -LoadFishingGFX: ; b84b3 +LoadFishingGFX: ld a, [rVBK] push af ld a, $1 @@ -23,9 +23,8 @@ LoadFishingGFX: ; b84b3 pop af ld [rVBK], a ret -; b84e3 -.LoadGFX: ; b84e3 +.LoadGFX: lb bc, BANK(FishingGFX), 2 push de call Get2bpp @@ -35,12 +34,9 @@ LoadFishingGFX: ; b84b3 ld d, h ld e, l ret -; b84f2 -FishingGFX: ; b84f2 +FishingGFX: INCBIN "gfx/overworld/chris_fish.2bpp" -; b8582 -KrisFishingGFX: ; b8582 +KrisFishingGFX: INCBIN "gfx/overworld/kris_fish.2bpp" -; b8612 diff --git a/engine/events/fruit_trees.asm b/engine/events/fruit_trees.asm index 47d7702b4fe..4e955147ac6 100644 --- a/engine/events/fruit_trees.asm +++ b/engine/events/fruit_trees.asm @@ -1,4 +1,4 @@ -FruitTreeScript:: ; 44000 +FruitTreeScript:: callasm GetCurTreeFruit opentext copybytetovar wCurFruit @@ -32,38 +32,33 @@ FruitTreeScript:: ; 44000 .end closetext end -; 44041 -GetCurTreeFruit: ; 44041 +GetCurTreeFruit: ld a, [wCurFruitTree] dec a call GetFruitTreeItem ld [wCurFruit], a ret -; 4404c -TryResetFruitTrees: ; 4404c +TryResetFruitTrees: ld hl, wDailyFlags bit DAILYFLAGS_ALL_FRUIT_TREES_F, [hl] ret nz jp ResetFruitTrees -; 44055 -CheckFruitTree: ; 44055 +CheckFruitTree: ld b, 2 call GetFruitTreeFlag ld a, c ld [wScriptVar], a ret -; 4405f -PickedFruitTree: ; 4405f +PickedFruitTree: farcall StubbedTrainerRankings_FruitPicked ld b, 1 jp GetFruitTreeFlag -; 4406a -ResetFruitTrees: ; 4406a +ResetFruitTrees: xor a ld hl, wFruitTreeFlags ld [hli], a @@ -73,9 +68,8 @@ ResetFruitTrees: ; 4406a ld hl, wDailyFlags set DAILYFLAGS_ALL_FRUIT_TREES_F, [hl] ret -; 44078 -GetFruitTreeFlag: ; 44078 +GetFruitTreeFlag: push hl push de ld a, [wCurFruitTree] @@ -87,9 +81,8 @@ GetFruitTreeFlag: ; 44078 pop de pop hl ret -; 4408a -GetFruitTreeItem: ; 4408a +GetFruitTreeItem: push hl push de ld e, a @@ -100,33 +93,27 @@ GetFruitTreeItem: ; 4408a pop de pop hl ret -; 44097 INCLUDE "data/items/fruit_trees.asm" -FruitBearingTreeText: ; 440b5 +FruitBearingTreeText: text_jump _FruitBearingTreeText db "@" -; 440ba -HeyItsFruitText: ; 440ba +HeyItsFruitText: text_jump _HeyItsFruitText db "@" -; 440bf -ObtainedFruitText: ; 440bf +ObtainedFruitText: text_jump _ObtainedFruitText db "@" -; 440c4 -FruitPackIsFullText: ; 440c4 +FruitPackIsFullText: text_jump _FruitPackIsFullText db "@" -; 440c9 -NothingHereText: ; 440c9 +NothingHereText: text_jump _NothingHereText db "@" -; 440ce diff --git a/engine/events/haircut.asm b/engine/events/haircut.asm index 0e44002350b..d5b0afe8b39 100644 --- a/engine/events/haircut.asm +++ b/engine/events/haircut.asm @@ -1,4 +1,4 @@ -BillsGrandfather: ; 73f7 +BillsGrandfather: farcall SelectMonFromParty jr c, .cancel ld a, [wCurPartySpecies] @@ -12,19 +12,19 @@ BillsGrandfather: ; 73f7 ld [wScriptVar], a ret -YoungerHaircutBrother: ; 7413 +YoungerHaircutBrother: ld hl, HappinessData_YoungerHaircutBrother jr HaircutOrGrooming -OlderHaircutBrother: ; 7418 +OlderHaircutBrother: ld hl, HappinessData_OlderHaircutBrother jr HaircutOrGrooming -DaisysGrooming: ; 741d +DaisysGrooming: ld hl, HappinessData_DaisysGrooming ; fallthrough -HaircutOrGrooming: ; 7420 +HaircutOrGrooming: push hl farcall SelectMonFromParty pop hl @@ -72,11 +72,11 @@ HaircutOrGrooming: ; 7420 INCLUDE "data/events/happiness_probabilities.asm" -CopyPokemonName_Buffer1_Buffer3: ; 746e +CopyPokemonName_Buffer1_Buffer3: ld hl, wStringBuffer1 ld de, wStringBuffer3 ld bc, MON_NAME_LENGTH jp CopyBytes -DummyPredef1: ; 747a +DummyPredef1: ret diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm index b6b547aae72..803fc800549 100644 --- a/engine/events/halloffame.asm +++ b/engine/events/halloffame.asm @@ -35,7 +35,7 @@ HallOfFame:: ; 0x8640e ret ; 0x86455 -RedCredits:: ; 86455 +RedCredits:: ld a, LOW(MUSIC_NONE) ld [wMusicFadeID], a ld a, HIGH(MUSIC_NONE) @@ -56,9 +56,8 @@ RedCredits:: ; 86455 ld b, a farcall Credits ret -; 8648e -HallOfFame_FadeOutMusic: ; 8648e +HallOfFame_FadeOutMusic: ld a, LOW(MUSIC_NONE) ld [wMusicFadeID], a ld a, HIGH(MUSIC_NONE) @@ -72,9 +71,8 @@ HallOfFame_FadeOutMusic: ; 8648e farcall InitDisplayForHallOfFame ld c, 100 jp DelayFrames -; 864b4 -HallOfFame_PlayMusicDE: ; 864b4 +HallOfFame_PlayMusicDE: push de ld de, MUSIC_NONE call PlayMusic @@ -82,9 +80,8 @@ HallOfFame_PlayMusicDE: ; 864b4 pop de call PlayMusic ret -; 864c3 -AnimateHallOfFame: ; 864c3 +AnimateHallOfFame: xor a ld [wJumptableIndex], a call LoadHOFTeam @@ -120,9 +117,8 @@ AnimateHallOfFame: ; 864c3 ld c, 8 call DelayFrames ret -; 8650c -.DisplayNewHallOfFamer: ; 8650c +.DisplayNewHallOfFamer: call DisplayHOFMon ld de, .String_NewHallOfFamer hlcoord 1, 2 @@ -135,14 +131,12 @@ AnimateHallOfFame: ; 864c3 call DelayFrames and a ret -; 8652c .String_NewHallOfFamer: db "New Hall of Famer!@" -; 8653f -GetHallOfFameParty: ; 8653f +GetHallOfFameParty: ld hl, wHallOfFamePokemonList ld bc, wHallOfFamePokemonListEnd - wHallOfFamePokemonList + 1 xor a @@ -227,9 +221,8 @@ GetHallOfFameParty: ; 8653f ld a, -1 ld [de], a ret -; 865b5 -AnimateHOFMonEntrance: ; 865b5 +AnimateHOFMonEntrance: push hl call ClearBGPalettes farcall ResetDisplayBetweenHallOfFameMons @@ -281,7 +274,6 @@ AnimateHOFMonEntrance: ; 865b5 ld [hSCY], a call HOF_SlideFrontpic ret -; 86635 HOF_SlideBackpic: .backpicloop @@ -292,7 +284,6 @@ HOF_SlideBackpic: ld [hSCX], a call DelayFrame jr .backpicloop -; 86643 HOF_SlideFrontpic: .frontpicloop @@ -304,9 +295,8 @@ HOF_SlideFrontpic: ld [hSCX], a call DelayFrame jr .frontpicloop -; 86650 -_HallOfFamePC: ; 86650 +_HallOfFamePC: call LoadFontsBattleExtra xor a ld [wJumptableIndex], a @@ -415,9 +405,8 @@ _HallOfFamePC: ; 86650 .TimeFamer: db " -Time Famer@" -; 8671c -LoadHOFTeam: ; 8671c +LoadHOFTeam: ld a, [wJumptableIndex] cp NUM_HOF_TEAMS jr nc, .invalid @@ -442,9 +431,8 @@ LoadHOFTeam: ; 8671c .invalid scf ret -; 86748 -DisplayHOFMon: ; 86748 +DisplayHOFMon: xor a ld [hBGMapMode], a ld a, [hli] @@ -529,9 +517,8 @@ DisplayHOFMon: ; 86748 lb bc, PRINTNUM_LEADINGZEROS | 2, 5 call PrintNum ret -; 86810 -HOF_AnimatePlayerPic: ; 86810 +HOF_AnimatePlayerPic: call ClearBGPalettes ld hl, vTiles2 tile HALLOFFAME_COLON ld de, FontExtra + 13 tiles ; "" @@ -614,9 +601,7 @@ HOF_AnimatePlayerPic: ; 86810 call WaitBGMap farcall ProfOaksPCRating ret -; 868ed .PlayTime: db "PLAY TIME@" -; 868f7 diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm index 998e7e07a64..d261caa3cc4 100644 --- a/engine/events/happiness_egg.asm +++ b/engine/events/happiness_egg.asm @@ -1,4 +1,4 @@ -GetFirstPokemonHappiness: ; 718d +GetFirstPokemonHappiness: ld hl, wPartyMon1Happiness ld bc, PARTYMON_STRUCT_LENGTH ld de, wPartySpecies @@ -17,7 +17,7 @@ GetFirstPokemonHappiness: ; 718d call GetPokemonName jp CopyPokemonName_Buffer1_Buffer3 -CheckFirstMonIsEgg: ; 71ac +CheckFirstMonIsEgg: ld a, [wPartySpecies] ld [wd265], a cp EGG @@ -30,7 +30,7 @@ CheckFirstMonIsEgg: ; 71ac call GetPokemonName jp CopyPokemonName_Buffer1_Buffer3 -ChangeHappiness: ; 71c2 +ChangeHappiness: ; Perform happiness action c on wCurPartyMon ld a, [wCurPartyMon] @@ -106,7 +106,7 @@ ChangeHappiness: ; 71c2 INCLUDE "data/events/happiness_changes.asm" -StepHappiness:: ; 725a +StepHappiness:: ; Raise the party's happiness by 1 point every other step cycle. ld hl, wHappinessStepCount @@ -142,7 +142,7 @@ StepHappiness:: ; 725a ret -DayCareStep:: ; 7282 +DayCareStep:: ; Raise the experience of Day-Care Pokémon every step cycle. ld a, [wDayCareMan] diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm index 955449280df..5598862895f 100644 --- a/engine/events/heal_machine_anim.asm +++ b/engine/events/heal_machine_anim.asm @@ -7,7 +7,7 @@ const HEALMACHINESTATE_HOFPLAYSFX const HEALMACHINESTATE_FINISH -HealMachineAnim: ; 12324 +HealMachineAnim: ; If you have no Pokemon, don't change the buffer. This can lead to some glitchy effects if you have no Pokemon. ld a, [wPartyCount] and a @@ -24,9 +24,8 @@ HealMachineAnim: ; 12324 ld a, [wBuffer2] call DmgToCgbObjPal1 ret -; 1233e -.DoJumptableFunctions: ; 1233e +.DoJumptableFunctions: xor a ld [wBuffer3], a .jumpable_loop @@ -53,14 +52,12 @@ HealMachineAnim: ; 12324 .finish ret -; 12365 -.Pointers: ; 12365 +.Pointers: ; entries correspond to HEALMACHINE_* constants dw .Pokecenter dw .ElmLab dw .HallOfFame -; 1236b healmachineanimseq: MACRO rept _NARG @@ -69,15 +66,14 @@ rept _NARG endr ENDM -.Pokecenter: ; 1236b +.Pokecenter: healmachineanimseq LOADGFX, PCLOADBALLS, PLAYMUSIC, FINISH -.ElmLab: ; 1236f +.ElmLab: healmachineanimseq LOADGFX, PCLOADBALLS, PLAYMUSIC, FINISH -.HallOfFame: ; 12373 +.HallOfFame: healmachineanimseq LOADGFX, HOFLOADBALLS, HOFPLAYSFX, FINISH -; 12377 -.Jumptable: ; 12377 +.Jumptable: ; entries correspond to HEALMACHINESTATE_* constants dw .LoadGFX dw .PC_LoadBallsOntoMachine @@ -85,29 +81,27 @@ ENDM dw .PlayHealMusic dw .HOF_PlaySFX dw .dummy_5 ; never encountered -; 12383 -.LoadGFX: ; 12383 +.LoadGFX: call .LoadPalettes ld de, .HealMachineGFX ld hl, vTiles0 tile $7c lb bc, BANK(.HealMachineGFX), 2 call Request2bpp ret -; 12393 -.PC_LoadBallsOntoMachine: ; 12393 +.PC_LoadBallsOntoMachine: ld hl, wVirtualOAMSprite32 ld de, .PC_ElmsLab_OAM call .PlaceHealingMachineTile call .PlaceHealingMachineTile jr .LoadBallsOntoMachine -.HOF_LoadBallsOntoMachine: ; 123a1 +.HOF_LoadBallsOntoMachine: ld hl, wVirtualOAMSprite32 ld de, .HOF_OAM -.LoadBallsOntoMachine: ; 123a7 +.LoadBallsOntoMachine: ld a, [wPartyCount] ld b, a .party_loop @@ -121,15 +115,13 @@ ENDM dec b jr nz, .party_loop ret -; 123bf -.PlayHealMusic: ; 123bf +.PlayHealMusic: ld de, MUSIC_HEAL call PlayMusic jp .FlashPalettes8Times -; 123c8 -.HOF_PlaySFX: ; 123c8 +.HOF_PlaySFX: ld de, SFX_GAME_FREAK_LOGO_GS call PlaySFX call .FlashPalettes8Times @@ -137,13 +129,11 @@ ENDM ld de, SFX_BOOT_PC call PlaySFX ret -; 123db -.dummy_5 ; 123db +.dummy_5 ret -; 123dc -.PC_ElmsLab_OAM: ; 123dc +.PC_ElmsLab_OAM: dsprite 4, 0, 4, 2, $7c, PAL_OW_TREE | OBP_NUM dsprite 4, 0, 4, 6, $7c, PAL_OW_TREE | OBP_NUM dsprite 4, 6, 4, 0, $7d, PAL_OW_TREE | OBP_NUM @@ -152,22 +142,19 @@ ENDM dsprite 5, 3, 5, 0, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP dsprite 6, 0, 4, 0, $7d, PAL_OW_TREE | OBP_NUM dsprite 6, 0, 5, 0, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP -; 123fc -.HealMachineGFX: ; 123fc +.HealMachineGFX: INCBIN "gfx/overworld/heal_machine.2bpp" -; 1241c -.HOF_OAM: ; 1241c +.HOF_OAM: dsprite 7, 4, 10, 1, $7d, PAL_OW_TREE | OBP_NUM dsprite 7, 4, 10, 6, $7d, PAL_OW_TREE | OBP_NUM dsprite 7, 3, 9, 5, $7d, PAL_OW_TREE | OBP_NUM dsprite 7, 3, 11, 2, $7d, PAL_OW_TREE | OBP_NUM dsprite 7, 1, 9, 1, $7d, PAL_OW_TREE | OBP_NUM dsprite 7, 1, 11, 5, $7d, PAL_OW_TREE | OBP_NUM -; 12434 -.LoadPalettes: ; 12434 +.LoadPalettes: call IsCGB jr nz, .cgb ld a, %11100000 @@ -183,13 +170,11 @@ INCBIN "gfx/overworld/heal_machine.2bpp" ld a, $1 ld [hCGBPalUpdate], a ret -; 12451 -.palettes ; 12451 +.palettes INCLUDE "gfx/overworld/heal_machine.pal" -; 12459 -.FlashPalettes8Times: ; 12459 +.FlashPalettes8Times: ld c, 8 .palette_loop push bc @@ -200,9 +185,8 @@ INCLUDE "gfx/overworld/heal_machine.pal" dec c jr nz, .palette_loop ret -; 12469 -.FlashPalettes: ; 12469 +.FlashPalettes: call IsCGB jr nz, .go ld a, [rOBP1] @@ -250,9 +234,8 @@ INCLUDE "gfx/overworld/heal_machine.pal" ld a, $1 ld [hCGBPalUpdate], a ret -; 124a3 -.PlaceHealingMachineTile: ; 124a3 +.PlaceHealingMachineTile: push bc ld a, [wBuffer1] bcpixel 2, 4 @@ -277,4 +260,3 @@ INCLUDE "gfx/overworld/heal_machine.pal" ld [hli], a ; attributes pop bc ret -; 124c1 diff --git a/engine/events/itemfinder.asm b/engine/events/itemfinder.asm index 71aaa5b697c..9727cdac98f 100644 --- a/engine/events/itemfinder.asm +++ b/engine/events/itemfinder.asm @@ -1,4 +1,4 @@ -ItemFinder: ; 12580 +ItemFinder: farcall CheckForHiddenItems jr c, .found_something ld hl, .Script_FoundNothing @@ -12,9 +12,8 @@ ItemFinder: ; 12580 ld a, $1 ld [wItemEffectSucceeded], a ret -; 12599 -.ItemfinderSound: ; 12599 +.ItemfinderSound: ld c, 4 .sfx_loop push bc @@ -26,7 +25,6 @@ ItemFinder: ; 12580 dec c jr nz, .sfx_loop ret -; 125ad .Script_FoundSomething: ; 0x125ad reloadmappart diff --git a/engine/events/kurt.asm b/engine/events/kurt.asm index 8fe78f5b6a6..a40702f9e72 100644 --- a/engine/events/kurt.asm +++ b/engine/events/kurt.asm @@ -1,8 +1,7 @@ -Kurt_PrintTextWhichApricorn: ; 88000 +Kurt_PrintTextWhichApricorn: ld hl, .Text call PrintText ret -; 88007 .Text: ; 0x88007 ; Which APRICORN should I use? @@ -10,11 +9,10 @@ Kurt_PrintTextWhichApricorn: ; 88000 db "@" ; 0x8800c -Kurt_PrintTextHowMany: ; 8800c +Kurt_PrintTextHowMany: ld hl, .Text call PrintText ret -; 88013 .Text: ; 0x88013 ; How many should I make? @@ -22,7 +20,7 @@ Kurt_PrintTextHowMany: ; 8800c db "@" ; 0x88018 -SelectApricornForKurt: ; 88018 +SelectApricornForKurt: call LoadStandardMenuHeader ld c, $1 xor a @@ -54,9 +52,8 @@ SelectApricornForKurt: ; 88018 .done call Call_ExitMenu ret -; 88055 -Kurt_SelectApricorn: ; 88055 +Kurt_SelectApricorn: farcall FindApricornsInBag jr c, .nope ld hl, .MenuHeader @@ -81,7 +78,6 @@ Kurt_SelectApricorn: ; 88055 .done ld c, a ret -; 88086 .MenuHeader: ; 0x88086 db MENU_BACKUP_TILES ; flags @@ -101,15 +97,14 @@ Kurt_SelectApricorn: ; 88055 dba .Quantity dba NULL -.Name: ; 8809f +.Name: ld a, [wMenuSelection] and a ret z farcall PlaceMenuItemName ret -; 880ab -.Quantity: ; 880ab +.Quantity: ld a, [wMenuSelection] ld [wCurItem], a call Kurt_GetQuantityOfApricorn @@ -118,9 +113,8 @@ Kurt_SelectApricorn: ; 88055 ld [wMenuSelectionQuantity], a farcall PlaceMenuItemQuantity ret -; 880c2 -Kurt_SelectQuantity: ; 880c2 +Kurt_SelectQuantity: ld a, [wCurItem] ld [wMenuSelection], a call Kurt_GetQuantityOfApricorn @@ -155,7 +149,6 @@ Kurt_SelectQuantity: ; 880c2 .done call CloseWindow ret -; 8810d .MenuHeader: ; 0x8810d db MENU_BACKUP_TILES ; flags @@ -164,7 +157,7 @@ Kurt_SelectQuantity: ; 880c2 db -1 ; default option db 0 -.PlaceApricornName: ; 88116 +.PlaceApricornName: call MenuBoxCoord2Tile ld de, SCREEN_WIDTH + 1 add hl, de @@ -172,9 +165,8 @@ Kurt_SelectQuantity: ; 880c2 ld e, l farcall PlaceMenuItemName ret -; 88126 -PlaceApricornQuantity: ; 88126 +PlaceApricornQuantity: call MenuBoxCoord2Tile ld de, 2 * SCREEN_WIDTH + 10 add hl, de @@ -183,9 +175,8 @@ PlaceApricornQuantity: ; 88126 ld de, wItemQuantityChangeBuffer lb bc, PRINTNUM_LEADINGZEROS | 1, 2 jp PrintNum -; 88139 -Kurt_GetQuantityOfApricorn: ; 88139 +Kurt_GetQuantityOfApricorn: push bc ld hl, wNumItems ld a, [wCurItem] @@ -216,9 +207,8 @@ Kurt_GetQuantityOfApricorn: ; 88139 and a pop bc ret -; 88161 -Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; 88161 +Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; Get the quantity of Apricorns of type [wCurItem] ; in the bag. Compatible with multiple stacks. @@ -352,9 +342,8 @@ Kurt_GiveUpSelectedQuantityOfSelectedApricorn: ; 88161 pop bc pop de ret -; 88201 -Kurt_GetAddressOfApricornQuantity: ; 88201 +Kurt_GetAddressOfApricornQuantity: push hl push bc ld hl, wNumItems @@ -368,9 +357,8 @@ Kurt_GetAddressOfApricornQuantity: ; 88201 pop bc pop hl ret -; 88211 -Kurt_GetRidOfItem: ; 88211 +Kurt_GetRidOfItem: push bc ld hl, wNumItems ld a, [wCurItemQuantity] @@ -409,4 +397,3 @@ Kurt_GetRidOfItem: ; 88211 ld [wItemQuantityChangeBuffer], a pop bc ret -; 88248 diff --git a/engine/events/kurt_selectquantity_interpretjoypad.asm b/engine/events/kurt_selectquantity_interpretjoypad.asm index 12a43e32566..44b71a113cc 100644 --- a/engine/events/kurt_selectquantity_interpretjoypad.asm +++ b/engine/events/kurt_selectquantity_interpretjoypad.asm @@ -1,4 +1,4 @@ -Kurt_SelectQuantity_InterpretJoypad: ; 27a28 +Kurt_SelectQuantity_InterpretJoypad: call BuySellToss_InterpretJoypad ld b, a ret diff --git a/engine/events/lucky_number.asm b/engine/events/lucky_number.asm index f482ce9d6f4..2dff44fcfa7 100644 --- a/engine/events/lucky_number.asm +++ b/engine/events/lucky_number.asm @@ -1,4 +1,4 @@ -CheckForLuckyNumberWinners: ; 4d87a +CheckForLuckyNumberWinners: xor a ld [wScriptVar], a ld [wFoundMatchingIDInParty], a @@ -118,7 +118,7 @@ CheckForLuckyNumberWinners: ; 4d87a .print jp PrintText -.CompareLuckyNumberToMonID: ; 4d939 +.CompareLuckyNumberToMonID: push bc push de push hl @@ -190,7 +190,7 @@ CheckForLuckyNumberWinners: ; 4d87a and a ret -.BoxBankAddresses: ; 4d99f +.BoxBankAddresses: dba sBox1 dba sBox2 dba sBox3 @@ -216,7 +216,7 @@ CheckForLuckyNumberWinners: ; 4d87a text_jump UnknownText_0x1c12ae db "@" -PrintTodaysLuckyNumber: ; 4d9d3 +PrintTodaysLuckyNumber: ld hl, wStringBuffer3 ld de, wLuckyIDNumber lb bc, PRINTNUM_LEADINGZEROS | 2, 5 diff --git a/engine/events/magikarp.asm b/engine/events/magikarp.asm index f5180a8e568..06f077b6280 100644 --- a/engine/events/magikarp.asm +++ b/engine/events/magikarp.asm @@ -1,4 +1,4 @@ -CheckMagikarpLength: ; fbb32 +CheckMagikarpLength: ; Returns 3 if you select a Magikarp that beats the previous record. ; Returns 2 if you select a Magikarp, but the current record is longer. ; Returns 1 if you press B in the Pokemon selection menu. @@ -70,7 +70,6 @@ CheckMagikarpLength: ; fbb32 xor a ; MAGIKARPLENGTH_NOT_MAGIKARP ld [wScriptVar], a ret -; fbba9 .MeasureItText: ; 0xfbba9 ; Let me measure that MAGIKARP. …Hm, it measures @ . @@ -78,19 +77,17 @@ CheckMagikarpLength: ; fbb32 db "@" ; 0xfbbae -Magikarp_LoadFeetInchesChars: ; fbbae +Magikarp_LoadFeetInchesChars: ld hl, vTiles2 tile "′" ; $6e ld de, .feetinchchars lb bc, BANK(.feetinchchars), 2 call Request2bpp ret -; fbbbb -.feetinchchars ; fbbb +.feetinchchars INCBIN "gfx/font/feet_inches.2bpp" -; fbbdb -PrintMagikarpLength: ; fbbdb +PrintMagikarpLength: call Magikarp_LoadFeetInchesChars ld hl, wStringBuffer1 ld de, wMagikarpLength @@ -105,9 +102,8 @@ PrintMagikarpLength: ; fbbdb inc hl ld [hl], "@" ret -; fbbfc -CalcMagikarpLength: ; fbbfc +CalcMagikarpLength: ; Return Magikarp's length (in feet and inches) at wMagikarpLength (big endian). ; ; input: @@ -283,9 +279,8 @@ CalcMagikarpLength: ; fbbfc inc hl ld [hl], e ; in ret -; fbc9a -.BCLessThanDE: ; fbc9a +.BCLessThanDE: ; Intention: Return bc < de. ; Reality: Return b < d. ld a, b @@ -295,9 +290,8 @@ CalcMagikarpLength: ; fbbfc ld a, c cp e ret -; fbca1 -.BCMinusDE: ; fbca1 +.BCMinusDE: ; bc -= de ld a, c sub e @@ -306,13 +300,12 @@ CalcMagikarpLength: ; fbbfc sbc d ld b, a ret -; fbca8 INCLUDE "data/events/magikarp_lengths.asm" -MagikarpHouseSign: ; fbcd2 +MagikarpHouseSign: ld a, [wBestMagikarpLengthFeet] ld [wMagikarpLength], a ld a, [wBestMagikarpLengthInches] @@ -321,7 +314,6 @@ MagikarpHouseSign: ; fbcd2 ld hl, .CurrentRecordtext call PrintText ret -; fbce8 .CurrentRecordtext: ; 0xfbce8 ; "CURRENT RECORD" diff --git a/engine/events/magnet_train.asm b/engine/events/magnet_train.asm index 6f2aa2d1f02..010983627c5 100644 --- a/engine/events/magnet_train.asm +++ b/engine/events/magnet_train.asm @@ -1,4 +1,4 @@ -MagnetTrain: ; 8cc04 +MagnetTrain: ld a, [wScriptVar] and a jr nz, .ToGoldenrod @@ -81,9 +81,8 @@ MagnetTrain: ; 8cc04 pop af ld [rSVBK], a ret -; 8cc99 -MagnetTrain_UpdateLYOverrides: ; 8cc99 +MagnetTrain_UpdateLYOverrides: ld hl, wLYOverridesBackup ld c, $2f ld a, [wMagnetTrainOffset] @@ -111,9 +110,8 @@ MagnetTrain_UpdateLYOverrides: ; 8cc99 dec c jr nz, .loadloop ret -; 8ccc9 -MagntTrain_LoadGFX_PlayMusic: ; 8ccc9 +MagntTrain_LoadGFX_PlayMusic: call ClearBGPalettes call ClearSprites call DisableLCD @@ -155,9 +153,8 @@ MagntTrain_LoadGFX_PlayMusic: ; 8ccc9 ld de, MUSIC_MAGNET_TRAIN call PlayMusic2 ret -; 8cd27 -DrawMagnetTrain: ; 8cd27 +DrawMagnetTrain: hlbgcoord 0, 0 xor a .loop @@ -184,18 +181,16 @@ DrawMagnetTrain: ; 8cd27 ld c, 20 call .FillLine ret -; 8cd65 -.FillLine: ; 8cd65 +.FillLine: ld a, [de] inc de ld [hli], a dec c jr nz, .FillLine ret -; 8cd6c -.FillAlt: ; 8cd6c +.FillAlt: ld [hl], e inc hl ld [hl], d @@ -203,9 +198,8 @@ DrawMagnetTrain: ; 8cd27 dec b jr nz, .FillAlt ret -; 8cd74 -GetMagnetTrainBGTiles: ; 8cd74 +GetMagnetTrainBGTiles: push hl ld e, a ld d, 0 @@ -217,9 +211,8 @@ GetMagnetTrainBGTiles: ; 8cd74 ld d, [hl] pop hl ret -; 8cd82 -MagnetTrainBGTiles: ; 8cd82 +MagnetTrainBGTiles: ; Alternating tiles for each line of the Magnet Train tilemap. db $4c, $4d ; bush db $5c, $5d ; bush @@ -239,9 +232,8 @@ MagnetTrainBGTiles: ; 8cd82 db $5c, $5d ; bush db $4c, $4d ; bush db $5c, $5d ; bush -; 8cda6 -MagnetTrain_InitLYOverrides: ; 8cda6 +MagnetTrain_InitLYOverrides: ld hl, wLYOverrides ld bc, wLYOverridesEnd - wLYOverrides ld a, [wMagnetTrainInitPosition] @@ -253,9 +245,8 @@ MagnetTrain_InitLYOverrides: ; 8cda6 ld a, rSCX - $ff00 ld [hLCDCPointer], a ret -; 8cdc3 -SetMagnetTrainPals: ; 8cdc3 +SetMagnetTrainPals: ld a, $1 ld [rVBK], a @@ -286,9 +277,8 @@ SetMagnetTrainPals: ; 8cdc3 ld a, $0 ld [rVBK], a ret -; 8cdf7 -MagnetTrain_Jumptable: ; 8cdf7 +MagnetTrain_Jumptable: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -299,9 +289,8 @@ MagnetTrain_Jumptable: ; 8cdf7 ld h, [hl] ld l, a jp hl -; 8ce06 -.Jumptable: ; 8ce06 +.Jumptable: dw .InitPlayerSpriteAnim dw .WaitScene dw .MoveTrain1 @@ -309,15 +298,13 @@ MagnetTrain_Jumptable: ; 8cdf7 dw .MoveTrain2 dw .WaitScene dw .TrainArrived -; 8ce14 -.Next: ; 8ce14 +.Next: ld hl, wJumptableIndex inc [hl] ret -; 8ce19 -.InitPlayerSpriteAnim: ; 8ce19 +.InitPlayerSpriteAnim: ld d, 10 * 8 + 5 ld a, [wMagnetTrainPlayerSpriteInitX] ld e, a @@ -343,9 +330,8 @@ MagnetTrain_Jumptable: ; 8cdf7 ld a, $80 ld [wMagnetTrainWaitCounter], a ret -; 8ce47 -.MoveTrain1: ; 8ce47 +.MoveTrain1: ld hl, wMagnetTrainHoldPosition ld a, [wMagnetTrainPosition] cp [hl] @@ -367,9 +353,8 @@ MagnetTrain_Jumptable: ; 8cdf7 ld a, $80 ld [wMagnetTrainWaitCounter], a ret -; 8ce6d -.WaitScene: ; 8ce6d +.WaitScene: ld hl, wMagnetTrainWaitCounter ld a, [hl] and a @@ -380,9 +365,8 @@ MagnetTrain_Jumptable: ; 8cdf7 .DoneWaiting: call .Next ret -; 8ce7a -.MoveTrain2: ; 8ce7a +.MoveTrain2: ld hl, wMagnetTrainFinalPosition ld a, [wMagnetTrainPosition] cp [hl] @@ -410,17 +394,15 @@ MagnetTrain_Jumptable: ; 8cdf7 .PrepareToFinishAnim: call .Next ret -; 8cea2 -.TrainArrived: ; 8cea2 +.TrainArrived: ld a, $80 ld [wJumptableIndex], a ld de, SFX_TRAIN_ARRIVED call PlaySFX ret -; 8ceae -MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae +MagnetTrain_Jumptable_FirstRunThrough: farcall PlaySpriteAnimations call MagnetTrain_Jumptable call MagnetTrain_UpdateLYOverrides @@ -455,7 +437,6 @@ MagnetTrain_Jumptable_FirstRunThrough: ; 8ceae pop af ld [rSVBK], a ret -; 8ceff MagnetTrainTilemap1: db $1f, $05, $06, $0a, $0a, $0a, $09, $0a, $0a, $0a, $0a, $0a, $0a, $09, $0a, $0a, $0a, $0b, $0c, $1f @@ -465,4 +446,3 @@ MagnetTrainTilemap3: db $24, $25, $26, $27, $07, $2f, $29, $28, $28, $28, $28, $28, $28, $29, $07, $2f, $2a, $2b, $2c, $2d MagnetTrainTilemap4: db $20, $1f, $2e, $1f, $17, $00, $2e, $1f, $1f, $1f, $1f, $1f, $1f, $2e, $17, $00, $1f, $2e, $1f, $0f -; 8cf4f diff --git a/engine/events/map_name_sign.asm b/engine/events/map_name_sign.asm index 385ddf8029f..1d8736e54b1 100644 --- a/engine/events/map_name_sign.asm +++ b/engine/events/map_name_sign.asm @@ -1,14 +1,13 @@ MAP_NAME_SIGN_START EQU $60 -ReturnFromMapSetupScript:: ; b8000 +ReturnFromMapSetupScript:: xor a ld [hBGMapMode], a farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes ret -; b800a ; should have just been a fallthrough -.inefficient_farcall ; b800a +.inefficient_farcall ld a, [wMapGroup] ld b, a ld a, [wMapNumber] @@ -57,9 +56,8 @@ ReturnFromMapSetupScript:: ; b8000 xor a ld [hLCDCPointer], a ret -; b8064 -.CheckMovingWithinLandmark: ; b8064 +.CheckMovingWithinLandmark: ld a, [wCurrentLandmark] ld c, a ld a, [wPreviousLandmark] @@ -67,9 +65,8 @@ ReturnFromMapSetupScript:: ; b8000 ret z cp SPECIAL_MAP ret -; b8070 -.CheckSpecialMap: ; b8070 +.CheckSpecialMap: ; These landmarks do not get pop-up signs. cp -1 ret z @@ -88,9 +85,8 @@ ReturnFromMapSetupScript:: ; b8000 ld a, 1 and a ret -; b8089 -.CheckNationalParkGate: ; b8089 +.CheckNationalParkGate: ld a, [wMapGroup] cp GROUP_ROUTE_35_NATIONAL_PARK_GATE ret nz @@ -99,10 +95,9 @@ ReturnFromMapSetupScript:: ; b8000 ret z cp MAP_ROUTE_36_NATIONAL_PARK_GATE ret -; b8098 -PlaceMapNameSign:: ; b8098 (2e:4098) +PlaceMapNameSign:: ld hl, wLandmarkSignTimer ld a, [hl] and a @@ -131,25 +126,23 @@ PlaceMapNameSign:: ; b8098 (2e:4098) ret -LoadMapNameSignGFX: ; b80c6 +LoadMapNameSignGFX: ld de, MapEntryFrameGFX ld hl, vTiles2 tile MAP_NAME_SIGN_START lb bc, BANK(MapEntryFrameGFX), 14 call Get2bpp ret -; b80d3 -InitMapNameFrame: ; b80d3 +InitMapNameFrame: hlcoord 0, 0 ld b, 2 ld c, 18 call InitMapSignAttrMap call PlaceMapNameFrame ret -; b80e1 -PlaceMapNameCenterAlign: ; b80e1 (2e:40e1) +PlaceMapNameCenterAlign: ld a, [wCurrentLandmark] ld e, a farcall GetLandmarkName @@ -165,7 +158,7 @@ PlaceMapNameCenterAlign: ; b80e1 (2e:40e1) call PlaceString ret -.GetNameLength: ; b8101 (2e:4101) +.GetNameLength: ld c, 0 push hl ld hl, wStringBuffer1 @@ -182,7 +175,7 @@ PlaceMapNameCenterAlign: ; b80e1 (2e:40e1) ret -InitMapSignAttrMap: ; b8115 +InitMapSignAttrMap: ld de, wAttrMap - wTileMap add hl, de inc b @@ -204,9 +197,8 @@ InitMapSignAttrMap: ; b8115 dec b jr nz, .loop ret -; b812f -PlaceMapNameFrame: ; b812f +PlaceMapNameFrame: hlcoord 0, 0 ; top left ld a, MAP_NAME_SIGN_START + 1 @@ -243,9 +235,8 @@ PlaceMapNameFrame: ; b812f ld a, MAP_NAME_SIGN_START + 10 ld [hl], a ret -; b815b -.FillMiddle: ; b815b +.FillMiddle: ld c, SCREEN_WIDTH - 2 ld a, MAP_NAME_SIGN_START + 13 .loop @@ -253,9 +244,8 @@ PlaceMapNameFrame: ; b812f dec c jr nz, .loop ret -; b8164 -.FillTopBottom: ; b8164 +.FillTopBottom: ld c, 5 jr .enterloop @@ -271,4 +261,3 @@ PlaceMapNameFrame: ; b812f dec c jr nz, .continueloop ret -; b8172 diff --git a/engine/events/misc_scripts.asm b/engine/events/misc_scripts.asm index b79889f7231..5e78f079e36 100644 --- a/engine/events/misc_scripts.asm +++ b/engine/events/misc_scripts.asm @@ -41,7 +41,7 @@ FindItemInBallScript:: ; 0x122ce db "@" ; 0x122f8 -.TryReceiveItem: ; 122f8 +.TryReceiveItem: xor a ld [wScriptVar], a ld a, [wEngineBuffer1] @@ -59,4 +59,3 @@ FindItemInBallScript:: ; 0x122ce ld a, $1 ld [wScriptVar], a ret -; 12324 diff --git a/engine/events/misc_scripts_2.asm b/engine/events/misc_scripts_2.asm index dd705b547dc..e0247681636 100644 --- a/engine/events/misc_scripts_2.asm +++ b/engine/events/misc_scripts_2.asm @@ -27,7 +27,7 @@ HiddenItemScript:: ; 0x13625 writetext .no_room_text waitbutton -.finish ; 13643 +.finish closetext end @@ -41,7 +41,7 @@ HiddenItemScript:: ; 0x13625 text_jump UnknownText_0x1bd331 db "@" -SetMemEvent: ; 1364f +SetMemEvent: ld hl, wEngineBuffer1 ld a, [hli] ld d, [hl] diff --git a/engine/events/mom.asm b/engine/events/mom.asm index 1a00b723ae8..0648ae54245 100644 --- a/engine/events/mom.asm +++ b/engine/events/mom.asm @@ -1,4 +1,4 @@ -BankOfMom: ; 16218 +BankOfMom: ld a, [hInMenu] push af ld a, $1 @@ -16,9 +16,8 @@ BankOfMom: ; 16218 pop af ld [hInMenu], a ret -; 16233 -.RunJumptable: ; 16233 +.RunJumptable: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -29,9 +28,8 @@ BankOfMom: ; 16218 ld h, [hl] ld l, a jp hl -; 16242 -.dw ; 16242 +.dw dw .CheckIfBankInitialized dw .InitializeBank @@ -42,9 +40,8 @@ BankOfMom: ; 16218 dw .StopOrStartSavingMoney dw .AskDST dw .JustDoWhatYouCan -; 16254 -.CheckIfBankInitialized: ; 16254 +.CheckIfBankInitialized: ld a, [wMomSavingMoney] bit MOM_ACTIVE_F, a jr nz, .savingmoneyalready @@ -59,9 +56,8 @@ BankOfMom: ; 16218 .done_0 ld [wJumptableIndex], a ret -; 1626a -.InitializeBank: ; 1626a +.InitializeBank: ld hl, UnknownText_0x16649 call PrintText call YesNoBox @@ -81,9 +77,8 @@ BankOfMom: ; 16218 ld a, $8 ld [wJumptableIndex], a ret -; 16290 -.IsThisAboutYourMoney: ; 16290 +.IsThisAboutYourMoney: ld hl, UnknownText_0x16658 call PrintText call YesNoBox @@ -98,9 +93,8 @@ BankOfMom: ; 16218 .done_2 ld [wJumptableIndex], a ret -; 162a8 -.AccessBankOfMom: ; 162a8 +.AccessBankOfMom: ld hl, UnknownText_0x1665d call PrintText call LoadStandardMenuHeader @@ -135,9 +129,8 @@ BankOfMom: ; 16218 .done_3 ld [wJumptableIndex], a ret -; 162e0 -.StoreMoney: ; 162e0 +.StoreMoney: ld hl, UnknownText_0x16662 call PrintText xor a @@ -202,9 +195,8 @@ BankOfMom: ; 16218 .done_4 ld [wJumptableIndex], a ret -; 16373 -.TakeMoney: ; 16373 +.TakeMoney: ld hl, UnknownText_0x16667 call PrintText xor a @@ -269,9 +261,8 @@ BankOfMom: ; 16218 .done_5 ld [wJumptableIndex], a ret -; 16406 -.StopOrStartSavingMoney: ; 16406 +.StopOrStartSavingMoney: ld hl, UnknownText_0x1666c call PrintText call YesNoBox @@ -290,19 +281,17 @@ BankOfMom: ; 16218 ld a, $7 ld [wJumptableIndex], a ret -; 1642d -.AskDST: ; 1642d +.AskDST: ld hl, UnknownText_0x16694 call PrintText -.JustDoWhatYouCan: ; 16433 +.JustDoWhatYouCan: ld hl, wJumptableIndex set 7, [hl] ret -; 16439 -DSTChecks: ; 16439 +DSTChecks: ; check the time; avoid changing DST if doing so would change the current day ld a, [wDST] bit 7, a @@ -364,9 +353,8 @@ DSTChecks: ; 16439 ld hl, .Text_SetClockForward call PlaceHLTextAtBC ret -; 164b9 -.SetClockForward: ; 164b9 +.SetClockForward: ld a, [wStartHour] add 1 sub 24 @@ -379,9 +367,8 @@ DSTChecks: ; 16439 adc 0 ld [wStartDay], a ret -; 164d1 -.SetClockBack: ; 164d1 +.SetClockBack: ld a, [wStartHour] sub 1 jr nc, .DontLoopHourBack @@ -395,14 +382,12 @@ DSTChecks: ; 16439 .DontLoopDayBack: ld [wStartDay], a ret -; 164ea -.ClearBox: ; 164ea +.ClearBox: hlcoord 1, 14 lb bc, 3, 18 call ClearBox ret -; 164f4 .Text_AdjustClock: ; 0x164f4 ; Do you want to adjust your clock for Daylight Saving Time? @@ -441,13 +426,13 @@ DSTChecks: ; 16439 db "@" ; 0x16512 -Mom_SetUpWithdrawMenu: ; 16512 +Mom_SetUpWithdrawMenu: ld de, Mon_WithdrawString jr Mom_ContinueMenuSetup -Mom_SetUpDepositMenu: ; 16517 +Mom_SetUpDepositMenu: ld de, Mom_DepositString -Mom_ContinueMenuSetup: ; 1651a +Mom_ContinueMenuSetup: push de xor a ld [hBGMapMode], a @@ -478,15 +463,13 @@ Mom_ContinueMenuSetup: ; 1651a call UpdateSprites call CGBOnly_CopyTilemapAtOnce ret -; 1656b -Mom_Wait10Frames: ; 1656b +Mom_Wait10Frames: ld c, 10 call DelayFrames ret -; 16571 -Mom_WithdrawDepositMenuJoypad: ; 16571 +Mom_WithdrawDepositMenuJoypad: .loop call JoyTextDelay ld hl, hJoyPressed @@ -590,9 +573,8 @@ Mom_WithdrawDepositMenuJoypad: ; 16571 add hl, de pop de ret -; 16613 -.DigitQuantities: ; 16613 +.DigitQuantities: dt 100000 dt 10000 dt 1000 @@ -613,7 +595,6 @@ Mom_WithdrawDepositMenuJoypad: ; 16571 dt 900 dt 90 dt 9 -; 16649 UnknownText_0x16649: ; 0x16649 ; Wow, that's a cute #MON. Where did you get it? … So, you're leaving on an adventure… OK! I'll help too. But what can I do for you? I know! I'll save money for you. On a long journey, money's important. Do you want me to save your money? @@ -711,21 +692,17 @@ UnknownText_0x16694: ; 0x16694 db "@" ; 0x16699 -Mom_SavedString: ; 16699 +Mom_SavedString: db "SAVED@" -; 1669f -Mon_WithdrawString: ; 1669f +Mon_WithdrawString: db "WITHDRAW@" -; 166a8 -Mom_DepositString: ; 166a8 +Mom_DepositString: db "DEPOSIT@" -; 166b0 -Mom_HeldString: ; 166b0 +Mom_HeldString: db "HELD@" -; 166b5 MenuHeader_0x166b5: ; 0x166b5 db MENU_BACKUP_TILES ; flags diff --git a/engine/events/mom_phone.asm b/engine/events/mom_phone.asm index de19a36749b..d82690940ab 100644 --- a/engine/events/mom_phone.asm +++ b/engine/events/mom_phone.asm @@ -5,7 +5,7 @@ const_value = 1 const MOM_ITEM const MOM_DOLL -MomTriesToBuySomething:: ; fcfec +MomTriesToBuySomething:: ld a, [wMapReentryScriptQueueFlag] and a ret nz @@ -23,14 +23,13 @@ MomTriesToBuySomething:: ; fcfec farcall LoadScriptBDE scf ret -; fd00f .Script: ; 0xfd00f callasm .ASMFunction farjump Script_ReceivePhoneCall ; 0xfd017 -.ASMFunction: ; fd017 +.ASMFunction: call MomBuysItem_DeductFunds call Mom_GetScriptPointer ld a, [wWhichMomItemSet] @@ -56,9 +55,8 @@ MomTriesToBuySomething:: ; fcfec ld a, d ld [hl], a ret -; fd044 -CheckBalance_MomItem2: ; fd044 +CheckBalance_MomItem2: ld a, [wWhichMomItem] cp NUM_MOM_ITEMS_2 jr nc, .nope @@ -115,10 +113,9 @@ CheckBalance_MomItem2: ; fd044 ld bc, hMoneyTemp farcall AddMoney ret -; fd0a6 -MomBuysItem_DeductFunds: ; fd0a6 (3f:50a6) +MomBuysItem_DeductFunds: call GetItemFromMom ld de, 3 ; cost add hl, de @@ -134,7 +131,7 @@ MomBuysItem_DeductFunds: ; fd0a6 (3f:50a6) ret -Mom_GiveItemOrDoll: ; fd0c3 +Mom_GiveItemOrDoll: call GetItemFromMom ld de, 6 ; item type add hl, de @@ -156,10 +153,9 @@ Mom_GiveItemOrDoll: ; fd0c3 ld hl, wPCItems call ReceiveItem ret -; fd0eb -Mom_GetScriptPointer: ; fd0eb (3f:50eb) +Mom_GetScriptPointer: call GetItemFromMom ld de, 6 ; item type add hl, de @@ -169,7 +165,6 @@ Mom_GetScriptPointer: ; fd0eb (3f:50eb) ret z ld de, .DollScript ret -; fd0fd (3f:50fd) .ItemScript: ; 0xfd0fd writetext _MomText_HiHowAreYou @@ -188,7 +183,7 @@ Mom_GetScriptPointer: ; fd0eb (3f:50eb) ; 0xfd117 -GetItemFromMom: ; fd117 +GetItemFromMom: ld a, [wWhichMomItemSet] and a jr z, .zero @@ -213,7 +208,6 @@ rept 3 ; multiply hl by 8 endr add hl, de ret -; fd136 INCLUDE "data/items/mom_phone.asm" @@ -257,8 +251,7 @@ _MomText_ItsInRoom: ; 0xfd1ca db 0 ; unused -DummyPredef3A: ; fd1d0 +DummyPredef3A: ret -; fd1d1 ret ; unused diff --git a/engine/events/money.asm b/engine/events/money.asm index 585c856184c..c4e20fc3e3d 100644 --- a/engine/events/money.asm +++ b/engine/events/money.asm @@ -1,4 +1,4 @@ -GiveMoney:: ; 15fd7 +GiveMoney:: ld a, 3 call AddMoney ld bc, MaxMoney @@ -21,14 +21,12 @@ GiveMoney:: ; 15fd7 .not_maxed_out and a ret -; 15ff7 -MaxMoney: ; 15ff7 +MaxMoney: dt MAX_MONEY -; 15ffa -TakeMoney:: ; 15ffa +TakeMoney:: ld a, 3 call SubtractMoney jr nc, .okay @@ -45,11 +43,10 @@ TakeMoney:: ; 15ffa .okay and a ret -; 1600b -CompareMoney:: ; 1600b +CompareMoney:: ld a, 3 -CompareFunds: ; 1600d +CompareFunds: ; a: number of bytes ; bc: start addr of amount (big-endian) ; de: start addr of account (big-endian) @@ -94,11 +91,10 @@ CompareFunds: ; 1600d pop de pop hl ret -; 16035 -SubtractMoney: ; 16035 +SubtractMoney: ld a, 3 -SubtractFunds: ; 16037 +SubtractFunds: ; a: number of bytes ; bc: start addr of amount (big-endian) ; de: start addr of account (big-endian) @@ -130,11 +126,10 @@ SubtractFunds: ; 16037 pop de pop hl ret -; 16053 -AddMoney: ; 16053 +AddMoney: ld a, 3 -AddFunds: ; 16055 +AddFunds: ; a: number of bytes ; bc: start addr of amount (big-endian) ; de: start addr of account (big-endian) @@ -167,9 +162,8 @@ AddFunds: ; 16055 pop de pop hl ret -; 1606f -GiveCoins:: ; 1606f +GiveCoins:: ld a, 2 ld de, wCoins call AddFunds @@ -189,14 +183,12 @@ GiveCoins:: ; 1606f .not_maxed and a ret -; 1608d -.maxcoins ; 1608d +.maxcoins bigdw MAX_COINS -; 1608f -TakeCoins:: ; 1608f +TakeCoins:: ld a, 2 ld de, wCoins call SubtractFunds @@ -212,10 +204,8 @@ TakeCoins:: ; 1608f .okay and a ret -; 160a1 -CheckCoins:: ; 160a1 +CheckCoins:: ld a, 2 ld de, wCoins jp CompareFunds -; 160a9 diff --git a/engine/events/move_deleter.asm b/engine/events/move_deleter.asm index f75bc44dd4b..1b8e1a1695e 100644 --- a/engine/events/move_deleter.asm +++ b/engine/events/move_deleter.asm @@ -107,7 +107,7 @@ MoveDeletion: db "@" ; 0x2c5f9 -.DeleteMove: ; 2c5f9 +.DeleteMove: ld a, b push bc dec a diff --git a/engine/events/move_tutor.asm b/engine/events/move_tutor.asm index c11fe2fa1ed..a7805b6d001 100644 --- a/engine/events/move_tutor.asm +++ b/engine/events/move_tutor.asm @@ -1,4 +1,4 @@ -MoveTutor: ; 4925b +MoveTutor: call FadeToMenu call ClearBGPalettes call ClearScreen @@ -33,7 +33,7 @@ MoveTutor: ; 4925b call CloseSubmenu ret -.GetMoveTutorMove: ; 492a5 +.GetMoveTutorMove: ld a, [wScriptVar] cp MOVETUTOR_FLAMETHROWER jr z, .flamethrower @@ -51,7 +51,7 @@ MoveTutor: ; 4925b ld a, THUNDERBOLT ret -CheckCanLearnMoveTutorMove: ; 492b9 +CheckCanLearnMoveTutorMove: ld hl, .MenuHeader call LoadMenuHeader diff --git a/engine/events/name_rater.asm b/engine/events/name_rater.asm index aae070ca212..87d35e8edae 100644 --- a/engine/events/name_rater.asm +++ b/engine/events/name_rater.asm @@ -1,4 +1,4 @@ -_NameRater: ; fb6ed +_NameRater: ; Introduce himself ld hl, NameRaterIntroText call PrintText @@ -77,9 +77,8 @@ _NameRater: ; fb6ed .done call PrintText ret -; fb78a -CheckIfMonIsYourOT: ; fb78a +CheckIfMonIsYourOT: ; Checks to see if the partymon loaded in [wCurPartyMon] has the different OT as you. Returns carry if not. ld hl, wPartyMonOT ld bc, NAME_LENGTH @@ -110,9 +109,8 @@ CheckIfMonIsYourOT: ; fb78a .nope scf ret -; fb7be -IsNewNameEmpty: ; fb7be +IsNewNameEmpty: ; Checks to see if the nickname loaded in wStringBuffer2 is empty. If so, return carry. ld hl, wStringBuffer2 ld c, MON_NAME_LENGTH - 1 @@ -132,9 +130,8 @@ IsNewNameEmpty: ; fb7be .nonspace and a ret -; fb7d3 -CompareNewToOld: ; fb7d3 +CompareNewToOld: ; Compares the nickname in wStringBuffer2 to the previous nickname. If they are the same, return carry. ld hl, wPartyMonNicknames ld bc, MON_NAME_LENGTH @@ -167,9 +164,8 @@ CompareNewToOld: ; fb7d3 .terminator scf ret -; fb802 -GetNicknameLength: ; fb802 +GetNicknameLength: ; Gets the length of the name starting at hl and returns it in c. ld c, 0 .loop @@ -181,7 +177,6 @@ GetNicknameLength: ; fb802 cp MON_NAME_LENGTH - 1 jr nz, .loop ret -; fb80f NameRaterIntroText: ; 0xfb80f ; Hello, hello! I'm the NAME RATER. diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm index d3991a28cfa..26a5559ddac 100644 --- a/engine/events/npc_trade.asm +++ b/engine/events/npc_trade.asm @@ -1,4 +1,4 @@ -NPCTrade:: ; fcba8 +NPCTrade:: ld a, e ld [wJumptableIndex], a call Trade_GetDialog @@ -51,9 +51,8 @@ NPCTrade:: ; fcba8 .done call PrintTradeText ret -; fcc07 -.TradeAnimation: ; fcc07 +.TradeAnimation: call DisableSpriteUpdates ld a, [wJumptableIndex] push af @@ -66,9 +65,8 @@ NPCTrade:: ; fcba8 ld [wJumptableIndex], a call ReturnToMapWithSpeechTextbox ret -; fcc23 -CheckTradeGender: ; fcc23 +CheckTradeGender: xor a ld [wMonType], a @@ -95,9 +93,8 @@ CheckTradeGender: ; fcc23 .not_matching scf ret -; fcc4a -TradeFlagAction: ; fcc4a +TradeFlagAction: ld hl, wTradeFlags ld a, [wJumptableIndex] ld c, a @@ -105,17 +102,15 @@ TradeFlagAction: ; fcc4a ld a, c and a ret -; fcc59 -Trade_GetDialog: ; fcc59 +Trade_GetDialog: ld e, NPCTRADE_DIALOG call GetTradeAttribute ld a, [hl] ld [wcf64], a ret -; fcc63 -DoNPCTrade: ; fcc63 +DoNPCTrade: ld e, NPCTRADE_GIVEMON call GetTradeAttribute ld a, [hl] @@ -275,7 +270,6 @@ DoNPCTrade: ; fcc63 pop bc pop af ret -; fcdc2 GetTradeAttribute: ; 0xfcdc2 @@ -294,71 +288,63 @@ GetTradeAttribute: ; 0xfcdc2 ret ; 0xfcdd7 -Trade_GetAttributeOfCurrentPartymon: ; fcdd7 +Trade_GetAttributeOfCurrentPartymon: ld a, [wCurPartyMon] call AddNTimes ret -; fcdde -Trade_GetAttributeOfLastPartymon: ; fcdde +Trade_GetAttributeOfLastPartymon: ld a, [wPartyCount] dec a call AddNTimes ld e, l ld d, h ret -; fcde8 -GetTradeMonName: ; fcde8 +GetTradeMonName: push de ld [wd265], a call GetBasePokemonName ld hl, wStringBuffer1 pop de ret -; fcdf4 -CopyTradeName: ; fcdf4 +CopyTradeName: ld bc, NAME_LENGTH call CopyBytes ret -; fcdfb -Unreferenced_Functionfcdfb: ; fcdfb +Unreferenced_Functionfcdfb: ld bc, 4 call CopyBytes ld a, "@" ld [de], a ret -; fce05 -Unreferenced_Functionfce05: ; fce05 +Unreferenced_Functionfce05: ld bc, 3 call CopyBytes ld a, "@" ld [de], a ret -; fce0f -Trade_CopyTwoBytes: ; fce0f +Trade_CopyTwoBytes: ld a, [hli] ld [de], a inc de ld a, [hl] ld [de], a ret -; fce15 -Trade_CopyTwoBytesReverseEndian: ; fce15 +Trade_CopyTwoBytesReverseEndian: ld a, [hli] ld [de], a dec de ld a, [hl] ld [de], a ret -; fce1b -GetTradeMonNames: ; fce1b +GetTradeMonNames: ld e, NPCTRADE_GETMON call GetTradeAttribute ld a, [hl] @@ -398,13 +384,12 @@ GetTradeMonNames: ; fce1b ld [hli], a ld [hl], "@" ret -; fce58 INCLUDE "data/events/npc_trades.asm" -PrintTradeText: ; fcf38 +PrintTradeText: push af call GetTradeMonNames pop af @@ -420,9 +405,8 @@ PrintTradeText: ; fcf38 ld l, a call PrintText ret -; fcf53 -TradeTexts: ; fcf53 +TradeTexts: ; entries correspond to TRADE_DIALOG_* × TRADE_DIALOGSET_* constants ; TRADE_DIALOG_INTRO dw TradeIntroText1 @@ -449,7 +433,6 @@ TradeTexts: ; fcf53 dw TradeAfterText2 dw TradeAfterText3 dw TradeAfterText4 -; fcf7b ConnectLinkCableText: ; 0xfcf7b diff --git a/engine/events/odd_egg.asm b/engine/events/odd_egg.asm index 3e58c2677f7..10d7cf9aa0d 100644 --- a/engine/events/odd_egg.asm +++ b/engine/events/odd_egg.asm @@ -1,4 +1,4 @@ -_GiveOddEgg: ; 1fb4b6 +_GiveOddEgg: ; Figure out which egg to give. ; Compare a random word to @@ -88,7 +88,6 @@ _GiveOddEgg: ; 1fb4b6 ld [wMobileMonNicknamePointerBuffer + 1], a farcall AddMobileMonToParty ret -; 1fb546 .Odd: db "ODD@@@@@@@@@" diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm index f9d67f0bd90..b4e95987cb9 100644 --- a/engine/events/overworld.asm +++ b/engine/events/overworld.asm @@ -1,11 +1,11 @@ -FieldMoveJumptableReset: ; c6ea +FieldMoveJumptableReset: xor a ld hl, wBuffer1 ld bc, 7 call ByteFill ret -FieldMoveJumptable: ; c6f5 +FieldMoveJumptable: ld a, [wBuffer1] rst JumpTable ld [wBuffer1], a @@ -19,7 +19,7 @@ FieldMoveJumptable: ; c6f5 scf ret -GetPartyNick: ; c706 +GetPartyNick: ; write wCurPartyMon nickname to wStringBuffer1-3 ld hl, wPartyMonNicknames ld a, BOXMON @@ -33,7 +33,7 @@ GetPartyNick: ; c706 call CopyName2 ret -CheckEngineFlag: ; c721 +CheckEngineFlag: ; Check engine flag de ; Return carry if flag is not set ld b, CHECK_FLAG @@ -47,7 +47,7 @@ CheckEngineFlag: ; c721 xor a ret -CheckBadge: ; c731 +CheckBadge: ; Check engine flag a (ENGINE_ZEPHYRBADGE thru ENGINE_EARTHBADGE) ; Display "Badge required" text and return carry if the badge is not owned call CheckEngineFlag @@ -57,13 +57,13 @@ CheckBadge: ; c731 scf ret -.BadgeRequiredText: ; c73d +.BadgeRequiredText: ; Sorry! A new BADGE ; is required. text_jump _BadgeRequiredText db "@" -CheckPartyMove: ; c742 +CheckPartyMove: ; Check if a monster in your party has move d. ld e, 0 @@ -107,7 +107,7 @@ CheckPartyMove: ; c742 scf ret -FieldMoveFailed: ; c779 +FieldMoveFailed: ld hl, .CantUseHere call MenuTextBoxBackup ret @@ -117,7 +117,7 @@ FieldMoveFailed: ; c779 text_jump UnknownText_0x1c05c8 db "@" -CutFunction: ; c785 +CutFunction: call FieldMoveJumptableReset .loop ld hl, .Jumptable @@ -127,12 +127,12 @@ CutFunction: ; c785 ld [wFieldMoveSucceeded], a ret -.Jumptable: ; c796 (3:4796) +.Jumptable: dw .CheckAble dw .DoCut dw .FailCut -.CheckAble: ; c79c (3:479c) +.CheckAble: ld de, ENGINE_HIVEBADGE call CheckBadge jr c, .nohivebadge @@ -149,13 +149,13 @@ CutFunction: ; c785 ld a, $2 ret -.DoCut: ; c7b2 (3:47b2) +.DoCut: ld hl, Script_CutFromMenu call QueueScript ld a, $81 ret -.FailCut: ; c7bb (3:47bb) +.FailCut: ld hl, Text_NothingToCut call MenuTextBoxBackup ld a, $80 @@ -171,7 +171,7 @@ Text_NothingToCut: ; 0xc7c9 text_jump UnknownText_0x1c05ec db "@" -CheckMapForSomethingToCut: ; c7ce +CheckMapForSomethingToCut: ; Does the collision data of the facing tile permit cutting? call GetFacingTileCoord ld c, a @@ -206,7 +206,7 @@ CheckMapForSomethingToCut: ; c7ce scf ret -Script_CutFromMenu: ; c7fe +Script_CutFromMenu: reloadmappart special UpdateTimePals @@ -218,7 +218,7 @@ Script_Cut: ; 0xc802 closetext end -CutDownTreeOrGrass: ; c810 +CutDownTreeOrGrass: ld hl, wBuffer3 ; OverworldMapTile ld a, [hli] ld h, [hl] @@ -240,7 +240,7 @@ CutDownTreeOrGrass: ; c810 call LoadStandardFont ret -CheckOverworldTileArrays: ; c840 +CheckOverworldTileArrays: ; Input: c contains the tile you're facing ; Output: Replacement tile in b and effect on wild encounters in c, plus carry set. ; Carry is not set if the facing tile cannot be replaced, or if the tileset @@ -280,13 +280,13 @@ CheckOverworldTileArrays: ; c840 INCLUDE "data/events/field_move_blocks.asm" -OWFlash: ; c8ac +OWFlash: call .CheckUseFlash and $7f ld [wFieldMoveSucceeded], a ret -.CheckUseFlash: ; c8b5 +.CheckUseFlash: ; Flash ld de, ENGINE_ZEPHYRBADGE farcall CheckBadge @@ -312,7 +312,7 @@ OWFlash: ; c8ac ld a, $80 ret -UseFlash: ; c8e0 +UseFlash: ld hl, Script_UseFlash jp QueueScript @@ -337,7 +337,7 @@ UnknownText_0xc8f3: ; 0xc8f3 .BlankText: ; 0xc908 db "@" -SurfFunction: ; c909 +SurfFunction: call FieldMoveJumptableReset .loop ld hl, .Jumptable @@ -347,13 +347,13 @@ SurfFunction: ; c909 ld [wFieldMoveSucceeded], a ret -.Jumptable: ; c91a (3:491a) +.Jumptable: dw .TrySurf dw .DoSurf dw .FailSurf dw .AlreadySurfing -.TrySurf: ; c922 (3:4922) +.TrySurf: ld de, ENGINE_FOGBADGE call CheckBadge jr c, .asm_c956 @@ -385,7 +385,7 @@ SurfFunction: ; c909 ld a, $2 ret -.DoSurf: ; c95f (3:495f) +.DoSurf: call GetSurfType ld [wBuffer2], a call GetPartyNick @@ -394,22 +394,22 @@ SurfFunction: ; c909 ld a, $81 ret -.FailSurf: ; c971 (3:4971) +.FailSurf: ld hl, CantSurfText call MenuTextBoxBackup ld a, $80 ret -.AlreadySurfing: ; c97a (3:497a) +.AlreadySurfing: ld hl, AlreadySurfingText call MenuTextBoxBackup ld a, $80 ret -SurfFromMenuScript: ; c983 +SurfFromMenuScript: special UpdateTimePals -UsedSurfScript: ; c986 +UsedSurfScript: writetext UsedSurfText ; "used SURF!" waitbutton closetext @@ -426,23 +426,23 @@ UsedSurfScript: ; c986 applymovement PLAYER, wMovementBuffer end -.empty_fn ; c9a2 +.empty_fn farcall StubbedTrainerRankings_Surf ret -UsedSurfText: ; c9a9 +UsedSurfText: text_jump _UsedSurfText db "@" -CantSurfText: ; c9ae +CantSurfText: text_jump _CantSurfText db "@" -AlreadySurfingText: ; c9b3 +AlreadySurfingText: text_jump _AlreadySurfingText db "@" -GetSurfType: ; c9b8 +GetSurfType: ; Surfing on Pikachu uses an alternate sprite. ; This is done by using a separate movement type. @@ -459,7 +459,7 @@ GetSurfType: ; c9b8 ld a, PLAYER_SURF ret -CheckDirection: ; c9cb +CheckDirection: ; Return carry if a tile permission prevents you ; from moving in the direction you're facing. @@ -490,7 +490,7 @@ CheckDirection: ; c9cb db FACE_LEFT db FACE_RIGHT -TrySurfOW:: ; c9e7 +TrySurfOW:: ; Checking a tile in the overworld. ; Return carry if fail is allowed. @@ -538,7 +538,7 @@ TrySurfOW:: ; c9e7 xor a ret -AskSurfScript: ; ca2c +AskSurfScript: opentext writetext AskSurfText yesorno @@ -546,11 +546,11 @@ AskSurfScript: ; ca2c closetext end -AskSurfText: ; ca36 +AskSurfText: text_jump _AskSurfText ; The water is calm. db "@" ; Want to SURF? -FlyFunction: ; ca3b +FlyFunction: call FieldMoveJumptableReset .loop ld hl, .Jumptable @@ -565,7 +565,7 @@ FlyFunction: ; ca3b dw .DoFly dw .FailFly -.TryFly: ; ca52 +.TryFly: ; Fly ld de, ENGINE_STORMBADGE call CheckBadge @@ -606,13 +606,13 @@ FlyFunction: ; ca3b ld a, $80 ret -.DoFly: ; ca94 +.DoFly: ld hl, .FlyScript call QueueScript ld a, $81 ret -.FailFly: ; ca9d +.FailFly: call FieldMoveFailed ld a, $82 ret @@ -632,20 +632,20 @@ FlyFunction: ; ca3b callasm .ReturnFromFly end -.ReturnFromFly: ; cacb +.ReturnFromFly: farcall Function561d call DelayFrame call ReplaceKrisSprite farcall LoadOverworldFont ret -WaterfallFunction: ; cade +WaterfallFunction: call .TryWaterfall and $7f ld [wFieldMoveSucceeded], a ret -.TryWaterfall: ; cae7 +.TryWaterfall: ; Waterfall ld de, ENGINE_RISINGBADGE farcall CheckBadge @@ -663,7 +663,7 @@ WaterfallFunction: ; cade ld a, $80 ret -CheckMapCanWaterfall: ; cb07 +CheckMapCanWaterfall: ld a, [wPlayerDirection] and $c cp FACE_UP @@ -694,7 +694,7 @@ Script_UsedWaterfall: ; 0xcb20 iffalse .loop end -.CheckContinueWaterfall: ; cb38 +.CheckContinueWaterfall: xor a ld [wScriptVar], a ld a, [wPlayerStandingTile] @@ -705,7 +705,7 @@ Script_UsedWaterfall: ; 0xcb20 ld [wScriptVar], a ret -.WaterfallStep: ; cb4f +.WaterfallStep: turn_waterfall UP step_end @@ -714,7 +714,7 @@ Script_UsedWaterfall: ; 0xcb20 text_jump UnknownText_0x1c068e db "@" -TryWaterfallOW:: ; cb56 +TryWaterfallOW:: ld d, WATERFALL call CheckPartyMove jr c, .failed @@ -757,12 +757,12 @@ Script_AskWaterfall: ; 0xcb86 text_jump UnknownText_0x1c06bf db "@" -EscapeRopeFunction: ; cb95 +EscapeRopeFunction: call FieldMoveJumptableReset ld a, $1 jr dig_incave -DigFunction: ; cb9c +DigFunction: call FieldMoveJumptableReset ld a, $2 @@ -776,12 +776,12 @@ dig_incave ld [wFieldMoveSucceeded], a ret -.DigTable: ; cbb2 +.DigTable: dw .CheckCanDig dw .DoDig dw .FailDig -.CheckCanDig: ; cbb8 +.CheckCanDig: call GetMapEnvironment cp CAVE jr z, .incave @@ -805,7 +805,7 @@ dig_incave ld a, $1 ret -.DoDig: ; cbd8 +.DoDig: ld hl, wDigWarpNumber ld de, wNextWarp ld bc, 3 @@ -826,7 +826,7 @@ dig_incave ld a, $81 ret -.FailDig: ; cc06 +.FailDig: ld a, [wBuffer2] cp $2 jr nz, .failescaperope @@ -888,7 +888,7 @@ dig_incave return_dig 32 step_end -TeleportFunction: ; cc61 +TeleportFunction: call FieldMoveJumptableReset .loop ld hl, .Jumptable @@ -898,12 +898,12 @@ TeleportFunction: ; cc61 ld [wFieldMoveSucceeded], a ret -.Jumptable: ; cc72 +.Jumptable: dw .TryTeleport dw .DoTeleport dw .FailTeleport -.TryTeleport: ; cc78 +.TryTeleport: call GetMapEnvironment call CheckOutdoorMap jr z, .CheckIfSpawnPoint @@ -925,14 +925,14 @@ TeleportFunction: ; cc61 ld a, $2 ret -.DoTeleport: ; cc9c +.DoTeleport: call GetPartyNick ld hl, .TeleportScript call QueueScript ld a, $81 ret -.FailTeleport: ; cca8 +.FailTeleport: ld hl, .Text_CantUseHere call MenuTextBoxBackup ld a, $80 @@ -965,21 +965,21 @@ TeleportFunction: ; cc61 applymovement PLAYER, .TeleportTo end -.TeleportFrom: ; cce1 +.TeleportFrom: teleport_from step_end -.TeleportTo: ; cce3 +.TeleportTo: teleport_to step_end -StrengthFunction: ; cce5 +StrengthFunction: call .TryStrength and $7f ld [wFieldMoveSucceeded], a ret -.TryStrength: ; ccee +.TryStrength: ; Strength ld de, ENGINE_PLAINBADGE call CheckBadge @@ -996,17 +996,17 @@ StrengthFunction: ; cce5 text_jump UnknownText_0x1c0751 db "@" -.Failed: ; cd06 +.Failed: ld a, $80 ret -.UseStrength: ; cd09 +.UseStrength: ld hl, Script_StrengthFromMenu call QueueScript ld a, $81 ret -SetStrengthFlag: ; cd12 +SetStrengthFlag: ld hl, wBikeFlags set BIKEFLAGS_STRENGTH_ACTIVE_F, [hl] ld a, [wCurPartyMon] @@ -1076,7 +1076,7 @@ UnknownText_0xcd73: ; 0xcd73 text_jump UnknownText_0x1c07f4 db "@" -TryStrengthOW: ; cd78 +TryStrengthOW: ld d, STRENGTH call CheckPartyMove jr c, .nope @@ -1104,7 +1104,7 @@ TryStrengthOW: ; cd78 ld [wScriptVar], a ret -WhirlpoolFunction: ; cd9d +WhirlpoolFunction: call FieldMoveJumptableReset .loop ld hl, Jumptable_cdae @@ -1114,12 +1114,12 @@ WhirlpoolFunction: ; cd9d ld [wFieldMoveSucceeded], a ret -Jumptable_cdae: ; cdae +Jumptable_cdae: dw .TryWhirlpool dw .DoWhirlpool dw .FailWhirlpool -.TryWhirlpool: ; cdb4 +.TryWhirlpool: ld de, ENGINE_GLACIERBADGE call CheckBadge jr c, .noglacierbadge @@ -1136,13 +1136,13 @@ Jumptable_cdae: ; cdae ld a, $80 ret -.DoWhirlpool: ; cdca +.DoWhirlpool: ld hl, Script_WhirlpoolFromMenu call QueueScript ld a, $81 ret -.FailWhirlpool: ; cdd3 +.FailWhirlpool: call FieldMoveFailed ld a, $80 ret @@ -1152,7 +1152,7 @@ Text_UsedWhirlpool: ; 0xcdd9 text_jump UnknownText_0x1c0816 db "@" -TryWhirlpoolMenu: ; cdde +TryWhirlpoolMenu: call GetFacingTileCoord ld c, a push de @@ -1193,7 +1193,7 @@ Script_UsedWhirlpool: ; 0xce0f closetext end -DisappearWhirlpool: ; ce1d +DisappearWhirlpool: ld hl, wBuffer3 ld a, [hli] ld h, [hl] @@ -1210,7 +1210,7 @@ DisappearWhirlpool: ; ce1d call GetMovementPermissions ret -TryWhirlpoolOW:: ; ce3e +TryWhirlpoolOW:: ld d, WHIRLPOOL call CheckPartyMove jr c, .failed @@ -1251,13 +1251,13 @@ UnknownText_0xce78: ; 0xce78 text_jump UnknownText_0x1c0864 db "@" -HeadbuttFunction: ; ce7d +HeadbuttFunction: call TryHeadbuttFromMenu and $7f ld [wFieldMoveSucceeded], a ret -TryHeadbuttFromMenu: ; ce86 +TryHeadbuttFromMenu: call GetFacingTileCoord call CheckHeadbuttTreeTile jr nz, .no_tree @@ -1307,7 +1307,7 @@ HeadbuttScript: ; 0xceab closetext end -TryHeadbuttOW:: ; cec9 +TryHeadbuttOW:: ld d, HEADBUTT call CheckPartyMove jr c, .no @@ -1335,13 +1335,13 @@ UnknownText_0xcee6: ; 0xcee6 text_jump UnknownText_0x1c08bc db "@" -RockSmashFunction: ; ceeb +RockSmashFunction: call TryRockSmashFromMenu and $7f ld [wFieldMoveSucceeded], a ret -TryRockSmashFromMenu: ; cef4 +TryRockSmashFromMenu: call GetFacingObject jr c, .no_rock ld a, d @@ -1358,7 +1358,7 @@ TryRockSmashFromMenu: ; cef4 ld a, $80 ret -GetFacingObject: ; cf0d +GetFacingObject: farcall CheckFacingObject jr nc, .fail @@ -1384,7 +1384,7 @@ RockSmashFromMenuScript: ; 0xcf2e reloadmappart special UpdateTimePals -RockSmashScript: ; cf32 +RockSmashScript: callasm GetPartyNick writetext UnknownText_0xcf58 closetext @@ -1434,7 +1434,7 @@ UnknownText_0xcf77: ; 0xcf77 text_jump UnknownText_0x1c0924 db "@" -HasRockSmash: ; cf7c +HasRockSmash: ld d, ROCK_SMASH call CheckPartyMove jr nc, .yes @@ -1448,7 +1448,7 @@ HasRockSmash: ; cf7c ld [wScriptVar], a ret -FishFunction: ; cf8e +FishFunction: ld a, e push af call FieldMoveJumptableReset @@ -1462,14 +1462,14 @@ FishFunction: ; cf8e ld [wFieldMoveSucceeded], a ret -.FishTable: ; cfa5 +.FishTable: dw .TryFish dw .FishNoBite dw .FishGotSomething dw .FailFish dw .FishNoFish -.TryFish: ; cfaf +.TryFish: ld a, [wPlayerState] cp PLAYER_SURF jr z, .fail @@ -1510,11 +1510,11 @@ FishFunction: ; cf8e ld a, $1 ret -.FailFish: ; cff1 +.FailFish: ld a, $80 ret -.FishGotSomething: ; cff4 +.FishGotSomething: ld a, $1 ld [wBuffer6], a ld hl, Script_GotABite @@ -1522,7 +1522,7 @@ FishFunction: ; cf8e ld a, $81 ret -.FishNoBite: ; d002 +.FishNoBite: ld a, $2 ld [wBuffer6], a ld hl, Script_NotEvenANibble @@ -1530,7 +1530,7 @@ FishFunction: ; cf8e ld a, $81 ret -.FishNoFish: ; d010 +.FishNoFish: ld a, $0 ld [wBuffer6], a ld hl, Script_NotEvenANibble2 @@ -1574,7 +1574,7 @@ Script_GotABite: ; 0xd035 reloadmapafterbattle end -.Movement_NotFacingUp: ; d05c +.Movement_NotFacingUp: fish_got_bite fish_got_bite fish_got_bite @@ -1582,7 +1582,7 @@ Script_GotABite: ; 0xd035 show_emote step_end -.Movement_FacingUp: ; d062 +.Movement_FacingUp: fish_got_bite fish_got_bite fish_got_bite @@ -1591,12 +1591,12 @@ Script_GotABite: ; 0xd035 show_emote step_end -.Movement_RestoreRod: ; d069 +.Movement_RestoreRod: hide_emote fish_cast_rod step_end -Fishing_CheckFacingUp: ; d06c +Fishing_CheckFacingUp: ld a, [wPlayerDirection] and $c cp OW_UP @@ -1619,11 +1619,11 @@ Script_FishCastRod: ; 0xd07c pause 40 end -MovementData_0xd093: ; d093 +MovementData_0xd093: fish_cast_rod step_end -PutTheRodAway: ; d095 +PutTheRodAway: xor a ld [hBGMapMode], a ld a, $1 @@ -1647,13 +1647,13 @@ UnknownText_0xd0ae: ; unused text_jump UnknownText_0x1c0979 db "@" -BikeFunction: ; d0b3 +BikeFunction: call .TryBike and $7f ld [wFieldMoveSucceeded], a ret -.TryBike: ; d0bc +.TryBike: call .CheckEnvironment jr c, .CannotUseBike ld a, [wPlayerState] @@ -1704,7 +1704,7 @@ BikeFunction: ; d0b3 ld a, $1 ret -.CheckIfRegistered: ; d119 +.CheckIfRegistered: ld a, [wUsingItemWithSelect] and a ret z @@ -1712,7 +1712,7 @@ BikeFunction: ; d0b3 ld l, e ret -.CheckEnvironment: ; d121 +.CheckEnvironment: call GetMapEnvironment call CheckOutdoorMap jr z, .ok @@ -1791,7 +1791,7 @@ GotOffTheBikeText: ; 0xd181 text_jump UnknownText_0x1c09c7 db "@" -TryCutOW:: ; d186 +TryCutOW:: ld d, CUT call CheckPartyMove jr c, .cant_cut @@ -1824,7 +1824,7 @@ AskCutScript: ; 0xd1a9 closetext end -.CheckMap: ; d1ba +.CheckMap: xor a ld [wScriptVar], a call CheckMapForSomethingToCut diff --git a/engine/events/play_slow_cry.asm b/engine/events/play_slow_cry.asm index 1f27a7ca479..6839b396071 100644 --- a/engine/events/play_slow_cry.asm +++ b/engine/events/play_slow_cry.asm @@ -1,4 +1,4 @@ -PlaySlowCry: ; fb841 +PlaySlowCry: ld a, [wScriptVar] call LoadCry jr c, .done @@ -28,4 +28,3 @@ PlaySlowCry: ; fb841 .done ret -; fb877 diff --git a/engine/events/poisonstep.asm b/engine/events/poisonstep.asm index 5ea094db9ce..c7ba7660fb3 100644 --- a/engine/events/poisonstep.asm +++ b/engine/events/poisonstep.asm @@ -1,4 +1,4 @@ -DoPoisonStep:: ; 505da +DoPoisonStep:: ld a, [wPartyCount] and a jr z, .no_faint @@ -55,9 +55,8 @@ DoPoisonStep:: ; 505da .no_faint xor a ret -; 5062e -.DamageMonIfPoisoned: ; 5062e +.DamageMonIfPoisoned: ; check if mon is poisoned, return if not ld a, MON_STATUS call GetPartyParamLocation @@ -98,31 +97,27 @@ DoPoisonStep:: ; 505da ld c, %01 scf ret -; 50658 -.PlayPoisonSFX: ; 50658 +.PlayPoisonSFX: ld de, SFX_POISON call PlaySFX ld b, $2 predef LoadPoisonBGPals call DelayFrame ret -; 50669 -.Script_MonFaintedToPoison: ; 50669 +.Script_MonFaintedToPoison: callasm .PlayPoisonSFX opentext callasm .CheckWhitedOut iffalse .whiteout closetext end -; 50677 -.whiteout ; 50677 +.whiteout farjump Script_OverworldWhiteout -; 5067b -.CheckWhitedOut: ; 5067b +.CheckWhitedOut: xor a ld [wCurPartyMon], a ld de, wEngineBuffer2 @@ -149,14 +144,11 @@ DoPoisonStep:: ; 505da ld a, d ld [wScriptVar], a ret -; 506b2 -.PoisonFaintText: ; 506b2 +.PoisonFaintText: text_jump UnknownText_0x1c0acc db "@" -; 506b7 -.PoisonWhiteOutText: ; 506b7 +.PoisonWhiteOutText: text_jump UnknownText_0x1c0ada db "@" -; 506bc diff --git a/engine/events/poisonstep_pals.asm b/engine/events/poisonstep_pals.asm index c1bfa49f030..354aabb2896 100644 --- a/engine/events/poisonstep_pals.asm +++ b/engine/events/poisonstep_pals.asm @@ -1,11 +1,11 @@ -LoadPoisonBGPals: ; cbcdd +LoadPoisonBGPals: call .LoadPals ld a, [hCGB] and a ret nz ret ; ???? -.LoadPals: ; cbce5 +.LoadPals: ld a, [hCGB] and a jr nz, .cgb diff --git a/engine/events/poke_seer.asm b/engine/events/poke_seer.asm index c79298dd032..2a417717822 100644 --- a/engine/events/poke_seer.asm +++ b/engine/events/poke_seer.asm @@ -15,7 +15,7 @@ const SEERACTION_CANT_TELL_2 const SEERACTION_LEVEL_ONLY -PokeSeer: ; 4f0bc +PokeSeer: ld a, SEER_INTRO call PrintSeerText call JoyWaitAorB @@ -47,34 +47,30 @@ PokeSeer: ; 4f0bc ld a, SEER_EGG call PrintSeerText ret -; 4f0ee -SeerAction: ; 4f0ee +SeerAction: ld a, [wSeerAction] ld hl, SeerActions rst JumpTable ret -; 4f0f6 -SeerActions: ; 4f0f6 +SeerActions: dw SeerAction0 dw SeerAction1 dw SeerAction2 dw SeerAction3 dw SeerAction4 -; 4f100 -SeerAction0: ; 4f100 +SeerAction0: ld a, SEER_MET_AT call PrintSeerText ld a, SEER_TIME_LEVEL call PrintSeerText call SeerAdvice ret -; 4f10e -SeerAction1: ; 4f10e +SeerAction1: call GetCaughtOT ld a, SEER_TRADED call PrintSeerText @@ -82,28 +78,24 @@ SeerAction1: ; 4f10e call PrintSeerText call SeerAdvice ret -; 4f11f -SeerAction2: ; 4f11f +SeerAction2: ld a, SEER_CANT_TELL call PrintSeerText ret -; 4f125 -SeerAction3: ; 4f125 +SeerAction3: ld a, SEER_CANT_TELL call PrintSeerText ret -; 4f12b -SeerAction4: ; 4f12b +SeerAction4: ld a, SEER_LEVEL_ONLY call PrintSeerText call SeerAdvice ret -; 4f134 -ReadCaughtData: ; 4f134 +ReadCaughtData: ld a, MON_CAUGHTDATA call GetPartyParamLocation ld a, [hli] @@ -143,9 +135,8 @@ ReadCaughtData: ; 4f134 ld a, SEERACTION_CANT_TELL_1 ld [wSeerAction], a ret -; 4f176 -GetCaughtName: ; 4f176 +GetCaughtName: ld a, [wCurPartyMon] ld hl, wPartyMonNicknames ld bc, MON_NAME_LENGTH @@ -154,9 +145,8 @@ GetCaughtName: ; 4f176 ld bc, MON_NAME_LENGTH call CopyBytes ret -; 4f18c -GetCaughtLevel: ; 4f18c +GetCaughtLevel: ld a, "@" ld hl, wSeerCaughtLevelString ld bc, 4 @@ -185,13 +175,11 @@ GetCaughtLevel: ; 4f18c ld bc, 4 call CopyBytes ret -; 4f1c1 -.unknown_level ; 4f1c1 +.unknown_level db "???@" -; 4f1c5 -GetCaughtTime: ; 4f1c5 +GetCaughtTime: ld a, [wSeerCaughtData] and CAUGHT_TIME_MASK jr z, .none @@ -212,26 +200,22 @@ GetCaughtTime: ; 4f1c5 ld de, wSeerTimeOfDay call UnknownCaughtData ret -; 4f1e6 -.times ; 4f1e6 +.times db "Morning@" db "Day@" db "Night@" -; 4f1f8 -UnknownCaughtData: ; 4f1f8 +UnknownCaughtData: ld hl, .unknown ld bc, NAME_LENGTH call CopyBytes ret -; 4f202 -.unknown ; 4f202 +.unknown db "Unknown@" -; 4f20a -GetCaughtLocation: ; 4f20a +GetCaughtLocation: ld a, [wSeerCaughtGender] and CAUGHT_LOCATION_MASK jr z, .Unknown @@ -263,9 +247,8 @@ GetCaughtLocation: ; 4f20a ld [wSeerAction], a scf ret -; 4f242 -GetCaughtOT: ; 4f242 +GetCaughtOT: ld a, [wCurPartyMon] ld hl, wPartyMonOT ld bc, NAME_LENGTH @@ -286,15 +269,13 @@ GetCaughtOT: ; 4f242 ld a, "@" ld [de], a ret -; 4f26b -.male ; 4f26b +.male db "@" -.female ; 4f26c +.female db "@" -; 4f26d -PrintSeerText: ; 4f26d +PrintSeerText: ld e, a ld d, 0 ld hl, SeerTexts @@ -305,9 +286,8 @@ PrintSeerText: ; 4f26d ld l, a call PrintText ret -; 4f27c -SeerTexts: ; 4f27c +SeerTexts: dw SeerIntroText dw SeerCantTellText dw SeerMetAtText @@ -316,7 +296,6 @@ SeerTexts: ; 4f27c dw SeerCancelText dw SeerEggText dw SeerLevelOnlyText -; 4f28c SeerIntroText: ; 0x4f28c ; I see all. I know all… Certainly, I know of your #MON! @@ -367,7 +346,7 @@ SeerCancelText: ; 0x4f2af ; 0x4f2b4 -SeerAdvice: ; 4f2b4 +SeerAdvice: ld a, MON_LEVEL call GetPartyParamLocation ld a, [wSeerCaughtLevel] @@ -392,9 +371,8 @@ SeerAdvice: ; 4f2b4 ld l, a call PrintText ret -; 4f2d6 -SeerAdviceTexts: ; 4f2d6 +SeerAdviceTexts: ; level, text dbw 9, SeerAdvice1 dbw 29, SeerAdvice2 @@ -402,7 +380,6 @@ SeerAdviceTexts: ; 4f2d6 dbw 89, SeerAdvice4 dbw 100, SeerAdvice5 dbw 255, SeerAdvice1 -; 4f2e8 SeerAdvice1: ; 0x4f2e8 ; Incidentally… It would be wise to raise your #MON with a little more care. @@ -435,7 +412,7 @@ SeerAdvice5: ; 0x4f2fc ; 0x4f301 -GetCaughtGender: ; 4f301 +GetCaughtGender: ld hl, MON_CAUGHTGENDER add hl, bc @@ -458,4 +435,3 @@ GetCaughtGender: ; 4f301 .genderless ld c, CAUGHT_BY_UNKNOWN ret -; 4f31c diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm index 6e33d376cff..2d4ee28c504 100644 --- a/engine/events/pokecenter_pc.asm +++ b/engine/events/pokecenter_pc.asm @@ -1,4 +1,4 @@ -PokemonCenterPC: ; 1559a +PokemonCenterPC: call PC_CheckPartyForPokemon ret c call PC_PlayBootSound @@ -97,9 +97,8 @@ PCPC_TURN_OFF EQU 4 ret z ld a, 2 ; postgame ret -; 15650 -PC_CheckPartyForPokemon: ; 15650 +PC_CheckPartyForPokemon: ld a, [wPartyCount] and a ret nz @@ -116,16 +115,15 @@ PC_CheckPartyForPokemon: ; 15650 db "@" ; 0x15668 -BillsPC: ; 15668 +BillsPC: call PC_PlayChoosePCSound ld hl, PokecenterPCText_AccessedBillsPC call PC_DisplayText farcall _BillsPC and a ret -; 15679 (5:5679) -PlayersPC: ; 15679 +PlayersPC: call PC_PlayChoosePCSound ld hl, PokecenterPCText_AccessedOwnPC call PC_DisplayText @@ -133,61 +131,56 @@ PlayersPC: ; 15679 call _PlayersPC and a ret -; 15689 -OaksPC: ; 15689 +OaksPC: call PC_PlayChoosePCSound ld hl, PokecenterPCText_AccessedOaksPC call PC_DisplayText farcall ProfOaksPC and a ret -; 1569a -HallOfFamePC: ; 1569a +HallOfFamePC: call PC_PlayChoosePCSound call FadeToMenu farcall _HallOfFamePC call CloseSubmenu and a ret -; 156ab -TurnOffPC: ; 156ab +TurnOffPC: ld hl, PokecenterPCText_LinkClosed call PrintText scf ret -; 156b3 -PC_PlayBootSound: ; 156b3 +PC_PlayBootSound: ld de, SFX_BOOT_PC jr PC_WaitPlaySFX -PC_PlayShutdownSound: ; 156b8 +PC_PlayShutdownSound: ld de, SFX_SHUT_DOWN_PC call PC_WaitPlaySFX call WaitSFX ret -PC_PlayChoosePCSound: ; 156c2 +PC_PlayChoosePCSound: ld de, SFX_CHOOSE_PC_OPTION jr PC_WaitPlaySFX -PC_PlaySwapItemsSound: ; 156c7 +PC_PlaySwapItemsSound: ld de, SFX_SWITCH_POKEMON call PC_WaitPlaySFX ld de, SFX_SWITCH_POKEMON -PC_WaitPlaySFX: ; 156d0 +PC_WaitPlaySFX: push de call WaitSFX pop de call PlaySFX ret -; 156d9 -_PlayersHousePC: ; 156d9 +_PlayersHousePC: call PC_PlayBootSound ld hl, UnknownText_0x156ff call PC_DisplayText @@ -206,7 +199,6 @@ _PlayersHousePC: ; 156d9 call ClearBGPalettes ld c, $1 ret -; 156ff UnknownText_0x156ff: ; 0x156ff ; turned on the PC. @@ -214,7 +206,7 @@ UnknownText_0x156ff: ; 0x156ff db "@" ; 0x15704 -_PlayersPC: ; 15704 +_PlayersPC: ld a, b ld [wWhichIndexSet], a ld hl, UnknownText_0x157cc @@ -222,9 +214,8 @@ _PlayersPC: ; 15704 call Function15715 call ExitMenu ret -; 15715 -Function15715: ; 15715 +Function15715: xor a ld [wPCItemsCursor], a ld [wPCItemsScrollPosition], a @@ -244,7 +235,6 @@ Function15715: ; 15715 .asm_15732 call ExitMenu ret -; 15736 PlayersPCMenuData: ; 0x15736 db MENU_BACKUP_TILES ; flags @@ -305,7 +295,7 @@ PLAYERSPC_LOG_OFF EQU 6 db PLAYERSPC_LOG_OFF db -1 ; end -PC_DisplayTextWaitMenu: ; 157bb +PC_DisplayTextWaitMenu: ld a, [wOptions] push af set NO_TEXT_SCROLL, a @@ -314,7 +304,6 @@ PC_DisplayTextWaitMenu: ; 157bb pop af ld [wOptions], a ret -; 157cc UnknownText_0x157cc: ; 0x157cc ; What do you want to do? @@ -651,11 +640,10 @@ PCItemsJoypad: ; 0x15985 dba PlaceMenuItemQuantity dba UpdateItemDescription -PC_DisplayText: ; 15a20 +PC_DisplayText: call MenuTextBox call ExitMenu ret -; 15a27 PokecenterPCText_BootedUpPC: ; 0x15a27 ; turned on the PC. diff --git a/engine/events/pokepic.asm b/engine/events/pokepic.asm index e11c45f9bce..b866c4f0ddc 100644 --- a/engine/events/pokepic.asm +++ b/engine/events/pokepic.asm @@ -1,4 +1,4 @@ -Pokepic:: ; 244e3 +Pokepic:: ld hl, PokepicMenuHeader call CopyMenuHeader call MenuBox @@ -27,7 +27,7 @@ Pokepic:: ; 244e3 call WaitBGMap ret -ClosePokepic:: ; 24528 +ClosePokepic:: ld hl, PokepicMenuHeader call CopyMenuHeader call ClearMenuBoxInterior diff --git a/engine/events/pokerus/apply_pokerus_tick.asm b/engine/events/pokerus/apply_pokerus_tick.asm index e632fbfe4ac..223fe0147f9 100644 --- a/engine/events/pokerus/apply_pokerus_tick.asm +++ b/engine/events/pokerus/apply_pokerus_tick.asm @@ -1,4 +1,4 @@ -ApplyPokerusTick: ; 13988 +ApplyPokerusTick: ; decreases all pokemon's pokerus counter by b. if the lower nybble reaches zero, the pokerus is cured. ld hl, wPartyMon1PokerusStatus ; wPartyMon1 + MON_PKRS ld a, [wPartyCount] diff --git a/engine/events/pokerus/check_pokerus.asm b/engine/events/pokerus/check_pokerus.asm index c739c59c5b5..201a3713021 100644 --- a/engine/events/pokerus/check_pokerus.asm +++ b/engine/events/pokerus/check_pokerus.asm @@ -1,4 +1,4 @@ -_CheckPokerus: ; 4d860 +_CheckPokerus: ; Return carry if a monster in your party has Pokerus ; Get number of monsters to iterate over diff --git a/engine/events/pokerus/pokerus.asm b/engine/events/pokerus/pokerus.asm index 5728cb181e2..a6764e3b552 100644 --- a/engine/events/pokerus/pokerus.asm +++ b/engine/events/pokerus/pokerus.asm @@ -1,4 +1,4 @@ -GivePokerusAndConvertBerries: ; 2ed44 +GivePokerusAndConvertBerries: call ConvertBerriesToBerryJuice ld hl, wPartyMon1PokerusStatus ld a, [wPartyCount] @@ -121,7 +121,7 @@ GivePokerusAndConvertBerries: ; 2ed44 ld [hl], a ret -ConvertBerriesToBerryJuice: ; 2ede6 +ConvertBerriesToBerryJuice: ; If we haven't been to Goldenrod City at least once, ; prevent Shuckle from turning held Berry into Berry Juice. ld hl, wStatusFlags2 diff --git a/engine/events/print_photo.asm b/engine/events/print_photo.asm index d8350a530c9..524533abc33 100644 --- a/engine/events/print_photo.asm +++ b/engine/events/print_photo.asm @@ -1,4 +1,4 @@ -PhotoStudio: ; 16dc7 +PhotoStudio: ld hl, .Text_AskWhichMon call PrintText farcall SelectMonFromParty @@ -28,7 +28,6 @@ PhotoStudio: ; 16dc7 .print_text call PrintText ret -; 16e04 .Text_AskWhichMon: ; 0x16e04 ; Which #MON should I photo- graph? diff --git a/engine/events/print_unown.asm b/engine/events/print_unown.asm index f8fa52af399..ed7087e352f 100644 --- a/engine/events/print_unown.asm +++ b/engine/events/print_unown.asm @@ -1,4 +1,4 @@ -_UnownPrinter: ; 16be4 +_UnownPrinter: ld a, [wUnownDex] and a ret z @@ -94,9 +94,8 @@ _UnownPrinter: ; 16be4 ld [hInMenu], a call ReturnToMapFromSubmenu ret -; 16ca0 -.LeftRight: ; 16ca0 +.LeftRight: ld a, [hJoyLast] and D_RIGHT jr nz, .press_right @@ -127,9 +126,8 @@ _UnownPrinter: ; 16be4 .return call .UpdateUnownFrontpic ret -; 16cc8 -.UpdateUnownFrontpic: ; 16cc8 +.UpdateUnownFrontpic: ld a, [wJumptableIndex] cp 26 jr z, .vacant @@ -151,7 +149,7 @@ _UnownPrinter: ; 16be4 farcall RotateUnownFrontpic ret -.Load2bppToSRAM: ; 16cff +.Load2bppToSRAM: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -194,7 +192,6 @@ _UnownPrinter: ; 16be4 ld c, 20 call DelayFrames ret -; 16d57 AlphRuinsStampString: db " ALPH RUINS STAMP@" @@ -211,15 +208,13 @@ UnownDexMenuString: UnownDexVacantString: db "VACANT@" -; 16d9c -UnownDexATile: ; 16d9c +UnownDexATile: INCBIN "gfx/printer/bold_a.1bpp" -UnownDexBTile: ; 16da4 +UnownDexBTile: INCBIN "gfx/printer/bold_b.1bpp" -; 16dac -PlaceUnownPrinterFrontpic: ; 16dac +PlaceUnownPrinterFrontpic: hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " @@ -230,4 +225,3 @@ PlaceUnownPrinterFrontpic: ; 16dac lb bc, 7, 7 predef PlaceGraphic ret -; 16dc7 diff --git a/engine/events/print_unown_2.asm b/engine/events/print_unown_2.asm index a2c1f47e365..02f3fadd9c1 100644 --- a/engine/events/print_unown_2.asm +++ b/engine/events/print_unown_2.asm @@ -1,4 +1,4 @@ -RotateUnownFrontpic: ; e0000 +RotateUnownFrontpic: ; something to do with Unown printer push de xor a ; sScratch @@ -43,7 +43,7 @@ RotateUnownFrontpic: ; e0000 call CloseSRAM ret -.Copy: ; e004e +.Copy: ld c, $10 .loop_copy ld a, [hli] @@ -53,7 +53,7 @@ RotateUnownFrontpic: ; e0000 jr nz, .loop_copy ret -.Rotate: ; e0057 +.Rotate: ld hl, wd012 ld e, %10000000 ld d, 8 @@ -75,7 +75,7 @@ RotateUnownFrontpic: ; e0000 jr nz, .loop_decompress ret -.CountSetBit: ; e0078 +.CountSetBit: ld b, 0 ld c, 8 .loop_count @@ -107,5 +107,5 @@ y = y + 1 endr ENDM -UnownPrinter_GBPrinterRectangle: ; e008b +UnownPrinter_GBPrinterRectangle: gbprinterrect 7, 7 diff --git a/engine/events/sacred_ash.asm b/engine/events/sacred_ash.asm index 2cb5e37a119..cf1570ee4a4 100644 --- a/engine/events/sacred_ash.asm +++ b/engine/events/sacred_ash.asm @@ -1,5 +1,5 @@ -_SacredAsh: ; 507e6 +_SacredAsh: ld a, $0 ld [wItemEffectSucceeded], a call CheckAnyFaintedMon @@ -10,9 +10,8 @@ _SacredAsh: ; 507e6 ld a, $1 ld [wItemEffectSucceeded], a ret -; 507fb -CheckAnyFaintedMon: ; 507fb +CheckAnyFaintedMon: ld de, PARTYMON_STRUCT_LENGTH ld bc, wPartySpecies ld hl, wPartyMon1HP @@ -46,7 +45,6 @@ CheckAnyFaintedMon: ; 507fb pop af scf ret -; 50821 SacredAshScript: ; 0x50821 special HealParty diff --git a/engine/events/shuckle.asm b/engine/events/shuckle.asm index 99fcd7924c8..6ac6eeb0823 100644 --- a/engine/events/shuckle.asm +++ b/engine/events/shuckle.asm @@ -1,6 +1,6 @@ MANIA_OT_ID EQU 00518 -GiveShuckle: ; 7305 +GiveShuckle: ; Adding to the party. xor a @@ -71,7 +71,7 @@ SpecialShuckleOT: SpecialShuckleNick: db "SHUCKIE@" -ReturnShuckle: ; 737e +ReturnShuckle: farcall SelectMonFromParty jr c, .refused diff --git a/engine/events/specials.asm b/engine/events/specials.asm index 533f59520aa..65c353d0e48 100644 --- a/engine/events/specials.asm +++ b/engine/events/specials.asm @@ -1,4 +1,4 @@ -Special:: ; c01b +Special:: ; Run script special de. ld hl, SpecialsPointers add hl, de @@ -12,22 +12,19 @@ Special:: ; c01b ld a, b rst FarCall ret -; c029 INCLUDE "data/special_pointers.asm" -DummySpecial_c224: ; c224 +DummySpecial_c224: ret -; c225 -SetPlayerPalette: ; c225 +SetPlayerPalette: ld a, [wScriptVar] ld d, a farcall _SetPlayerPalette ret -; c230 -GameCornerPrizeMonCheckDex: ; c230 +GameCornerPrizeMonCheckDex: ld a, [wScriptVar] dec a call CheckCaughtMon @@ -41,53 +38,50 @@ GameCornerPrizeMonCheckDex: ; c230 farcall NewPokedexEntry call ExitAllMenus ret -; c252 -UnusedSetSeenMon: ; c252 +UnusedSetSeenMon: ld a, [wScriptVar] dec a call SetSeenMon ret -; c25a -FindPartyMonAboveLevel: ; c25a +FindPartyMonAboveLevel: ld a, [wScriptVar] ld b, a farcall _FindPartyMonAboveLevel jr z, FoundNone jr FoundOne -FindPartyMonAtLeastThatHappy: ; c268 +FindPartyMonAtLeastThatHappy: ld a, [wScriptVar] ld b, a farcall _FindPartyMonAtLeastThatHappy jr z, FoundNone jr FoundOne -FindPartyMonThatSpecies: ; c276 +FindPartyMonThatSpecies: ld a, [wScriptVar] ld b, a farcall _FindPartyMonThatSpecies jr z, FoundNone jr FoundOne -FindPartyMonThatSpeciesYourTrainerID: ; c284 +FindPartyMonThatSpeciesYourTrainerID: ld a, [wScriptVar] ld b, a farcall _FindPartyMonThatSpeciesYourTrainerID jr z, FoundNone jr FoundOne -FoundOne: ; c292 +FoundOne: ld a, TRUE ld [wScriptVar], a ret -FoundNone: ; c298 +FoundNone: xor a ld [wScriptVar], a ret -; c29d NameRival: ; 0xc29d ld b, $2 ; rival @@ -103,42 +97,37 @@ NameRival: ; 0xc29d db "SILVER@" ; 0xc2b9 -NameRater: ; c2b9 +NameRater: farcall _NameRater ret -; c2c0 -OverworldTownMap: ; c2c0 +OverworldTownMap: call FadeToMenu farcall _TownMap call ExitAllMenus ret -; c2cd -UnownPrinter: ; c2cd +UnownPrinter: call FadeToMenu farcall _UnownPrinter call ExitAllMenus ret -; c2da -DisplayLinkRecord: ; c2da +DisplayLinkRecord: call FadeToMenu farcall _DisplayLinkRecord call ExitAllMenus ret -; c2e7 -PlayersHousePC: ; c2e7 +PlayersHousePC: xor a ld [wScriptVar], a farcall _PlayersHousePC ld a, c ld [wScriptVar], a ret -; c2f6 -CheckMysteryGift: ; c2f6 +CheckMysteryGift: ld a, BANK(sMysteryGiftItem) call GetSRAMBank ld a, [sMysteryGiftItem] @@ -150,9 +139,8 @@ CheckMysteryGift: ; c2f6 ld [wScriptVar], a call CloseSRAM ret -; c309 -GetMysteryGiftItem: ; c309 +GetMysteryGiftItem: ld a, BANK(sMysteryGiftItem) call GetSRAMBank ld a, [sMysteryGiftItem] @@ -179,7 +167,6 @@ GetMysteryGiftItem: ; c309 xor a ld [wScriptVar], a ret -; c345 .ReceiveItemText: ; 0xc345 ; received item @@ -187,57 +174,51 @@ GetMysteryGiftItem: ; c309 db "@" ; 0xc34a -BugContestJudging: ; c34a +BugContestJudging: farcall _BugContestJudging ld a, b ld [wScriptVar], a ret -; c355 -MapRadio: ; c355 +MapRadio: ld a, [wScriptVar] ld e, a farcall PlayRadio ret -; c360 -UnownPuzzle: ; c360 +UnownPuzzle: call FadeToMenu farcall _UnownPuzzle ld a, [wSolvedUnownPuzzle] ld [wScriptVar], a call ExitAllMenus ret -; c373 -SlotMachine: ; c373 +SlotMachine: call CheckCoinsAndCoinCase ret c ld a, BANK(_SlotMachine) ld hl, _SlotMachine call StartGameCornerGame ret -; c380 -CardFlip: ; c380 +CardFlip: call CheckCoinsAndCoinCase ret c ld a, BANK(_CardFlip) ld hl, _CardFlip call StartGameCornerGame ret -; c38d -DummyNonfunctionalGameCornerGame: ; c38d +DummyNonfunctionalGameCornerGame: call CheckCoinsAndCoinCase ret c ld a, BANK(_DummyGame) ld hl, _DummyGame call StartGameCornerGame ret -; c39a -StartGameCornerGame: ; c39a +StartGameCornerGame: call FarQueueScript call FadeToMenu ld hl, wQueuedScriptBank @@ -250,9 +231,8 @@ StartGameCornerGame: ; c39a rst FarCall call ExitAllMenus ret -; c3ae -CheckCoinsAndCoinCase: ; c3ae +CheckCoinsAndCoinCase: ld hl, wCoins ld a, [hli] or [hl] @@ -276,7 +256,6 @@ CheckCoinsAndCoinCase: ; c3ae call PrintText scf ret -; c3d1 .NoCoinsText: ; 0xc3d1 ; You have no coins. @@ -290,13 +269,12 @@ CheckCoinsAndCoinCase: ; c3ae db "@" ; 0xc3db -ClearBGPalettesBufferScreen: ; c3db +ClearBGPalettesBufferScreen: call ClearBGPalettes call BufferScreen ret -; c3e2 -ScriptReturnCarry: ; c3e2 +ScriptReturnCarry: jr c, .carry xor a ld [wScriptVar], a @@ -305,23 +283,20 @@ ScriptReturnCarry: ; c3e2 ld a, 1 ld [wScriptVar], a ret -; c3ef -UnusedCheckUnusedTwoDayTimer: ; c3ef +UnusedCheckUnusedTwoDayTimer: farcall CheckUnusedTwoDayTimer ld a, [wUnusedTwoDayTimer] ld [wScriptVar], a ret -; c3fc -ActivateFishingSwarm: ; c3fc +ActivateFishingSwarm: ld a, [wScriptVar] ld [wFishingSwarmFlag], a ret -; c403 -StoreSwarmMapIndices:: ; c403 +StoreSwarmMapIndices:: ld a, c and a jr nz, .yanma @@ -338,27 +313,23 @@ StoreSwarmMapIndices:: ; c403 ld a, e ld [wYanmaMapNumber], a ret -; c419 -CheckPokerus: ; c419 +CheckPokerus: ; Check if a monster in your party has Pokerus farcall _CheckPokerus jp ScriptReturnCarry -; c422 -ResetLuckyNumberShowFlag: ; c422 +ResetLuckyNumberShowFlag: farcall RestartLuckyNumberCountdown ld hl, wLuckyNumberShowFlag res LUCKYNUMBERSHOW_GAME_OVER_F, [hl] farcall LoadOrRegenerateLuckyIDNumber ret -; c434 -CheckLuckyNumberShowFlag: ; c434 +CheckLuckyNumberShowFlag: farcall _CheckLuckyNumberShowFlag jp ScriptReturnCarry -; c43d SnorlaxAwake: ; 0xc43d ; Check if the Poké Flute channel is playing, and if the player is standing @@ -411,13 +382,12 @@ SnorlaxAwake: ; 0xc43d db -1 -PlayCurMonCry: ; c472 +PlayCurMonCry: ld a, [wCurPartySpecies] jp PlayMonCry -; c478 -GameboyCheck: ; c478 +GameboyCheck: ld a, [hCGB] and a jr nz, .cgb @@ -439,7 +409,7 @@ GameboyCheck: ; c478 ret -FadeOutMusic: ; c48f +FadeOutMusic: ld a, LOW(MUSIC_NONE) ld [wMusicFadeID], a ld a, HIGH(MUSIC_NONE) @@ -447,21 +417,18 @@ FadeOutMusic: ; c48f ld a, $2 ld [wMusicFade], a ret -; c49f -Diploma: ; c49f +Diploma: call FadeToMenu farcall _Diploma call ExitAllMenus ret -; c4ac -PrintDiploma: ; c4ac +PrintDiploma: call FadeToMenu farcall _PrintDiploma call ExitAllMenus ret -; c4b9 TrainerHouse: ; 0xc4b9 ld a, BANK(sMysteryGiftTrainerHouseFlag) diff --git a/engine/events/squirtbottle.asm b/engine/events/squirtbottle.asm index f6ab00951fe..74fd4d99163 100644 --- a/engine/events/squirtbottle.asm +++ b/engine/events/squirtbottle.asm @@ -1,4 +1,4 @@ -_Squirtbottle: ; 50730 +_Squirtbottle: ld hl, .SquirtbottleScript call QueueScript ld a, $1 @@ -44,4 +44,3 @@ _Squirtbottle: ; 50730 xor a ld [wScriptVar], a ret -; 50779 diff --git a/engine/events/std_collision.asm b/engine/events/std_collision.asm index 775f7c10ce1..320953cf952 100644 --- a/engine/events/std_collision.asm +++ b/engine/events/std_collision.asm @@ -1,4 +1,4 @@ -CheckFacingTileForStdScript:: ; 1365b +CheckFacingTileForStdScript:: ; Checks to see if the tile you're facing has a std script associated with it. If so, executes the script and returns carry. ld a, c ld de, 3 diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm index 6e873a7c74d..0831f92e0da 100644 --- a/engine/events/std_scripts.asm +++ b/engine/events/std_scripts.asm @@ -1907,9 +1907,8 @@ HappinessCheckScript: closetext end -Movement_ContestResults_WalkAfterWarp: ; bcea1 +Movement_ContestResults_WalkAfterWarp: step RIGHT step DOWN turn_head UP step_end -; bcea5 diff --git a/engine/events/sweet_scent.asm b/engine/events/sweet_scent.asm index 509d9775d85..7c6df4948fc 100644 --- a/engine/events/sweet_scent.asm +++ b/engine/events/sweet_scent.asm @@ -1,10 +1,9 @@ -SweetScentFromMenu: ; 506bc +SweetScentFromMenu: ld hl, .SweetScent call QueueScript ld a, $1 ld [wFieldMoveSucceeded], a ret -; 506c8 .SweetScent: ; 0x506c8 reloadmappart @@ -33,7 +32,7 @@ SweetScentNothing: ; 0x506e9 end ; 0x506ef -SweetScentEncounter: ; 506ef +SweetScentEncounter: farcall CanUseSweetScent jr nc, .no_battle ld hl, wStatusFlags2 @@ -60,7 +59,6 @@ SweetScentEncounter: ; 506ef ld [wScriptVar], a ld [wBattleType], a ret -; 50726 UnknownText_0x50726: ; 0x50726 ; used SWEET SCENT! diff --git a/engine/events/treemons.asm b/engine/events/treemons.asm index 6d55004f48e..1fdeceb0aae 100644 --- a/engine/events/treemons.asm +++ b/engine/events/treemons.asm @@ -1,4 +1,4 @@ -TreeMonEncounter: ; b81ea +TreeMonEncounter: farcall StubbedTrainerRankings_TreeEncounters xor a @@ -25,9 +25,8 @@ TreeMonEncounter: ; b81ea xor a ld [wScriptVar], a ret -; b8219 -RockMonEncounter: ; b8219 +RockMonEncounter: xor a ld [wTempWildMonSpecies], a @@ -54,11 +53,10 @@ RockMonEncounter: ; b8219 .no_battle xor a ret -; b823e db $05 ; ???? -GetTreeMonSet: ; b823f +GetTreeMonSet: ; Return carry and treemon set in a ; if the current map is in table hl. ld a, [wMapNumber] @@ -93,11 +91,10 @@ GetTreeMonSet: ; b823f ld a, [hl] scf ret -; b825e INCLUDE "data/wild/treemon_maps.asm" -GetTreeMons: ; b82d2 +GetTreeMons: ; Return the address of TreeMon table a in hl. ; Return nc if table a doesn't exist. @@ -123,11 +120,10 @@ GetTreeMons: ; b82d2 .quit xor a ret -; b82e8 INCLUDE "data/wild/treemons.asm" -GetTreeMon: ; b83e5 +GetTreeMon: push hl call GetTreeScore pop hl @@ -168,9 +164,8 @@ GetTreeMon: ; b83e5 jr nz, .skip call SelectTreeMon ret -; b841f -SelectTreeMon: ; b841f +SelectTreeMon: ; Read a TreeMons table and pick one monster at random. ld a, 100 @@ -195,14 +190,13 @@ SelectTreeMon: ; b841f scf ret -NoTreeMon: ; b843b +NoTreeMon: xor a ld [wTempWildMonSpecies], a ld [wCurPartyLevel], a ret -; b8443 -GetTreeScore: ; b8443 +GetTreeScore: call .CoordScore ld [wBuffer1], a call .OTIDScore @@ -228,9 +222,8 @@ GetTreeScore: ; b8443 .rare ld a, TREEMON_SCORE_RARE ret -; b8466 -.CoordScore: ; b8466 +.CoordScore: call GetFacingTileCoord ld hl, 0 ld c, e @@ -269,9 +262,8 @@ GetTreeScore: ; b8443 ld a, [hQuotient + 3] ret -; b849d -.OTIDScore: ; b849d +.OTIDScore: ld a, [wPlayerID] ld [hDividend], a ld a, [wPlayerID + 1] @@ -282,4 +274,3 @@ GetTreeScore: ; b8443 call Divide ld a, [hQuotient + 3] ret -; b84b3 diff --git a/engine/events/unown_walls.asm b/engine/events/unown_walls.asm index 64558167a7d..4b4aaaf875e 100644 --- a/engine/events/unown_walls.asm +++ b/engine/events/unown_walls.asm @@ -11,7 +11,7 @@ HoOhChamber: ; 0x8addb ret ; 0x8adef -OmanyteChamber: ; 8adef +OmanyteChamber: call GetMapAttributesPointer ; pointless? ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER ld b, CHECK_FLAG @@ -51,9 +51,8 @@ OmanyteChamber: ; 8adef .nope ret -; 8ae30 -SpecialAerodactylChamber: ; 8ae30 +SpecialAerodactylChamber: push de push bc @@ -79,9 +78,8 @@ SpecialAerodactylChamber: ; 8ae30 pop bc pop de ret -; 8ae4e -SpecialKabutoChamber: ; 8ae4e +SpecialKabutoChamber: push hl push de @@ -101,9 +99,8 @@ SpecialKabutoChamber: ; 8ae4e pop de pop hl ret -; 8ae68 -DisplayUnownWords: ; 8ae68 +DisplayUnownWords: ld a, [wScriptVar] ld hl, MenuHeaders_UnownWalls and a @@ -151,11 +148,10 @@ DisplayUnownWords: ; 8ae68 call PlayClickSFX call CloseWindow ret -; 8aebc INCLUDE "data/events/unown_walls.asm" -_DisplayUnownWords_FillAttr: ; 8aee9 +_DisplayUnownWords_FillAttr: ld a, [de] cp $ff ret z @@ -170,9 +166,8 @@ _DisplayUnownWords_FillAttr: ; 8aee9 inc hl inc de jr _DisplayUnownWords_FillAttr -; 8aefd -.PlaceSquare: ; 8aefd +.PlaceSquare: push hl ld [hli], a ld [hld], a @@ -183,9 +178,8 @@ _DisplayUnownWords_FillAttr: ; 8aee9 ld [hl], a pop hl ret -; 8af09 -_DisplayUnownWords_CopyWord: ; 8af09 +_DisplayUnownWords_CopyWord: push hl push de .word_loop @@ -203,9 +197,8 @@ _DisplayUnownWords_CopyWord: ; 8af09 pop de pop hl ret -; 8af1c -.ConvertChar: ; 8af1c +.ConvertChar: push hl ld a, c cp $60 @@ -264,4 +257,3 @@ _DisplayUnownWords_CopyWord: ; 8af09 ld [hl], $2 pop hl ret -; 8af6b diff --git a/engine/events/whiteout.asm b/engine/events/whiteout.asm index 4bf65605560..2eb24487cab 100644 --- a/engine/events/whiteout.asm +++ b/engine/events/whiteout.asm @@ -32,23 +32,21 @@ Script_Whiteout: ; 0x124ce db "@" ; 0x124fa -OverworldBGMap: ; 124fa +OverworldBGMap: call ClearPalettes call ClearScreen call WaitBGMap2 call HideSprites call RotateThreePalettesLeft ret -; 1250a -BattleBGMap: ; 1250a +BattleBGMap: ld b, SCGB_BATTLE_GRAYSCALE call GetSGBLayout call SetPalettes ret -; 12513 -HalveMoney: ; 12513 +HalveMoney: farcall StubbedTrainerRankings_WhiteOuts ; Halve the player's money. @@ -63,10 +61,9 @@ HalveMoney: ; 12513 rra ld [hl], a ret -; 12527 -GetWhiteoutSpawn: ; 12527 +GetWhiteoutSpawn: ld a, [wLastSpawnMapGroup] ld d, a ld a, [wLastSpawnMapNumber] @@ -79,4 +76,3 @@ GetWhiteoutSpawn: ; 12527 .yes ld [wDefaultSpawnpoint], a ret -; 1253d diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm index 8f5131983b0..6fb3502afff 100644 --- a/engine/games/card_flip.asm +++ b/engine/games/card_flip.asm @@ -4,13 +4,13 @@ CARDFLIP_LIGHT_ON EQU $f5 CARDFLIP_DECK_SIZE EQU 4 * 6 ; two labels below called from inside ./dummy_game.asm -Unknown_e00ed: ; e00ed (38:40ed) +Unknown_e00ed: ; Graphics for an unused Game Corner ; game were meant to be here. -ret_e00ed: ; e00ed (38:40ed) +ret_e00ed: ret -_CardFlip: ; e00ee (38:40ee) +_CardFlip: ld hl, wOptions set NO_TEXT_SCROLL, [hl] call ClearBGPalettes @@ -74,7 +74,7 @@ _CardFlip: ; e00ee (38:40ee) res 4, [hl] ret -.CardFlip: ; e0191 (38:4191) +.CardFlip: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -85,9 +85,8 @@ _CardFlip: ; e00ee (38:40ee) ld h, [hl] ld l, a jp hl -; e01a0 (38:41a0) -.Jumptable: ; e01a0 +.Jumptable: dw .AskPlayWithThree dw .DeductCoins dw .ChooseACard @@ -96,15 +95,13 @@ _CardFlip: ; e00ee (38:40ee) dw .TabulateTheResult dw .PlayAgain dw .Quit -; e01b0 -.Increment: ; e01b0 +.Increment: ld hl, wJumptableIndex inc [hl] ret -; e01b5 -.AskPlayWithThree: ; e01b5 +.AskPlayWithThree: ld hl, .PlayWithThreeCoinsText call CardFlip_UpdateCoinBalanceDisplay call YesNoBox @@ -117,7 +114,6 @@ _CardFlip: ; e00ee (38:40ee) ld a, 7 ld [wJumptableIndex], a ret -; e01cd .PlayWithThreeCoinsText: ; 0xe01cd ; Play with three coins? @@ -125,7 +121,7 @@ _CardFlip: ; e00ee (38:40ee) db "@" ; 0xe01d2 -.DeductCoins: ; e01d2 +.DeductCoins: ld a, [wCoins] ld h, a ld a, [wCoins + 1] @@ -159,7 +155,6 @@ _CardFlip: ; e00ee (38:40ee) call WaitSFX call .Increment ret -; e0212 .NotEnoughCoinsText: ; 0xe0212 ; Not enough coins… @@ -167,7 +162,7 @@ _CardFlip: ; e00ee (38:40ee) db "@" ; 0xe0217 -.ChooseACard: ; e0217 +.ChooseACard: xor a ld [hBGMapMode], a hlcoord 0, 0 @@ -238,7 +233,6 @@ _CardFlip: ; e00ee (38:40ee) ld [wCardFlipWhichCard], a call .Increment ret -; e02b2 .ChooseACardText: ; 0xe02b2 ; Choose a card. @@ -246,7 +240,7 @@ _CardFlip: ; e00ee (38:40ee) db "@" ; 0xe02b7 -.PlaceYourBet: ; e02b7 +.PlaceYourBet: ld hl, .PlaceYourBetText call CardFlip_UpdateCoinBalanceDisplay .betloop @@ -262,7 +256,6 @@ _CardFlip: ; e00ee (38:40ee) .betdone call .Increment ret -; e02d5 .PlaceYourBetText: ; 0xe02d5 ; Place your bet. @@ -270,7 +263,7 @@ _CardFlip: ; e00ee (38:40ee) db "@" ; 0xe02da -.CheckTheCard: ; e02da +.CheckTheCard: xor a ld [hVBlankCounter], a call CardFlip_UpdateCursorOAM @@ -298,16 +291,14 @@ _CardFlip: ; e00ee (38:40ee) call WaitBGMap2 call .Increment ret -; e0314 -.TabulateTheResult: ; e0314 +.TabulateTheResult: call CardFlip_CheckWinCondition call WaitPressAorB_BlinkCursor call .Increment ret -; e031e -.PlayAgain: ; e031e +.PlayAgain: call ClearSprites ld hl, .PlayAgainText call CardFlip_UpdateCoinBalanceDisplay @@ -337,7 +328,6 @@ _CardFlip: ; e00ee (38:40ee) ld a, 1 ld [wJumptableIndex], a ret -; e0356 .PlayAgainText: ; 0xe0356 ; Want to play again? @@ -351,13 +341,12 @@ _CardFlip: ; e00ee (38:40ee) db "@" ; 0xe0360 -.Quit: ; e0360 +.Quit: ld hl, wJumptableIndex set 7, [hl] ret -; e0366 -CardFlip_ShuffleDeck: ; e0366 +CardFlip_ShuffleDeck: ld hl, wDeck ld bc, CARDFLIP_DECK_SIZE xor a @@ -384,9 +373,8 @@ CardFlip_ShuffleDeck: ; e0366 ld bc, CARDFLIP_DECK_SIZE call ByteFill ret -; e0398 -CollapseCursorPosition: ; e0398 +CollapseCursorPosition: ld hl, 0 ld bc, 6 ld a, [wCardFlipCursorY] @@ -396,9 +384,8 @@ CollapseCursorPosition: ; e0398 ld c, a add hl, bc ret -; e03ac -GetCoordsOfChosenCard: ; e03ac +GetCoordsOfChosenCard: ld a, [wCardFlipWhichCard] and a jr nz, .BottomCard @@ -412,27 +399,24 @@ GetCoordsOfChosenCard: ; e03ac .done ret -; e03c1 -PlaceCardFaceDown: ; e03c1 +PlaceCardFaceDown: xor a ld [hBGMapMode], a ld de, .FaceDownCardTilemap lb bc, 6, 5 call CardFlip_CopyToBox ret -; e03ce -.FaceDownCardTilemap: ; e03ce +.FaceDownCardTilemap: db $08, $09, $09, $09, $0a db $0b, $28, $2b, $28, $0c db $0b, $2c, $2d, $2e, $0c db $0b, $2f, $30, $31, $0c db $0b, $32, $33, $34, $0c db $0d, $0e, $0e, $0e, $0f -; e03ec -CardFlip_DisplayCardFaceUp: ; e03ec +CardFlip_DisplayCardFaceUp: xor a ld [hBGMapMode], a push hl @@ -493,18 +477,16 @@ CardFlip_DisplayCardFaceUp: ; e03ec lb bc, 6, 5 call CardFlip_FillBox ret -; e043b -.FaceUpCardTilemap: ; e043b +.FaceUpCardTilemap: db $18, $19, $19, $19, $1a db $1b, $35, $7f, $7f, $1c db $0b, $28, $28, $28, $0c db $0b, $28, $28, $28, $0c db $0b, $28, $28, $28, $0c db $1d, $1e, $1e, $1e, $1f -; e0459 -.Deck: ; e0459 +.Deck: ; level, pic anchor (3x3) db "1", $4e, "1", $57, "1", $69, "1", $60 db "2", $4e, "2", $57, "2", $69, "2", $60 @@ -512,9 +494,8 @@ CardFlip_DisplayCardFaceUp: ; e03ec db "4", $4e, "4", $57, "4", $69, "4", $60 db "5", $4e, "5", $57, "5", $69, "5", $60 db "6", $4e, "6", $57, "6", $69, "6", $60 -; e0489 -CardFlip_UpdateCoinBalanceDisplay: ; e0489 +CardFlip_UpdateCoinBalanceDisplay: push hl hlcoord 0, 12 ld b, 4 @@ -524,9 +505,8 @@ CardFlip_UpdateCoinBalanceDisplay: ; e0489 call PrintTextBoxText call CardFlip_PrintCoinBalance ret -; e049c -CardFlip_PrintCoinBalance: ; e049c +CardFlip_PrintCoinBalance: hlcoord 9, 15 ld b, 1 ld c, 9 @@ -539,13 +519,11 @@ CardFlip_PrintCoinBalance: ; e049c lb bc, PRINTNUM_LEADINGZEROS | 2, 4 call PrintNum ret -; e04bc .CoinStr: db "COIN@" -; e04c1 -CardFlip_InitTilemap: ; e04c1 (38:44c1) +CardFlip_InitTilemap: xor a ld [hBGMapMode], a hlcoord 0, 0 @@ -560,12 +538,11 @@ CardFlip_InitTilemap: ; e04c1 (38:44c1) lb bc, 4, 18 call TextBox ret -; e04e5 (38:44e5) -CardFlip_FillGreenBox: ; e04e5 +CardFlip_FillGreenBox: ld a, $29 -CardFlip_FillBox: ; e04e7 (38:44e7) +CardFlip_FillBox: .row push bc push hl @@ -581,7 +558,7 @@ CardFlip_FillBox: ; e04e7 (38:44e7) jr nz, .row ret -CardFlip_CopyToBox: ; e04f7 (38:44f7) +CardFlip_CopyToBox: .row push bc push hl @@ -598,9 +575,8 @@ CardFlip_CopyToBox: ; e04f7 (38:44f7) dec b jr nz, .row ret -; e0509 (38:4509) -CardFlip_CopyOAM: ; e0509 +CardFlip_CopyOAM: ld de, wVirtualOAMSprite00 ld a, [hli] .loop @@ -623,9 +599,8 @@ CardFlip_CopyOAM: ; e0509 dec a jr nz, .loop ret -; e0521 -CardFlip_ShiftDigitsLeftTwoPixels: ; e0521 (38:4521) +CardFlip_ShiftDigitsLeftTwoPixels: ld de, vTiles0 tile "0" ld hl, vTiles0 tile "0" + 2 ld bc, 10 tiles - 2 @@ -635,9 +610,8 @@ CardFlip_ShiftDigitsLeftTwoPixels: ; e0521 (38:4521) ld [hli], a ld [hl], a ret -; e0534 (38:4534) -CardFlip_BlankDiscardedCardSlot: ; e0534 +CardFlip_BlankDiscardedCardSlot: xor a ld [hBGMapMode], a ld a, [wCardFlipFaceUpCard] @@ -660,18 +634,16 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 ld h, [hl] ld l, a jp hl -; e0553 -.Jumptable: ; e0553 +.Jumptable: dw .Level1 dw .Level2 dw .Level3 dw .Level4 dw .Level5 dw .Level6 -; e055f -.Level1: ; e055f +.Level1: ld hl, wDiscardPile + 4 add hl, de ld a, [hl] @@ -695,9 +667,8 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 add hl, bc ld [hl], $3d ret -; e0583 -.Level2: ; e0583 +.Level2: ld hl, wDiscardPile - 4 add hl, de ld a, [hl] @@ -721,9 +692,8 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 add hl, bc ld [hl], $3a ret -; e05a7 -.Level3: ; e05a7 +.Level3: ld hl, wDiscardPile + 4 add hl, de ld a, [hl] @@ -747,9 +717,8 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 add hl, bc ld [hl], $3d ret -; e05cb -.Level4: ; e05cb +.Level4: ld hl, wDiscardPile - 4 add hl, de ld a, [hl] @@ -773,9 +742,8 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 add hl, bc ld [hl], $3a ret -; e05ef -.Level5: ; e05ef +.Level5: ld hl, wDiscardPile + 4 add hl, de ld a, [hl] @@ -799,9 +767,8 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 add hl, bc ld [hl], $3d ret -; e0613 -.Level6: ; e0613 +.Level6: ld hl, wDiscardPile - 4 add hl, de ld a, [hl] @@ -825,9 +792,8 @@ CardFlip_BlankDiscardedCardSlot: ; e0534 add hl, bc ld [hl], $3a ret -; e0637 -CardFlip_CheckWinCondition: ; e0637 +CardFlip_CheckWinCondition: call CollapseCursorPosition add hl, hl ld de, .Jumptable @@ -836,9 +802,8 @@ CardFlip_CheckWinCondition: ; e0637 ld h, [hl] ld l, a jp hl -; e0643 -.Jumptable: ; e0643 +.Jumptable: dw .Impossible dw .Impossible dw .PikaJiggly @@ -894,233 +859,227 @@ CardFlip_CheckWinCondition: ; e0637 dw .JigglySix dw .PoliSix dw .OddSix -; e06a3 -.Impossible: ; e06a3 +.Impossible: jp .Lose -; e06a6 -.PikaJiggly: ; e06a6 +.PikaJiggly: ld a, [wCardFlipFaceUpCard] and $2 jp nz, .Lose jr .WinSix -.PoliOddish: ; e06b0 +.PoliOddish: ld a, [wCardFlipFaceUpCard] and $2 jr nz, .WinSix jp .Lose -.WinSix: ; e06ba +.WinSix: ld c, $6 ld de, SFX_2ND_PLACE jp .Payout -; e06c2 -.OneTwo: ; e06c2 +.OneTwo: ld a, [wCardFlipFaceUpCard] and $18 jr z, .WinNine jp .Lose -.ThreeFour: ; e06cc +.ThreeFour: ld a, [wCardFlipFaceUpCard] and $18 cp $8 jr z, .WinNine jp .Lose -.FiveSix: ; e06d8 +.FiveSix: ld a, [wCardFlipFaceUpCard] and $18 cp $10 jr z, .WinNine jp .Lose -.WinNine: ; e06e4 +.WinNine: ld c, $9 ld de, SFX_2ND_PLACE jp .Payout -; e06ec -.Pikachu: ; e06ec +.Pikachu: ld a, [wCardFlipFaceUpCard] and $3 jr z, .WinTwelve jp .Lose -.Jigglypuff: ; e06f6 +.Jigglypuff: ld a, [wCardFlipFaceUpCard] and $3 cp $1 jr z, .WinTwelve jp .Lose -.Poliwag: ; e0702 +.Poliwag: ld a, [wCardFlipFaceUpCard] and $3 cp $2 jr z, .WinTwelve jp .Lose -.Oddish: ; e070e +.Oddish: ld a, [wCardFlipFaceUpCard] and $3 cp $3 jr z, .WinTwelve jp .Lose -.WinTwelve: ; e071a +.WinTwelve: ld c, $c ld de, SFX_2ND_PLACE jp .Payout -; e0722 -.One: ; e0722 +.One: ld a, [wCardFlipFaceUpCard] and $1c jr z, .WinEighteen jp .Lose -.Two: ; e072c +.Two: ld a, [wCardFlipFaceUpCard] and $1c cp $4 jr z, .WinEighteen jp .Lose -.Three: ; e0738 +.Three: ld a, [wCardFlipFaceUpCard] and $1c cp $8 jr z, .WinEighteen jp .Lose -.Four: ; e0744 +.Four: ld a, [wCardFlipFaceUpCard] and $1c cp $c jr z, .WinEighteen jp .Lose -.Five: ; e0750 +.Five: ld a, [wCardFlipFaceUpCard] and $1c cp $10 jr z, .WinEighteen jp .Lose -.Six: ; e075c +.Six: ld a, [wCardFlipFaceUpCard] and $1c cp $14 jr z, .WinEighteen jp .Lose -.WinEighteen: ; e0768 +.WinEighteen: ld c, $12 ld de, SFX_2ND_PLACE jp .Payout -; e0770 -.PikaOne: ; e0770 +.PikaOne: ld e, $0 jr .CheckWin72 -.JigglyOne: ; e0774 +.JigglyOne: ld e, $1 jr .CheckWin72 -.PoliOne: ; e0778 +.PoliOne: ld e, $2 jr .CheckWin72 -.OddOne: ; e077c +.OddOne: ld e, $3 jr .CheckWin72 -.PikaTwo: ; e0780 +.PikaTwo: ld e, $4 jr .CheckWin72 -.JigglyTwo: ; e0784 +.JigglyTwo: ld e, $5 jr .CheckWin72 -.PoliTwo: ; e0788 +.PoliTwo: ld e, $6 jr .CheckWin72 -.OddTwo: ; e078c +.OddTwo: ld e, $7 jr .CheckWin72 -.PikaThree: ; e0790 +.PikaThree: ld e, $8 jr .CheckWin72 -.JigglyThree: ; e0794 +.JigglyThree: ld e, $9 jr .CheckWin72 -.PoliThree: ; e0798 +.PoliThree: ld e, $a jr .CheckWin72 -.OddThree: ; e079c +.OddThree: ld e, $b jr .CheckWin72 -.PikaFour: ; e07a0 +.PikaFour: ld e, $c jr .CheckWin72 -.JigglyFour: ; e07a4 +.JigglyFour: ld e, $d jr .CheckWin72 -.PoliFour: ; e07a8 +.PoliFour: ld e, $e jr .CheckWin72 -.OddFour: ; e07ac +.OddFour: ld e, $f jr .CheckWin72 -.PikaFive: ; e07b0 +.PikaFive: ld e, $10 jr .CheckWin72 -.JigglyFive: ; e07b4 +.JigglyFive: ld e, $11 jr .CheckWin72 -.PoliFive: ; e07b8 +.PoliFive: ld e, $12 jr .CheckWin72 -.OddFive: ; e07bc +.OddFive: ld e, $13 jr .CheckWin72 -.PikaSix: ; e07c0 +.PikaSix: ld e, $14 jr .CheckWin72 -.JigglySix: ; e07c4 +.JigglySix: ld e, $15 jr .CheckWin72 -.PoliSix: ; e07c8 +.PoliSix: ld e, $16 jr .CheckWin72 -.OddSix: ; e07cc +.OddSix: ld e, $17 -.CheckWin72: ; e07ce +.CheckWin72: ld a, [wCardFlipFaceUpCard] cp e jr nz, .Lose @@ -1128,7 +1087,7 @@ CardFlip_CheckWinCondition: ; e0637 ld de, SFX_2ND_PLACE jr .Payout -.Lose: ; e07db +.Lose: ld de, SFX_WRONG call PlaySFX ld hl, .Text_Darn @@ -1136,7 +1095,7 @@ CardFlip_CheckWinCondition: ; e0637 call WaitSFX ret -.Payout: ; e07eb +.Payout: push bc push de ld hl, .Text_Yeah @@ -1159,7 +1118,6 @@ CardFlip_CheckWinCondition: ; e0637 dec c jr nz, .loop ret -; e0811 .Text_Yeah: ; 0xe0811 ; Yeah! @@ -1173,7 +1131,7 @@ CardFlip_CheckWinCondition: ; e0637 db "@" ; 0xe081b -.AddCoinPlaySFX: ; e081b +.AddCoinPlaySFX: ld a, [wCoins] ld h, a ld a, [wCoins + 1] @@ -1186,9 +1144,8 @@ CardFlip_CheckWinCondition: ; e0637 ld de, SFX_PAY_DAY call PlaySFX ret -; e0833 -.IsCoinCaseFull: ; e0833 +.IsCoinCaseFull: ld a, [wCoins] cp HIGH(MAX_COINS) jr c, .less @@ -1207,16 +1164,14 @@ CardFlip_CheckWinCondition: ; e0637 .less and a ret -; e0849 -PlaceOAMCardBorder: ; e0849 +PlaceOAMCardBorder: call GetCoordsOfChosenCard ld hl, .SpriteData call CardFlip_CopyOAM ret -; e0853 -.SpriteData: ; e0853 +.SpriteData: db 18 dsprite 0, 0, 0, 0, $04, 0 dsprite 0, 0, 1, 0, $06, 0 @@ -1241,9 +1196,8 @@ PlaceOAMCardBorder: ; e0849 dsprite 5, 0, 2, 0, $06, 0 | Y_FLIP dsprite 5, 0, 3, 0, $06, 0 | Y_FLIP dsprite 5, 0, 4, 0, $04, 0 | X_FLIP | Y_FLIP -; e089c -ChooseCard_HandleJoypad: ; e089c +ChooseCard_HandleJoypad: ld hl, hJoyLast ld a, [hl] and D_LEFT @@ -1258,9 +1212,8 @@ ChooseCard_HandleJoypad: ; e089c and D_DOWN jp nz, .d_down ret -; e08b8 -.d_left ; e08b8 +.d_left ld hl, wCardFlipCursorX ld a, [wCardFlipCursorY] and a @@ -1296,9 +1249,8 @@ ChooseCard_HandleJoypad: ; e089c ld a, $1 ld [wCardFlipCursorX], a jp .play_sound -; e08ef -.d_right ; e08ef +.d_right ld hl, wCardFlipCursorX ld a, [wCardFlipCursorY] and a @@ -1319,7 +1271,7 @@ ChooseCard_HandleJoypad: ; e089c inc [hl] jr .play_sound -.d_up ; e090a +.d_up ld hl, wCardFlipCursorY ld a, [wCardFlipCursorX] and a @@ -1356,7 +1308,7 @@ ChooseCard_HandleJoypad: ; e089c ld [wCardFlipCursorX], a jr .play_sound -.d_down ; e093d +.d_down ld hl, wCardFlipCursorY ld a, [wCardFlipCursorX] and a @@ -1377,13 +1329,12 @@ ChooseCard_HandleJoypad: ; e089c inc [hl] inc [hl] -.play_sound ; e0959 +.play_sound ld de, SFX_POKEBALLS_PLACED_ON_TABLE call PlaySFX ret -; e0960 -CardFlip_UpdateCursorOAM: ; e0960 +CardFlip_UpdateCursorOAM: call ClearSprites ld a, [hCGB] and a @@ -1407,9 +1358,8 @@ CardFlip_UpdateCursorOAM: ; e0960 ld l, a call CardFlip_CopyOAM ret -; e0981 -.OAMData: ; e0981 +.OAMData: cardflip_cursor: MACRO if _NARG >= 5 dbpixel \1, \2, \3, \4 @@ -1475,9 +1425,8 @@ ENDM cardflip_cursor 15, 12, 0, 4, .SingleTile cardflip_cursor 17, 12, 0, 4, .SingleTile cardflip_cursor 19, 12, 0, 4, .SingleTile -; e0a41 -.SingleTile: ; e0a41 +.SingleTile: db 6 dsprite 0, 0, -1, 7, $00, 0 | PRIORITY dsprite 0, 0, 0, 0, $02, 0 | PRIORITY @@ -1486,7 +1435,7 @@ ENDM dsprite 0, 5, 0, 0, $02, 0 | Y_FLIP | PRIORITY dsprite 0, 5, 1, 0, $03, 0 | PRIORITY -.PokeGroup: ; e0a5a +.PokeGroup: db 26 dsprite 0, 0, -1, 7, $00, 0 | PRIORITY dsprite 0, 0, 0, 0, $02, 0 | PRIORITY @@ -1515,7 +1464,7 @@ ENDM dsprite 10, 1, 0, 0, $02, 0 | Y_FLIP | PRIORITY dsprite 10, 1, 1, 0, $03, 0 | PRIORITY -.NumGroup: ; e0ac3 +.NumGroup: db 20 dsprite 0, 0, -1, 7, $00, 0 | PRIORITY dsprite 0, 0, 0, 0, $02, 0 | PRIORITY @@ -1538,7 +1487,7 @@ ENDM dsprite 0, 5, 7, 0, $02, 0 | Y_FLIP | PRIORITY dsprite 0, 5, 8, 0, $03, 0 | PRIORITY -.NumGroupPair: ; e0b14 +.NumGroupPair: db 30 dsprite 0, 0, 0, 0, $00, 0 | PRIORITY dsprite 0, 0, 1, 0, $02, 0 | PRIORITY @@ -1571,7 +1520,7 @@ ENDM dsprite 2, 1, 8, 0, $03, 0 | PRIORITY dsprite 2, 1, 9, 0, $03, 0 | PRIORITY -.PokeGroupPair: ; e0b8d +.PokeGroupPair: db 38 dsprite 0, 0, -1, 7, $00, 0 | PRIORITY dsprite 0, 0, 3, 0, $00, 0 | X_FLIP | PRIORITY @@ -1612,15 +1561,14 @@ ENDM dsprite 11, 1, 2, 0, $02, 0 | Y_FLIP | PRIORITY dsprite 11, 1, 3, 0, $03, 0 | X_FLIP | Y_FLIP | PRIORITY -.Impossible: ; e0c26 +.Impossible: db 4 dsprite 0, 0, 0, 0, $00, 0 | PRIORITY dsprite 0, 0, 1, 0, $00, 0 | X_FLIP | PRIORITY dsprite 1, 0, 0, 0, $00, 0 | Y_FLIP | PRIORITY dsprite 1, 0, 1, 0, $00, 0 | X_FLIP | Y_FLIP | PRIORITY -; e0c37 -CardFlip_InitAttrPals: ; e0c37 (38:4c37) +CardFlip_InitAttrPals: ld a, [hCGB] and a ret z @@ -1666,27 +1614,24 @@ CardFlip_InitAttrPals: ; e0c37 (38:4c37) pop af ld [rSVBK], a ret -; e0c93 (38:4c93) -.palettes ; e0c93 +.palettes INCLUDE "gfx/card_flip/card_flip.pal" -; e0cdb -CardFlipLZ03: ; e0cdb +CardFlipLZ03: INCBIN "gfx/card_flip/card_flip_3.2bpp.lz" -CardFlipOffButtonGFX: ; e0cf6 +CardFlipOffButtonGFX: INCBIN "gfx/card_flip/off.2bpp" -CardFlipOnButtonGFX: ; e0d06 +CardFlipOnButtonGFX: INCBIN "gfx/card_flip/on.2bpp" -CardFlipLZ01: ; e0d16 +CardFlipLZ01: INCBIN "gfx/card_flip/card_flip_1.2bpp.lz" -CardFlipLZ02: ; e0ea8 +CardFlipLZ02: INCBIN "gfx/card_flip/card_flip_2.2bpp.lz" -CardFlipTilemap: ; e110c +CardFlipTilemap: INCBIN "gfx/card_flip/card_flip.tilemap" -; e1190 diff --git a/engine/games/dummy_game.asm b/engine/games/dummy_game.asm index 6d7e1219662..02407eb988a 100644 --- a/engine/games/dummy_game.asm +++ b/engine/games/dummy_game.asm @@ -1,4 +1,4 @@ -_DummyGame: ; e1e5b (38:5e5b) +_DummyGame: call .LoadGFXAndPals call DelayFrame .loop @@ -243,9 +243,8 @@ endr ld [wJumptableIndex], a ret -; e2010 -DummyGame_CheckMatch: ; e2010 +DummyGame_CheckMatch: ld hl, wDummyGameCard1 ld a, [hli] cp [hl] @@ -322,7 +321,6 @@ DummyGame_CheckMatch: ; e2010 inc bc ret -; e2093 DummyGameText_Yeah: ; 0xe2093 ; , yeah! @@ -336,7 +334,7 @@ DummyGameText_Darn: ; 0xe2098 db "@" ; 0xe209d -DummyGame_InitBoard: ; e209d +DummyGame_InitBoard: ld hl, wDummyGameCards ld bc, wDummyGameCardsEnd - wDummyGameCards xor a @@ -385,9 +383,8 @@ DummyGame_InitBoard: ; e209d jr nz, .loop ret -; e20e5 -DummyGame_SampleTilePlacement: ; e20e5 +DummyGame_SampleTilePlacement: push hl ld de, wDummyGameCards .loop @@ -408,9 +405,8 @@ DummyGame_SampleTilePlacement: ; e20e5 inc hl ret -; e2101 -DummyGame_GetDistributionOfTiles: ; e2101 +DummyGame_GetDistributionOfTiles: ld a, [wMenuCursorY] dec a ld l, a @@ -426,9 +422,8 @@ DummyGame_GetDistributionOfTiles: ; e2101 db $02, $03, $06, $06, $06, $08, $08, $06 db $02, $02, $04, $06, $06, $08, $08, $09 db $02, $02, $02, $04, $07, $08, $08, $0c -; e2128 -DummyGame_PlaceCard: ; e2128 +DummyGame_PlaceCard: ld a, [wDummyGameLastCardPicked] sla a sla a @@ -446,9 +441,8 @@ DummyGame_PlaceCard: ; e2128 call DelayFrames ret -; e2142 -DummyGame_DeleteCard: ; e2142 +DummyGame_DeleteCard: ld a, $1 ld [hli], a ld [hld], a @@ -460,9 +454,8 @@ DummyGame_DeleteCard: ; e2142 call DelayFrames ret -; e2152 -DummyGame_InitStrings: ; e2152 +DummyGame_InitStrings: hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, $1 @@ -483,9 +476,8 @@ DummyGame_InitStrings: ; e2152 db "とったもの@" .japstr2 db "あと かい@" -; e2183 -DummyGame_Card2Coord: ; e2183 +DummyGame_Card2Coord: ld d, 0 .find_row sub 9 @@ -511,9 +503,8 @@ DummyGame_Card2Coord: ; e2183 add hl, de ret -; e21a1 -DummyGame_InterpretJoypad_AnimateCursor: ; e21a1 (38:61a1) +DummyGame_InterpretJoypad_AnimateCursor: ld a, [wJumptableIndex] cp $7 jr nc, .quit @@ -606,7 +597,6 @@ DummyGame_InterpretJoypad_AnimateCursor: ; e21a1 (38:61a1) ld [hl], a ret -; e2221 (38:6221) -LZ_e2221: ; e2221 +LZ_e2221: INCBIN "gfx/dummy_game/dummy_game.2bpp.lz" diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm index 924c7892485..edde84d5136 100644 --- a/engine/games/slot_machine.asm +++ b/engine/games/slot_machine.asm @@ -94,7 +94,7 @@ _SlotMachine: res rLCDC_SPRITE_SIZE, [hl] ; 8x8 ret -.InitGFX: ; 926f7 (24:66f7) +.InitGFX: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -163,7 +163,7 @@ _SlotMachine: ld [wKeepSevenBiasChance], a ; 12.5% chance ret -Slots_GetPals: ; 9279b (24:679b) +Slots_GetPals: ld a, %11100100 call DmgToCgbBGPals lb de, %11100100, %11100100 @@ -175,7 +175,7 @@ Slots_GetPals: ; 9279b (24:679b) call DmgToCgbObjPals ret -SlotsLoop: ; 927af (24:67af) +SlotsLoop: ld a, [wJumptableIndex] bit SLOTS_END_LOOP_F, a jr nz, .stop @@ -194,7 +194,7 @@ SlotsLoop: ; 927af (24:67af) scf ret -.Stubbed_Function927d3: ; 927d3 (24:67d3) +.Stubbed_Function927d3: ; dummied out ret ld a, [wReel1ReelAction] @@ -219,9 +219,8 @@ SlotsLoop: ; 927af (24:67af) call DmgToCgbBGPals ret -; 927f8 -.PrintCoinsAndPayout: ; 927f8 (24:67f8) +.PrintCoinsAndPayout: hlcoord 5, 1 ld de, wCoins lb bc, PRINTNUM_LEADINGZEROS | 2, 4 @@ -232,9 +231,8 @@ SlotsLoop: ; 927af (24:67af) call PrintNum ret -; 92811 (24:6811) -Unreferenced_Function92811: ; 92811 +Unreferenced_Function92811: ; debug function? ld a, [wSlotBias] add 0 @@ -252,9 +250,8 @@ Unreferenced_Function92811: ; 92811 ld [hl], a ret -; 9282c -Unreferenced_Function9282c: ; 9282c +Unreferenced_Function9282c: ; animate OAM tiles? ld hl, wcf66 ld a, [hl] @@ -274,9 +271,8 @@ endr jr nz, .loop ret -; 92844 -SlotsJumptable: ; 92844 (24:6844) +SlotsJumptable: jumptable .Jumptable, wJumptableIndex .Jumptable: @@ -300,12 +296,12 @@ SlotsJumptable: ; 92844 (24:6844) dw SlotsAction_RestartOrQuit ; 11 dw SlotsAction_Quit ; 12 -SlotsAction_Next: ; 92879 (24:6879) +SlotsAction_Next: ld hl, wJumptableIndex inc [hl] ret -SlotsAction_Init: ; 9287e (24:687e) +SlotsAction_Init: call SlotsAction_Next xor a ld [wFirstTwoReelsMatching], a @@ -314,7 +310,7 @@ SlotsAction_Init: ; 9287e (24:687e) ld [wSlotMatched], a ret -SlotsAction_BetAndStart: ; 9288e (24:688e) +SlotsAction_BetAndStart: call Slots_AskBet jr nc, .proceed ld a, SLOTS_QUIT @@ -340,7 +336,7 @@ SlotsAction_BetAndStart: ; 9288e (24:688e) call Slots_PlaySFX ret -SlotsAction_WaitStart: ; 928c6 (24:68c6) +SlotsAction_WaitStart: ld hl, wSlotsDelay ld a, [hl] and a @@ -354,7 +350,7 @@ SlotsAction_WaitStart: ; 928c6 (24:68c6) ld [hJoypadSum], a ret -SlotsAction_WaitReel1: ; 928d6 (24:68d6) +SlotsAction_WaitReel1: ld hl, hJoypadSum ld a, [hl] and A_BUTTON @@ -362,7 +358,7 @@ SlotsAction_WaitReel1: ; 928d6 (24:68d6) call SlotsAction_Next call Slots_StopReel1 ld [wReel1ReelAction], a -SlotsAction_WaitStopReel1: ; 928e6 (24:68e6) +SlotsAction_WaitStopReel1: ld a, [wReel1ReelAction] cp REEL_ACTION_DO_NOTHING ret nz @@ -374,7 +370,7 @@ SlotsAction_WaitStopReel1: ; 928e6 (24:68e6) call SlotsAction_Next xor a ld [hJoypadSum], a -SlotsAction_WaitReel2: ; 92900 (24:6900) +SlotsAction_WaitReel2: ld hl, hJoypadSum ld a, [hl] and A_BUTTON @@ -382,7 +378,7 @@ SlotsAction_WaitReel2: ; 92900 (24:6900) call SlotsAction_Next call Slots_StopReel2 ld [wReel2ReelAction], a -SlotsAction_WaitStopReel2: ; 92910 (24:6910) +SlotsAction_WaitStopReel2: ld a, [wReel2ReelAction] cp REEL_ACTION_DO_NOTHING ret nz @@ -394,7 +390,7 @@ SlotsAction_WaitStopReel2: ; 92910 (24:6910) call SlotsAction_Next xor a ld [hJoypadSum], a -SlotsAction_WaitReel3: ; 9292a (24:692a) +SlotsAction_WaitReel3: ld hl, hJoypadSum ld a, [hl] and A_BUTTON @@ -402,7 +398,7 @@ SlotsAction_WaitReel3: ; 9292a (24:692a) call SlotsAction_Next call Slots_StopReel3 ld [wReel3ReelAction], a -SlotsAction_WaitStopReel3: ; 9293a (24:693a) +SlotsAction_WaitStopReel3: ld a, [wReel3ReelAction] cp REEL_ACTION_DO_NOTHING ret nz @@ -416,7 +412,7 @@ SlotsAction_WaitStopReel3: ; 9293a (24:693a) ld [hJoypadSum], a ret -SlotsAction_FlashIfWin: ; 92955 (24:6955) +SlotsAction_FlashIfWin: ld a, [wSlotMatched] cp SLOTS_NO_MATCH jr nz, .GotIt @@ -428,7 +424,7 @@ SlotsAction_FlashIfWin: ; 92955 (24:6955) call SlotsAction_Next ld a, 16 ld [wSlotsDelay], a -SlotsAction_FlashScreen: ; 9296b (24:696b) +SlotsAction_FlashScreen: ld hl, wSlotsDelay ld a, [hl] and a @@ -449,7 +445,7 @@ SlotsAction_FlashScreen: ; 9296b (24:696b) call SlotsAction_Next ret -SlotsAction_GiveEarnedCoins: ; 92987 (24:6987) +SlotsAction_GiveEarnedCoins: xor a ld [wFirstTwoReelsMatching], a ld [wFirstTwoReelsMatchingSevens], a @@ -461,10 +457,10 @@ SlotsAction_GiveEarnedCoins: ; 92987 (24:6987) call SlotsAction_Next ret -SlotsAction_PayoutTextAndAnim: ; 9299e (24:699e) +SlotsAction_PayoutTextAndAnim: call Slots_PayoutText call SlotsAction_Next -SlotsAction_PayoutAnim: ; 929a4 (24:69a4) +SlotsAction_PayoutAnim: ld hl, wSlotsDelay ld a, [hl] inc [hl] @@ -502,7 +498,7 @@ SlotsAction_PayoutAnim: ; 929a4 (24:69a4) call SlotsAction_Next ret -SlotsAction_RestartOrQuit: ; 929d9 (24:69d9) +SlotsAction_RestartOrQuit: call Slots_DeilluminateBetLights call WaitPressAorB_BlinkCursor call Slots_AskPlayAgain @@ -516,12 +512,12 @@ SlotsAction_RestartOrQuit: ; 929d9 (24:69d9) ld [wJumptableIndex], a ret -SlotsAction_Quit: ; 929f0 (24:69f0) +SlotsAction_Quit: ld hl, wJumptableIndex set SLOTS_END_LOOP_F, [hl] ret -Slots_LoadReelState: ; 929f6 (24:69f6) +Slots_LoadReelState: push de call Slots_GetCurrentReelState pop de @@ -535,7 +531,7 @@ Slots_LoadReelState: ; 929f6 (24:69f6) ld [de], a ret -Slots_CheckCoinCaseFull: ; 92a04 (24:6a04) +Slots_CheckCoinCaseFull: ld a, d cp HIGH(MAX_COINS) jr c, .not_full @@ -549,7 +545,7 @@ Slots_CheckCoinCaseFull: ; 92a04 (24:6a04) and a ret -Slots_GetCurrentReelState: ; 92a12 (24:6a12) +Slots_GetCurrentReelState: ld hl, REEL_POSITION add hl, bc ld a, [hl] @@ -569,12 +565,12 @@ Slots_GetCurrentReelState: ; 92a12 (24:6a12) add hl, de ret -Slots_StopReel1: ; 92a2b (24:6a2b) +Slots_StopReel1: ; Always set the REEL_ACTION_STOP_REEL1 action. ld a, REEL_ACTION_STOP_REEL1 ret -Slots_StopReel2: ; 92a2e (24:6a2e) +Slots_StopReel2: ; As long as, the following three meet, there's a 31.25% chance ; to set action REEL_ACTION_SET_UP_REEL2_SKIP_TO_7: ; - Bet is >= 2 coins @@ -603,7 +599,7 @@ Slots_StopReel2: ; 92a2e (24:6a2e) ld a, REEL_ACTION_STOP_REEL2 ret -.CheckReel1ForASeven: ; 92a51 (24:6a51) +.CheckReel1ForASeven: ld a, [wReel1Stopped] and a ret z @@ -614,7 +610,7 @@ Slots_StopReel2: ; 92a2e (24:6a2e) and a ret -Slots_StopReel3: ; 92a60 (24:6a60) +Slots_StopReel3: ; If no matching SEVEN symbols in reels #1 and #2: ; - REEL_ACTION_STOP_REEL3, 100% @@ -667,7 +663,7 @@ Slots_StopReel3: ; 92a60 (24:6a60) ld a, REEL_ACTION_STOP_REEL3 ret -Slots_InitReelTiles: ; 92a98 (24:6a98) +Slots_InitReelTiles: ld bc, wReel1 ld hl, REEL_OAM_ADDR add hl, bc @@ -723,7 +719,7 @@ Slots_InitReelTiles: ; 92a98 (24:6a98) call .OAM ret -.OAM: ; 92af9 (24:6af9) +.OAM: ld hl, REEL_ACTION add hl, bc ld [hl], REEL_ACTION_DO_NOTHING @@ -736,7 +732,7 @@ Slots_InitReelTiles: ; 92a98 (24:6a98) call Slots_UpdateReelPositionAndOAM ret -Slots_SpinReels: ; 92b0f (24:6b0f) +Slots_SpinReels: ld bc, wReel1 call .SpinReel ld bc, wReel2 @@ -745,7 +741,7 @@ Slots_SpinReels: ; 92b0f (24:6b0f) call .SpinReel ret -.SpinReel: ; 92b22 (24:6b22) +.SpinReel: ld hl, REEL_SPIN_DISTANCE add hl, bc ld a, [hl] @@ -782,7 +778,7 @@ Slots_SpinReels: ; 92b0f (24:6b0f) jr nz, .loop ret -Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53) +Slots_UpdateReelPositionAndOAM: ld hl, REEL_X_COORD add hl, bc ld a, [hl] @@ -814,7 +810,7 @@ Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53) ld [hl], a ret -.LoadOAM: ; 92b83 (24:6b83) +.LoadOAM: ld hl, REEL_OAM_ADDR add hl, bc ld a, [hli] @@ -853,9 +849,8 @@ Slots_UpdateReelPositionAndOAM: ; 92b53 (24:6b53) jr nz, .loop ret -; 92bbe (24:6bbe) -Unreferenced_Function92bbe: ; 92bbe +Unreferenced_Function92bbe: push hl srl a srl a @@ -868,13 +863,11 @@ Unreferenced_Function92bbe: ; 92bbe pop hl ret -; 92bce -.Unknown_92bce: ; 92bce +.Unknown_92bce: db 0, 1, 2, 3, 4, 5 -; 92bd4 -ReelActionJumptable: ; 92bd4 (24:6bd4) +ReelActionJumptable: ld hl, REEL_ACTION add hl, bc ld e, [hl] @@ -887,9 +880,8 @@ ReelActionJumptable: ; 92bd4 (24:6bd4) ld l, a jp hl -; 92be4 (24:6be4) -.Jumptable: ; 92be4 +.Jumptable: dw ReelAction_DoNothing ; 00 dw ReelAction_StopReelIgnoreJoypad ; 01 dw ReelAction_QuadrupleRate ; 02 @@ -915,54 +907,47 @@ ReelActionJumptable: ; 92bd4 (24:6bd4) dw ReelAction_WaitChansey ; 16 dw ReelAction_WaitEgg ; 17 dw ReelAction_DropReel ; 18 -; 92c16 -ReelAction_DoNothing: ; 92c16 +ReelAction_DoNothing: ret -; 92c17 -ReelAction_QuadrupleRate: ; 92c17 +ReelAction_QuadrupleRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 16 ret -; 92c1e -ReelAction_DoubleRate: ; 92c1e +ReelAction_DoubleRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 8 ret -; 92c25 -ReelAction_NormalRate: ; 92c25 +ReelAction_NormalRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 4 ret -; 92c2c -ReelAction_HalfRate: ; 92c2c +ReelAction_HalfRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 2 ret -; 92c33 -ReelAction_QuarterRate: ; 92c33 +ReelAction_QuarterRate: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 1 ret -; 92c3a -Slots_StopReel: ; 92c3a +Slots_StopReel: ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 0 @@ -972,7 +957,7 @@ Slots_StopReel: ; 92c3a ld hl, REEL_STOP_DELAY add hl, bc ld [hl], 3 -ReelAction_StopReelIgnoreJoypad: ; 92c4c +ReelAction_StopReelIgnoreJoypad: ld hl, REEL_STOP_DELAY add hl, bc ld a, [hl] @@ -988,9 +973,8 @@ ReelAction_StopReelIgnoreJoypad: ; 92c4c ld [hl], a ret -; 92c5e -ReelAction_StopReel1: ; 92c5e +ReelAction_StopReel1: ; If no bias: don't manipulate reel. ; If bias: manipulate reel up to wReel1ManipCounter (i.e. 4) slots, ; stoping early if the biased symbol shows up anywhere in reel #1, @@ -1011,9 +995,8 @@ ReelAction_StopReel1: ; 92c5e call Slots_StopReel ret -; 92c76 -.CheckForBias: ; 92c76 +.CheckForBias: call Slots_GetCurrentReelState ld a, [wSlotBias] ld e, a @@ -1027,9 +1010,8 @@ ReelAction_StopReel1: ; 92c5e cp e ret -; 92c86 -ReelAction_StopReel2: ; 92c86 +ReelAction_StopReel2: ; If no bias: don't manipulate reel. ; If bias: manipulate reel up to wReel2ManipCounter (i.e. 4) slots, ; stoping early if the biased symbol is lined up in the first two @@ -1057,9 +1039,8 @@ ReelAction_StopReel2: ; 92c86 call Slots_StopReel ret -; 92ca9 -ReelAction_StopReel3: ; 92ca9 +ReelAction_StopReel3: ; Manipulate the reel up to wReel3ManipCounter (i.e. 4) slots, ; stopping early if the bias symbol is lined up for a win. ; If not biased to any symbols, stop as soon as nothing is lined up. @@ -1093,9 +1074,8 @@ ReelAction_StopReel3: ; 92ca9 call Slots_StopReel ret -; 92cd2 -ReelAction_SetUpReel2SkipTo7: ; 92cd2 +ReelAction_SetUpReel2SkipTo7: ; Unique reel 2 action (see Slots_StopReel2) ; Ensures that 7 symbols become lined up in the first two reels, ; but more often than not, this is only a way to get our hopes up, as @@ -1123,9 +1103,8 @@ ReelAction_SetUpReel2SkipTo7: ; 92cd2 ld [hl], 0 ret -; 92cf8 -ReelAction_WaitReel2SkipTo7: ; 92cf8 +ReelAction_WaitReel2SkipTo7: ld hl, REEL_MANIP_DELAY add hl, bc ld a, [hl] @@ -1145,9 +1124,8 @@ ReelAction_WaitReel2SkipTo7: ; 92cf8 ld [hl], 8 ret -; 92d13 -ReelAction_FastSpinReel2UntilLinedUp7s: ; 92d13 +ReelAction_FastSpinReel2UntilLinedUp7s: call Slots_CheckMatchedFirstTwoReels ret nc ld a, [wFirstTwoReelsMatchingSevens] @@ -1156,9 +1134,8 @@ ReelAction_FastSpinReel2UntilLinedUp7s: ; 92d13 call Slots_StopReel ret -; 92d20 -ReelAction_InitGolem: ; 92d20 +ReelAction_InitGolem: ; Ensures SEVENs are lined up if there's bias to SEVEN. ; Ensures nothing is lined up if there's no bias symbols. ; No other bias symbols are compatible with this mode. @@ -1191,7 +1168,7 @@ ReelAction_InitGolem: ; 92d20 pop bc xor a ld [wSlotsDelay], a -ReelAction_WaitGolem: ; 92d4f +ReelAction_WaitGolem: ld a, [wSlotsDelay] cp 2 jr z, .two @@ -1213,9 +1190,8 @@ ReelAction_WaitGolem: ; 92d4f ld [hl], 8 ret -; 92d6e -ReelAction_EndGolem: ; 92d6e +ReelAction_EndGolem: xor a ld [wSlotsDelay], a ld hl, REEL_ACTION @@ -1226,9 +1202,8 @@ ReelAction_EndGolem: ; 92d6e ld [hl], 0 ret -; 92d7e -ReelAction_InitChansey: ; 92d7e +ReelAction_InitChansey: ; Ensures the lining up of SEVEN symbols, but this mode is only possible ; when there is bias to SEVEN symbols (and even then, it's still rare). ; Chansey releases and egg and reel #3 is made to advance 17 slots very @@ -1254,9 +1229,8 @@ ReelAction_InitChansey: ; 92d7e ld [wSlotsDelay], a ret -; 92da4 -ReelAction_WaitChansey: ; 92da4 +ReelAction_WaitChansey: ld a, [wSlotsDelay] and a ret z @@ -1265,7 +1239,7 @@ ReelAction_WaitChansey: ; 92da4 inc [hl] ; REEL_ACTION_WAIT_EGG ld a, 2 ld [wSlotsDelay], a -ReelAction_WaitEgg: ; 92db3 +ReelAction_WaitEgg: ld a, [wSlotsDelay] cp $4 ret c @@ -1278,7 +1252,7 @@ ReelAction_WaitEgg: ; 92db3 ld hl, REEL_MANIP_DELAY add hl, bc ld [hl], 17 -ReelAction_DropReel: ; 92dca +ReelAction_DropReel: ld hl, REEL_MANIP_DELAY add hl, bc ld a, [hl] @@ -1309,9 +1283,8 @@ ReelAction_DropReel: ; 92dca ld [wSlotsDelay], a ret -; 92df7 -ReelAction_Unused: ; 92df7 +ReelAction_Unused: call Slots_CheckMatchedAllThreeReels ret c ld a, SFX_STOP_SLOT @@ -1324,7 +1297,7 @@ ReelAction_Unused: ; 92df7 ld hl, REEL_MANIP_DELAY add hl, bc ld [hl], a -ReelAction_CheckDropReel: ; 92e10 +ReelAction_CheckDropReel: ld hl, REEL_MANIP_DELAY add hl, bc ld a, [hl] @@ -1345,7 +1318,7 @@ ReelAction_CheckDropReel: ; 92e10 ld hl, REEL_SPIN_RATE add hl, bc ld [hl], 0 -ReelAction_WaitDropReel: ; 92e31 +ReelAction_WaitDropReel: ld hl, REEL_FIELD_0B add hl, bc ld a, [hl] @@ -1363,9 +1336,8 @@ ReelAction_WaitDropReel: ; 92e31 ld [hl], 8 ret -; 92e47 -ReelAction_StartSlowAdvanceReel3: ; 92e47 +ReelAction_StartSlowAdvanceReel3: ; Ensures SEVENs are lined up if there's bias to SEVEN. ; Ensures nothing is lined up if there's no bias symbols. ; No other bias symbols are compatible with this mode. @@ -1387,7 +1359,7 @@ ReelAction_StartSlowAdvanceReel3: ; 92e47 ld hl, REEL_MANIP_DELAY add hl, bc ld [hl], 16 -ReelAction_WaitSlowAdvanceReel3: ; 92e64 +ReelAction_WaitSlowAdvanceReel3: ld hl, REEL_MANIP_DELAY add hl, bc ld a, [hl] @@ -1418,9 +1390,8 @@ ReelAction_WaitSlowAdvanceReel3: ; 92e64 call WaitSFX ret -; 92e94 -Slots_CheckMatchedFirstTwoReels: ; 92e94 +Slots_CheckMatchedFirstTwoReels: xor a ld [wFirstTwoReelsMatching], a ld [wFirstTwoReelsMatchingSevens], a @@ -1447,77 +1418,69 @@ Slots_CheckMatchedFirstTwoReels: ; 92e94 scf ret -; 92ebd -.Jumptable: ; 92ebd +.Jumptable: dw .zero dw .one dw .two dw .three -; 92ec5 -.three ; 92ec5 +.three call .CheckUpwardsDiag call .CheckDownwardsDiag -.two ; 92ecb +.two call .CheckBottomRow call .CheckTopRow -.one ; 92ed1 +.one call .CheckMiddleRow -.zero ; 92ed4 +.zero ret -; 92ed5 -.CheckBottomRow: ; 92ed5 +.CheckBottomRow: ld hl, wCurrReelStopped ld a, [wReel1Stopped] cp [hl] call z, .StoreResult ret -; 92ee0 -.CheckUpwardsDiag: ; 92ee0 +.CheckUpwardsDiag: ld hl, wCurrReelStopped + 1 ld a, [wReel1Stopped] cp [hl] call z, .StoreResult ret -; 92eeb -.CheckMiddleRow: ; 92eeb +.CheckMiddleRow: ld hl, wCurrReelStopped + 1 ld a, [wReel1Stopped + 1] cp [hl] call z, .StoreResult ret -; 92ef6 -.CheckDownwardsDiag: ; 92ef6 +.CheckDownwardsDiag: ld hl, wCurrReelStopped + 1 ld a, [wReel1Stopped + 2] cp [hl] call z, .StoreResult ret -; 92f01 -.CheckTopRow: ; 92f01 +.CheckTopRow: ld hl, wCurrReelStopped + 2 ld a, [wReel1Stopped + 2] cp [hl] call z, .StoreResult ret -; 92f0c -.StoreResult: ; 92f0c +.StoreResult: ld [wSlotBuildingMatch], a and a jr nz, .matching_sevens @@ -1529,9 +1492,8 @@ Slots_CheckMatchedFirstTwoReels: ; 92e94 ld [wFirstTwoReelsMatching], a ret -; 92f1d -Slots_CheckMatchedAllThreeReels: ; 92f1d +Slots_CheckMatchedAllThreeReels: ld a, SLOTS_NO_MATCH ld [wSlotMatched], a call Slots_GetCurrentReelState @@ -1561,32 +1523,29 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d scf ret -; 92f48 -.Jumptable: ; 92f48 +.Jumptable: dw .zero dw .one dw .two dw .three -; 92f50 -.three ; 92f50 +.three call .CheckUpwardsDiag call .CheckDownwardsDiag -.two ; 92f56 +.two call .CheckBottomRow call .CheckTopRow -.one ; 92f5c +.one call .CheckMiddleRow -.zero ; 92f5f +.zero ret -; 92f60 -.CheckBottomRow: ; 92f60 +.CheckBottomRow: ld hl, wCurrReelStopped ld a, [wReel1Stopped] cp [hl] @@ -1596,9 +1555,8 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d call z, .StoreResult ret -; 92f70 -.CheckUpwardsDiag: ; 92f70 +.CheckUpwardsDiag: ld hl, wCurrReelStopped + 2 ld a, [wReel1Stopped] cp [hl] @@ -1608,9 +1566,8 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d call z, .StoreResult ret -; 92f80 -.CheckMiddleRow: ; 92f80 +.CheckMiddleRow: ld hl, wCurrReelStopped + 1 ld a, [wReel1Stopped + 1] cp [hl] @@ -1620,9 +1577,8 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d call z, .StoreResult ret -; 92f90 -.CheckDownwardsDiag: ; 92f90 +.CheckDownwardsDiag: ld hl, wCurrReelStopped ld a, [wReel1Stopped + 2] cp [hl] @@ -1632,9 +1588,8 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d call z, .StoreResult ret -; 92fa0 -.CheckTopRow: ; 92fa0 +.CheckTopRow: ld hl, wCurrReelStopped + 2 ld a, [wReel1Stopped + 2] cp [hl] @@ -1644,15 +1599,13 @@ Slots_CheckMatchedAllThreeReels: ; 92f1d call z, .StoreResult ret -; 92fb0 -.StoreResult: ; 92fb0 +.StoreResult: ld [wSlotMatched], a ret -; 92fb4 -Slots_CopyReelState: ; 92fb4 +Slots_CopyReelState: ld de, wCurrReelStopped ld a, [hli] ld [de], a @@ -1664,9 +1617,8 @@ Slots_CopyReelState: ; 92fb4 ld [de], a ret -; 92fc0 -Slots_GetNumberOfGolems: ; 92fc0 +Slots_GetNumberOfGolems: ld hl, REEL_POSITION add hl, bc ld a, [hl] @@ -1679,9 +1631,8 @@ Slots_GetNumberOfGolems: ; 92fc0 ld a, e ret -; 92fcf -.Check7Bias: ; 92fcf +.Check7Bias: ld a, [wSlotBias] and a jr nz, .not_biased_to_seven @@ -1718,9 +1669,8 @@ Slots_GetNumberOfGolems: ; 92fc0 jr c, .loop2 ret -; 93002 -Slots_InitBias: ; 93002 (24:7002) +Slots_InitBias: ld a, [wSlotBias] and a ret z @@ -1744,9 +1694,8 @@ Slots_InitBias: ; 93002 (24:7002) ld [wSlotBias], a ret -; 93023 (24:7023) -.Normal: ; 93023 +.Normal: db $01, SLOTS_SEVEN ; 1/256 db $03, SLOTS_POKEBALL ; 1/128 db $0a, SLOTS_STARYU ; 7/256 @@ -1754,9 +1703,8 @@ Slots_InitBias: ; 93002 (24:7002) db $28, SLOTS_PIKACHU ; 5/64 db $30, SLOTS_CHERRY ; 1/32 db $ff, SLOTS_NO_BIAS ; everything else -; 93031 -.Lucky: ; 93031 +.Lucky: db $02, SLOTS_SEVEN ; 1/128 db $03, SLOTS_POKEBALL ; 1/256 db $08, SLOTS_STARYU ; 5/256 @@ -1764,9 +1712,8 @@ Slots_InitBias: ; 93002 (24:7002) db $1e, SLOTS_PIKACHU ; 7/128 db $50, SLOTS_CHERRY ; 25/128 db $ff, SLOTS_NO_BIAS ; everything else -; 9303f -Slots_IlluminateBetLights: ; 9303f (24:703f) +Slots_IlluminateBetLights: ld b, $14 ; turned on ld a, [wSlotBet] dec a @@ -1775,22 +1722,22 @@ Slots_IlluminateBetLights: ; 9303f (24:703f) jr z, Slots_Lights2OnOff jr Slots_Lights3OnOff -Slots_DeilluminateBetLights: ; 9304c (24:704c) +Slots_DeilluminateBetLights: ld b, $23 ; turned off -Slots_Lights3OnOff: ; 9304e (24:704e) +Slots_Lights3OnOff: hlcoord 3, 2 call Slots_TurnLightsOnOrOff hlcoord 3, 10 call Slots_TurnLightsOnOrOff -Slots_Lights2OnOff: ; 9305a (24:705a) +Slots_Lights2OnOff: hlcoord 3, 4 call Slots_TurnLightsOnOrOff hlcoord 3, 8 call Slots_TurnLightsOnOrOff -Slots_Lights1OnOff: ; 93066 (24:7066) +Slots_Lights1OnOff: hlcoord 3, 6 -Slots_TurnLightsOnOrOff: ; 93069 (24:7069) +Slots_TurnLightsOnOrOff: ld a, b ld [hl], a ld de, SCREEN_WIDTH / 2 + 3 @@ -1805,7 +1752,7 @@ Slots_TurnLightsOnOrOff: ; 93069 (24:7069) ld [hl], a ret -Slots_AskBet: ; 9307c (24:707c) +Slots_AskBet: .loop ld hl, .Text_BetHowManyCoins call PrintText @@ -1847,7 +1794,6 @@ Slots_AskBet: ; 9307c (24:707c) and a ret -; 930c7 (24:70c7) .Text_BetHowManyCoins: ; 0x930c7 ; Bet how many coins? @@ -1882,7 +1828,7 @@ Slots_AskBet: ; 9307c (24:707c) db " 1@" ; 0x930e9 -Slots_AskPlayAgain: ; 930e9 (24:70e9) +Slots_AskPlayAgain: ld hl, wCoins ld a, [hli] or [hl] @@ -1911,17 +1857,16 @@ Slots_AskPlayAgain: ; 930e9 (24:70e9) scf ret -; 9311a (24:711a) -.Text_OutOfCoins: ; 9311a +.Text_OutOfCoins: text_jump UnknownText_0x1c5079 db "@" -.Text_PlayAgain: ; 9311f +.Text_PlayAgain: text_jump UnknownText_0x1c5092 db "@" -Slots_GetPayout: ; 93124 (24:7124) +Slots_GetPayout: ld a, [wSlotMatched] cp SLOTS_NO_MATCH jr z, .no_win @@ -1954,7 +1899,7 @@ Slots_GetPayout: ; 93124 (24:7124) ld [hl], a ret -Slots_PayoutText: ; 93158 (24:7158) +Slots_PayoutText: ld a, [wSlotMatched] cp SLOTS_NO_MATCH jr nz, .MatchedSomething @@ -1987,16 +1932,14 @@ Slots_PayoutText: ; 93158 (24:7158) farcall StubbedTrainerRankings_AddToSlotsWinStreak ret -; 93195 (24:7195) -.PayoutStrings: ; 93195 +.PayoutStrings: dbw "300@", .LinedUpSevens dbw "50@@", .LinedUpPokeballs dbw "6@@@", .LinedUpMonOrCherry dbw "8@@@", .LinedUpMonOrCherry dbw "10@@", .LinedUpMonOrCherry dbw "15@@", .LinedUpMonOrCherry -; 931b9 .Text_PrintPayout: ; 0x931b9 start_asm @@ -2017,7 +1960,6 @@ rept 4 endr ret -; 931db .Text_LinedUpWonCoins: ; 0x931db ; lined up! Won @ coins! @@ -2031,7 +1973,7 @@ endr db "@" ; 0x931e5 -.LinedUpSevens: ; 931e5 +.LinedUpSevens: ld a, SFX_2ND_PLACE call Slots_PlaySFX call WaitSFX @@ -2058,25 +2000,22 @@ endr ld [wSlotBias], a ret -; 9320b -.LinedUpPokeballs: ; 9320b +.LinedUpPokeballs: ld a, SFX_3RD_PLACE call Slots_PlaySFX call WaitSFX ret -; 93214 -.LinedUpMonOrCherry: ; 93214 +.LinedUpMonOrCherry: ld a, SFX_PRESENT call Slots_PlaySFX call WaitSFX ret -; 9321d -Slots_AnimateGolem: ; 9321d (24:721d) +Slots_AnimateGolem: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld e, [hl] @@ -2089,12 +2028,12 @@ Slots_AnimateGolem: ; 9321d (24:721d) ld l, a jp hl -.Jumptable: ; 9322d (24:722d) +.Jumptable: dw .init dw .fall dw .roll -.init ; 93233 (24:7233) +.init ld hl, SPRITEANIMSTRUCT_0E add hl, bc ld a, [hl] @@ -2119,7 +2058,7 @@ Slots_AnimateGolem: ; 9321d (24:721d) add hl, bc ld [hl], $0 -.fall ; 93259 (24:7259) +.fall ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -2148,7 +2087,7 @@ Slots_AnimateGolem: ; 9321d (24:721d) call Slots_PlaySFX ret -.roll ; 93289 (24:7289) +.roll ld hl, SPRITEANIMSTRUCT_XOFFSET add hl, bc ld a, [hl] @@ -2175,7 +2114,7 @@ Slots_AnimateGolem: ; 9321d (24:721d) ld [hSCY], a ret -Slots_AnimateChansey: ; 932ac (24:72ac) +Slots_AnimateChansey: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld e, [hl] @@ -2188,12 +2127,12 @@ Slots_AnimateChansey: ; 932ac (24:72ac) ld l, a jp hl -.Jumptable: ; 932bc (24:72bc) +.Jumptable: dw .walk dw .one dw .two -.walk ; 932c2 (24:72c2) +.walk ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -2213,7 +2152,7 @@ Slots_AnimateChansey: ; 932ac (24:72ac) ld a, 1 ld [wSlotsDelay], a -.one ; 932e0 (24:72e0) +.one ld a, [wSlotsDelay] cp $2 jr z, .retain @@ -2231,7 +2170,7 @@ Slots_AnimateChansey: ; 932ac (24:72ac) ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld [hl], $8 -.two ; 932fc (24:72fc) +.two ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -2251,18 +2190,16 @@ Slots_AnimateChansey: ; 932ac (24:72ac) pop bc ret -; 93316 (24:7316) -Slots_WaitSFX: ; 93316 +Slots_WaitSFX: push bc ld c, 16 call DelayFrames pop bc ret -; 9331e -Slots_PlaySFX: ; 9331e (24:731e) +Slots_PlaySFX: push de ld e, a ld d, 0 @@ -2270,11 +2207,10 @@ Slots_PlaySFX: ; 9331e (24:731e) pop de ret -; 93327 (24:7327) ; The first three positions are repeated to ; avoid needing to check indices when copying. -Reel1Tilemap: ; 93327 +Reel1Tilemap: db SLOTS_SEVEN ; 0 db SLOTS_CHERRY ; 1 db SLOTS_STARYU ; 2 @@ -2294,7 +2230,7 @@ Reel1Tilemap: ; 93327 db SLOTS_CHERRY ; 1 db SLOTS_STARYU ; 2 -Reel2Tilemap: ; 93339 +Reel2Tilemap: db SLOTS_SEVEN ; 0 db SLOTS_PIKACHU ; 1 db SLOTS_CHERRY ; 2 @@ -2314,7 +2250,7 @@ Reel2Tilemap: ; 93339 db SLOTS_PIKACHU ; 1 db SLOTS_CHERRY ; 2 -Reel3Tilemap: ; 9334b +Reel3Tilemap: db SLOTS_SEVEN ; 0 db SLOTS_PIKACHU ; 1 db SLOTS_CHERRY ; 2 @@ -2333,20 +2269,15 @@ Reel3Tilemap: ; 9334b db SLOTS_SEVEN ; 0 db SLOTS_PIKACHU ; 1 db SLOTS_CHERRY ; 2 -; 9335d -SlotsTilemap: ; 9335d +SlotsTilemap: INCBIN "gfx/slots/slots.tilemap" -; 9344d -Slots1LZ: ; 9344d +Slots1LZ: INCBIN "gfx/slots/slots_1.2bpp.lz" -; 935cd -Slots2LZ: ; 935cd +Slots2LZ: INCBIN "gfx/slots/slots_2.2bpp.lz" -; 9382d -Slots3LZ: ; 9382d +Slots3LZ: INCBIN "gfx/slots/slots_3.2bpp.lz" -; 93a3d diff --git a/engine/games/unown_puzzle.asm b/engine/games/unown_puzzle.asm index 300f07de431..9e4f6944112 100644 --- a/engine/games/unown_puzzle.asm +++ b/engine/games/unown_puzzle.asm @@ -3,7 +3,7 @@ PUZZLE_VOID EQU $ef puzcoord EQUS "* 6 +" -_UnownPuzzle: ; e1190 +_UnownPuzzle: ld a, [hInMenu] push af ld a, $1 @@ -88,9 +88,8 @@ _UnownPuzzle: ; e1190 ld a, LCDC_DEFAULT ld [rLCDC], a ret -; e124e -InitUnownPuzzlePiecePositions: ; e124e +InitUnownPuzzlePiecePositions: ld c, 1 ld b, 16 .load_loop @@ -111,9 +110,8 @@ InitUnownPuzzlePiecePositions: ; e124e dec b jr nz, .load_loop ret -; e126d -.PuzzlePieceInitialPositions: ; e126d +.PuzzlePieceInitialPositions: initpuzcoord: MACRO rept _NARG / 2 db \1 puzcoord \2 @@ -128,9 +126,8 @@ ENDM initpuzcoord 4,0, 4,5 initpuzcoord 5,0, 5,5 ; START > CANCEL -; e127d -PlaceStartCancelBox: ; e127d +PlaceStartCancelBox: call PlaceStartCancelBoxBorder hlcoord 5, 16 ld a, $f6 @@ -141,9 +138,8 @@ PlaceStartCancelBox: ; e127d dec c jr nz, .loop ret -; e128d -PlaceStartCancelBoxBorder: ; e128d +PlaceStartCancelBoxBorder: hlcoord 4, 15 ld a, $f0 ld [hli], a @@ -172,9 +168,8 @@ PlaceStartCancelBoxBorder: ; e128d ld a, $f5 ld [hl], a ret -; e12ca -UnownPuzzleJumptable: ; e12ca +UnownPuzzleJumptable: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -185,13 +180,11 @@ UnownPuzzleJumptable: ; e12ca ld h, [hl] ld l, a jp hl -; e12d9 -.Jumptable: ; e12d9 +.Jumptable: dw .Function -; e12db -.Function: ; e12db +.Function: ld a, [hJoyPressed] and START jp nz, UnownPuzzle_Quit @@ -299,9 +292,8 @@ UnownPuzzleJumptable: ; e12ca .play_sfx call PlaySFX ret -; e1376 -UnownPuzzle_A: ; e1376 +UnownPuzzle_A: ld a, [wHoldingUnownPuzzlePiece] and a jr nz, .TryPlacePiece @@ -348,19 +340,18 @@ UnownPuzzle_A: ; e1376 call SimpleWaitPressAorB ld a, TRUE ld [wSolvedUnownPuzzle], a -UnownPuzzle_Quit: ; e13de +UnownPuzzle_Quit: ld hl, wJumptableIndex set 7, [hl] ret -UnownPuzzle_InvalidAction: ; e13e4 +UnownPuzzle_InvalidAction: ld de, SFX_WRONG call PlaySFX call WaitSFX ret -; e13ee -UnownPuzzle_FillBox: ; e13ee +UnownPuzzle_FillBox: ld de, SCREEN_WIDTH .row push bc @@ -375,9 +366,8 @@ UnownPuzzle_FillBox: ; e13ee dec b jr nz, .row ret -; e13fe -UnownPuzzle_UpdateTilemap: ; e13fe +UnownPuzzle_UpdateTilemap: xor a ld [wUnownPuzzleCursorPosition], a ld c, 6 * 6 @@ -400,9 +390,8 @@ UnownPuzzle_UpdateTilemap: ; e13fe dec c jr nz, .loop ret -; e141f -PlaceUnownPuzzlePieceGFX: ; e141f +PlaceUnownPuzzlePieceGFX: ld a, $2 ; tilemap coords call GetUnownPuzzleCoordData ld a, [hli] @@ -427,9 +416,8 @@ PlaceUnownPuzzlePieceGFX: ; e141f dec b jr nz, .row ret -; e1441 -FillUnoccupiedPuzzleSpace: ; e1441 +FillUnoccupiedPuzzleSpace: ld a, 2 ; tilemap coords call GetUnownPuzzleCoordData ld a, [hli] @@ -454,9 +442,8 @@ FillUnoccupiedPuzzleSpace: ; e1441 dec b jr nz, .row ret -; e1463 -GetUnownPuzzleCoordData: ; e1463 +GetUnownPuzzleCoordData: ld e, a ld d, 0 ld hl, UnownPuzzleCoordData @@ -467,9 +454,8 @@ rept 6 add hl, de endr ret -; e1475 -UnownPuzzle_CheckCurrentTileOccupancy: ; e1475 +UnownPuzzle_CheckCurrentTileOccupancy: ld hl, wPuzzlePieces ld a, [wUnownPuzzleCursorPosition] ld e, a @@ -477,9 +463,8 @@ UnownPuzzle_CheckCurrentTileOccupancy: ; e1475 add hl, de ld a, [hl] ret -; e1481 -GetCurrentPuzzlePieceVTileCorner: ; e1481 +GetCurrentPuzzlePieceVTileCorner: ld a, [wUnownPuzzleHeldPiece] ld hl, .Corners add l @@ -489,9 +474,8 @@ GetCurrentPuzzlePieceVTileCorner: ; e1481 ld h, a ld a, [hl] ret -; e148f -.Corners: ; e148f +.Corners: ; 00, 01, 02 ; 0c, 0d, 0e ; 18, 19, 1a @@ -500,9 +484,8 @@ GetCurrentPuzzlePieceVTileCorner: ; e1481 db $24, $27, $2a, $2d db $48, $4b, $4e, $51 db $6c, $6f, $72, $75 -; e14a0 -CheckSolvedUnownPuzzle: ; e14a0 +CheckSolvedUnownPuzzle: ld hl, .SolvedPuzzleConfiguration ld de, wPuzzlePieces ld c, 6 * 6 @@ -520,18 +503,16 @@ CheckSolvedUnownPuzzle: ; e14a0 .not_solved and a ret -; e14b5 -.SolvedPuzzleConfiguration: ; e14b5 +.SolvedPuzzleConfiguration: db $00, $00, $00, $00, $00, $00 db $00, $01, $02, $03, $04, $00 db $00, $05, $06, $07, $08, $00 db $00, $09, $0a, $0b, $0c, $00 db $00, $0d, $0e, $0f, $10, $00 db $00, $00, $00, $00, $00, $00 -; e14d9 -RedrawUnownPuzzlePieces: ; e14d9 +RedrawUnownPuzzlePieces: call GetCurrentPuzzlePieceVTileCorner ld [wd002], a xor a @@ -570,9 +551,8 @@ RedrawUnownPuzzlePieces: ; e14d9 ld [de], a ; attributes inc de jr .loop -; e150f -.OAM_HoldingPiece: ; e150f +.OAM_HoldingPiece: dsprite -1, -4, -1, -4, $00, 0 dsprite -1, -4, 0, -4, $01, 0 dsprite -1, -4, 0, 4, $02, 0 @@ -584,7 +564,7 @@ RedrawUnownPuzzlePieces: ; e14d9 dsprite 0, 4, 0, 4, $1a, 0 db -1 -.OAM_NotHoldingPiece: ; e1534 +.OAM_NotHoldingPiece: dsprite -1, -4, -1, -4, $00, 0 dsprite -1, -4, 0, -4, $01, 0 dsprite -1, -4, 0, 4, $00, 0 | X_FLIP @@ -596,7 +576,7 @@ RedrawUnownPuzzlePieces: ; e14d9 dsprite 0, 4, 0, 4, $00, 0 | X_FLIP | Y_FLIP db -1 -UnownPuzzleCoordData: ; e1559 +UnownPuzzleCoordData: puzzle_coords: MACRO dbpixel \1, \2, \3, \4 @@ -646,7 +626,7 @@ ENDM puzzle_coords 15, 18, 4, 4, 13, 15, PUZZLE_BORDER, 0 puzzle_coords 18, 18, 4, 4, 16, 15, PUZZLE_BORDER, 0 -ConvertLoadedPuzzlePieces: ; e1631 +ConvertLoadedPuzzlePieces: ld hl, vTiles2 ld de, vTiles0 ld b, 6 @@ -667,9 +647,8 @@ ConvertLoadedPuzzlePieces: ; e1631 jr nz, .loop call UnownPuzzle_AddPuzzlePieceBorders ret -; e1654 -.EnlargePuzzlePieceTiles: ; e1654 +.EnlargePuzzlePieceTiles: ; double size ld c, 6 .loop1 @@ -738,9 +717,8 @@ ConvertLoadedPuzzlePieces: ; e1631 dec c jr nz, .loop1 ret -; e16aa -.GetEnlargedTile: ; e16aa +.GetEnlargedTile: push hl ld hl, .EnlargedTiles add l @@ -751,18 +729,16 @@ ConvertLoadedPuzzlePieces: ; e1631 ld a, [hl] pop hl ret -; e16b7 -.EnlargedTiles: ; e16b7 +.EnlargedTiles: x = 0 rept 16 db ((x & %1000) * %11000) + ((x & %0100) * %1100) + ((x & %0010) * %110) + ((x & %0001) * %11) x = x + 1 endr -; e16c7 -UnownPuzzle_AddPuzzlePieceBorders: ; e16c7 +UnownPuzzle_AddPuzzlePieceBorders: ld hl, PuzzlePieceBorderData ld a, 8 .loop @@ -784,9 +760,8 @@ endr dec a jr nz, .loop ret -; e16e2 -.LoadGFX: ; e16e2 +.LoadGFX: lb bc, 4, 4 .loop1 push bc @@ -817,9 +792,8 @@ endr dec b jr nz, .loop1 ret -; e1703 -PuzzlePieceBorderData: ; e1703 +PuzzlePieceBorderData: dw .TileBordersGFX + 0 tiles, vTiles0 tile $00 dw .TileBordersGFX + 1 tiles, vTiles0 tile $01 dw .TileBordersGFX + 2 tiles, vTiles0 tile $02 @@ -828,12 +802,11 @@ PuzzlePieceBorderData: ; e1703 dw .TileBordersGFX + 5 tiles, vTiles0 tile $18 dw .TileBordersGFX + 6 tiles, vTiles0 tile $19 dw .TileBordersGFX + 7 tiles, vTiles0 tile $1a -; e1723 -.TileBordersGFX: ; e1723 +.TileBordersGFX: INCBIN "gfx/unown_puzzle/tile_borders.2bpp" -LoadUnownPuzzlePiecesGFX: ; e17a3 +LoadUnownPuzzlePiecesGFX: ld a, [wScriptVar] maskbits NUM_UNOWN_PUZZLES ld e, a @@ -848,30 +821,28 @@ LoadUnownPuzzlePiecesGFX: ; e17a3 call Decompress call ConvertLoadedPuzzlePieces ret -; e17bd -.LZPointers: ; e17bd +.LZPointers: ; entries correspond to UNOWNPUZZLE_* constants dw KabutoPuzzleLZ dw OmanytePuzzleLZ dw AerodactylPuzzleLZ dw HoOhPuzzleLZ -; e17c5 -UnownPuzzleCursorGFX: ; e17c5 +UnownPuzzleCursorGFX: INCBIN "gfx/unown_puzzle/cursor.2bpp" -UnownPuzzleStartCancelLZ: ; e1805 +UnownPuzzleStartCancelLZ: INCBIN "gfx/unown_puzzle/start_cancel.2bpp.lz" -HoOhPuzzleLZ: ; e18ab +HoOhPuzzleLZ: INCBIN "gfx/unown_puzzle/hooh.2bpp.lz" -AerodactylPuzzleLZ: ; e19fb +AerodactylPuzzleLZ: INCBIN "gfx/unown_puzzle/aerodactyl.2bpp.lz" -KabutoPuzzleLZ: ; e1bab +KabutoPuzzleLZ: INCBIN "gfx/unown_puzzle/kabuto.2bpp.lz" -OmanytePuzzleLZ: ; e1c9b +OmanytePuzzleLZ: INCBIN "gfx/unown_puzzle/omanyte.2bpp.lz" diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm index 6ab676cdac2..c6527085f4b 100644 --- a/engine/gfx/cgb_layouts.asm +++ b/engine/gfx/cgb_layouts.asm @@ -1,12 +1,11 @@ ; Replaces the functionality of sgb.asm to work with CGB hardware. -CheckCGB: ; 8d55 +CheckCGB: ld a, [hCGB] and a ret -; 8d59 -LoadSGBLayoutCGB: ; 8d59 +LoadSGBLayoutCGB: ld a, b cp SCGB_RAM jr nz, .not_ram @@ -26,13 +25,11 @@ LoadSGBLayoutCGB: ; 8d59 ld de, .ReturnFromJumpTable push de jp hl -; 8d79 -.ReturnFromJumpTable: ; 8d79 +.ReturnFromJumpTable: ret -; 8d7a -.dw ; 8d7a +.dw dw _CGB_BattleGrayscale dw _CGB_BattleColors dw _CGB_PokegearPals @@ -64,9 +61,8 @@ LoadSGBLayoutCGB: ; 8d59 dw _CGB_TrainerOrMonFrontpicPals dw _CGB_MysteryGift dw _CGB1e -; 8db8 -_CGB_BattleGrayscale: ; 8db8 +_CGB_BattleGrayscale: ld hl, PalPacket_BattleGrayscale + 1 ld de, wBGPals1 ld c, 4 @@ -81,7 +77,7 @@ _CGB_BattleGrayscale: ; 8db8 call CopyPalettes jr _CGB_FinishBattleScreenLayout -_CGB_BattleColors: ; 8ddb +_CGB_BattleColors: ld de, wBGPals1 call GetBattlemonBackpicPalettePointer push hl @@ -115,7 +111,7 @@ _CGB_BattleColors: ; 8ddb ld a, SCGB_BATTLE_COLORS ld [wSGBPredef], a call ApplyPals -_CGB_FinishBattleScreenLayout: ; 8e23 +_CGB_FinishBattleScreenLayout: call InitPartyMenuBGPal7 hlcoord 0, 0, wAttrMap ld bc, SCREEN_WIDTH * SCREEN_HEIGHT @@ -152,12 +148,11 @@ _CGB_FinishBattleScreenLayout: ; 8e23 call FarCopyWRAM call ApplyAttrMap ret -; 8e85 -InitPartyMenuBGPal7: ; 8e85 +InitPartyMenuBGPal7: farcall Function100dc0 -Mobile_InitPartyMenuBGPal7: ; 8e8b +Mobile_InitPartyMenuBGPal7: ld hl, PartyMenuBGPalette jr nc, .not_mobile ld hl, PartyMenuBGMobilePalette @@ -167,9 +162,8 @@ Mobile_InitPartyMenuBGPal7: ; 8e8b ld a, BANK(wBGPals1) call FarCopyWRAM ret -; 8e9f -InitPartyMenuBGPal0: ; 8e9f +InitPartyMenuBGPal0: farcall Function100dc0 ld hl, PartyMenuBGPalette jr nc, .not_mobile @@ -180,9 +174,8 @@ InitPartyMenuBGPal0: ; 8e9f ld a, BANK(wBGPals1) call FarCopyWRAM ret -; 8eb9 -_CGB_PokegearPals: ; 8eb9 +_CGB_PokegearPals: ld a, [wPlayerGender] bit PLAYERGENDER_FEMALE_F, a jr z, .male @@ -200,9 +193,8 @@ _CGB_PokegearPals: ; 8eb9 ld a, $1 ld [hCGBPalUpdate], a ret -; 8edb -_CGB_StatsScreenHPPals: ; 8edb +_CGB_StatsScreenHPPals: ld de, wBGPals1 ld a, [wCurHPPal] ld l, a @@ -255,17 +247,14 @@ _CGB_StatsScreenHPPals: ; 8edb ld a, $1 ld [hCGBPalUpdate], a ret -; 8f52 -StatsScreenPagePals: ; 8f52 +StatsScreenPagePals: INCLUDE "gfx/stats/pages.pal" -; 8f6a -StatsScreenPals: ; 8f6a +StatsScreenPals: INCLUDE "gfx/stats/stats.pal" -; 8f70 -_CGB_Pokedex: ; 8f70 +_CGB_Pokedex: ld de, wBGPals1 ld a, PREDEFPAL_POKEDEX call GetPredefPal @@ -297,17 +286,14 @@ _CGB_Pokedex: ; 8f70 ld a, $1 ld [hCGBPalUpdate], a ret -; 8fba -.PokedexQuestionMarkPalette: ; 8fba +.PokedexQuestionMarkPalette: INCLUDE "gfx/pokedex/question_mark.pal" -; 8fc2 -.PokedexCursorPalette: ; 8fc2 +.PokedexCursorPalette: INCLUDE "gfx/pokedex/cursor.pal" -; 8fca -_CGB_BillsPC: ; 8fca +_CGB_BillsPC: ld de, wBGPals1 ld a, PREDEFPAL_POKEDEX call GetPredefPal @@ -335,9 +321,8 @@ _CGB_BillsPC: ; 8fca ld a, $1 ld [hCGBPalUpdate], a ret -; 9009 -.Function9009: ; 9009 +.Function9009: ld hl, .BillsPCOrangePalette call LoadHLPaletteIntoDE jr .asm_901a @@ -358,13 +343,11 @@ _CGB_BillsPC: ; 8fca ld a, $1 ld [hCGBPalUpdate], a ret -; 9036 -.BillsPCOrangePalette: ; 9036 +.BillsPCOrangePalette: INCLUDE "gfx/pc/orange.pal" -; 903e -_CGB_PokedexUnownMode: ; 903e +_CGB_PokedexUnownMode: ld de, wBGPals1 ld a, PREDEFPAL_POKEDEX call GetPredefPal @@ -383,9 +366,8 @@ _CGB_PokedexUnownMode: ; 903e ld a, $1 ld [hCGBPalUpdate], a ret -; 906e -_CGB_SlotMachine: ; 906e +_CGB_SlotMachine: ld hl, SlotMachinePals ld de, wBGPals1 ld bc, 16 palettes @@ -437,9 +419,8 @@ _CGB_SlotMachine: ; 906e ld a, $1 ld [hCGBPalUpdate], a ret -; 90f8 -_CGB06: ; 90f8 +_CGB06: ld hl, PalPacket_SCGB_06 + 1 call CopyFourPalettes call WipeAttrMap @@ -456,9 +437,8 @@ _CGB06: ; 90f8 ld a, $1 ld [hCGBPalUpdate], a ret -; 9122 -_CGB_GSIntro: ; 9122 +_CGB_GSIntro: ld b, 0 ld hl, .Jumptable add hl, bc @@ -467,15 +447,13 @@ _CGB_GSIntro: ; 9122 ld h, [hl] ld l, a jp hl -; 912d -.Jumptable: ; 912d +.Jumptable: dw .ShellderLaprasScene dw .JigglypuffPikachuScene dw .StartersCharizardScene -; 9133 -.ShellderLaprasScene: ; 9133 +.ShellderLaprasScene: ld hl, .ShellderLaprasBGPalette ld de, wBGPals1 call LoadHLPaletteIntoDE @@ -486,15 +464,14 @@ _CGB_GSIntro: ; 9122 call FarCopyWRAM call WipeAttrMap ret -; 914e -.ShellderLaprasBGPalette: ; 914e +.ShellderLaprasBGPalette: RGB 19, 31, 19 RGB 18, 23, 31 RGB 11, 21, 28 RGB 04, 16, 24 -.ShellderLaprasOBPals: ; 9156 +.ShellderLaprasOBPals: RGB 29, 29, 29 RGB 20, 19, 20 RGB 19, 06, 04 @@ -504,9 +481,8 @@ _CGB_GSIntro: ; 9122 RGB 31, 31, 31 RGB 31, 00, 00 RGB 03, 04, 06 -; 9166 -.JigglypuffPikachuScene: ; 9166 +.JigglypuffPikachuScene: ld de, wBGPals1 ld a, PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_BG call GetPredefPal @@ -518,9 +494,8 @@ _CGB_GSIntro: ; 9122 call LoadHLPaletteIntoDE call WipeAttrMap ret -; 9180 -.StartersCharizardScene: ; 9180 +.StartersCharizardScene: ld hl, PalPacket_Pack + 1 call CopyFourPalettes ld de, wOBPals1 @@ -529,9 +504,8 @@ _CGB_GSIntro: ; 9122 call LoadHLPaletteIntoDE call WipeAttrMap ret -; 9195 -_CGB11: ; 9195 +_CGB11: ld hl, BetaPokerPals ld de, wBGPals1 ld bc, 5 palettes @@ -541,9 +515,8 @@ _CGB11: ; 9195 call WipeAttrMap call ApplyAttrMap ret -; 91ad -_CGB_Diploma: ; 91ad +_CGB_Diploma: ld hl, DiplomaPalettes ld de, wBGPals1 ld bc, 16 palettes @@ -555,16 +528,14 @@ _CGB_Diploma: ; 91ad call WipeAttrMap call ApplyAttrMap ret -; 91c8 -_CGB_MapPals: ; 91c8 +_CGB_MapPals: call LoadMapPals ld a, SCGB_MAPPALS ld [wSGBPredef], a ret -; 91d1 -_CGB_PartyMenu: ; 91d1 +_CGB_PartyMenu: ld hl, PalPacket_PartyMenu + 1 call CopyFourPalettes call InitPartyMenuBGPal0 @@ -572,9 +543,8 @@ _CGB_PartyMenu: ; 91d1 call InitPartyMenuOBPals call ApplyAttrMap ret -; 91e4 -_CGB_Evolution: ; 91e4 +_CGB_Evolution: ld de, wBGPals1 ld a, c and a @@ -607,9 +577,8 @@ _CGB_Evolution: ; 91e4 ld a, $1 ld [hCGBPalUpdate], a ret -; 9228 -_CGB_GSTitleScreen: ; 9228 +_CGB_GSTitleScreen: ld hl, UnusedGSTitleBGPals ld de, wBGPals1 ld bc, 5 palettes @@ -626,17 +595,15 @@ _CGB_GSTitleScreen: ; 9228 ld a, $1 ld [hCGBPalUpdate], a ret -; 9251 -_CGB0d: ; 9251 +_CGB0d: ld hl, PalPacket_Diploma + 1 call CopyFourPalettes call WipeAttrMap call ApplyAttrMap ret -; 925e -_CGB_UnownPuzzle: ; 925e +_CGB_UnownPuzzle: ld hl, PalPacket_UnownPuzzle + 1 call CopyFourPalettes ld de, wOBPals1 @@ -657,9 +624,8 @@ _CGB_UnownPuzzle: ; 925e call WipeAttrMap call ApplyAttrMap ret -; 9289 -_CGB_TrainerCard: ; 9289 +_CGB_TrainerCard: ld de, wBGPals1 xor a ; CHRIS call GetTrainerPalettePointer @@ -763,9 +729,8 @@ _CGB_TrainerCard: ; 9289 ld a, $1 ld [hCGBPalUpdate], a ret -; 9373 -_CGB_MoveList: ; 9373 +_CGB_MoveList: ld de, wBGPals1 ld a, PREDEFPAL_GOLDENROD call GetPredefPal @@ -788,9 +753,8 @@ _CGB_MoveList: ; 9373 ld a, $1 ld [hCGBPalUpdate], a ret -; 93a6 -_CGB_BetaPikachuMinigame: ; 93a6 +_CGB_BetaPikachuMinigame: ld hl, PalPacket_BetaPikachuMinigame + 1 call CopyFourPalettes call WipeAttrMap @@ -799,9 +763,8 @@ _CGB_BetaPikachuMinigame: ; 93a6 ld a, $1 ld [hCGBPalUpdate], a ret -; 93ba -_CGB_PokedexSearchOption: ; 93ba +_CGB_PokedexSearchOption: ld de, wBGPals1 ld a, PREDEFPAL_POKEDEX call GetPredefPal @@ -812,9 +775,8 @@ _CGB_PokedexSearchOption: ; 93ba ld a, $1 ld [hCGBPalUpdate], a ret -; 93d3 -_CGB_PackPals: ; 93d3 +_CGB_PackPals: ; pack pals ld a, [wBattleType] cp BATTLETYPE_TUTORIAL @@ -861,17 +823,14 @@ _CGB_PackPals: ; 93d3 ld a, $1 ld [hCGBPalUpdate], a ret -; 9439 -.ChrisPackPals: ; 9439 +.ChrisPackPals: INCLUDE "gfx/pack/pack.pal" -; 9469 -.KrisPackPals: ; 9469 +.KrisPackPals: INCLUDE "gfx/pack/pack_f.pal" -; 9499 -_CGB_Pokepic: ; 9499 +_CGB_Pokepic: call _CGB_MapPals ld de, SCREEN_WIDTH hlcoord 0, 0, wAttrMap @@ -904,9 +863,8 @@ _CGB_Pokepic: ; 9499 call FillBoxCGB call ApplyAttrMap ret -; 94d0 -_CGB13: ; 94d0 +_CGB13: ld hl, PalPacket_SCGB_13 + 1 call CopyFourPalettes call WipeAttrMap @@ -923,9 +881,8 @@ _CGB13: ; 94d0 ld a, $1 ld [hCGBPalUpdate], a ret -; 94fa -_CGB_GamefreakLogo: ; 94fa +_CGB_GamefreakLogo: ld de, wBGPals1 ld a, PREDEFPAL_GAMEFREAK_LOGO call GetPredefPal @@ -940,13 +897,11 @@ _CGB_GamefreakLogo: ; 94fa call ApplyAttrMap call ApplyPals ret -; 9521 -.Palette: ; 9521 +.Palette: INCLUDE "gfx/splash/logo.pal" -; 9529 -_CGB_PlayerOrMonFrontpicPals: ; 9529 +_CGB_PlayerOrMonFrontpicPals: ld de, wBGPals1 ld a, [wCurPartySpecies] ld bc, wTempMonDVs @@ -956,9 +911,8 @@ _CGB_PlayerOrMonFrontpicPals: ; 9529 call ApplyAttrMap call ApplyPals ret -; 9542 -_CGB1e: ; 9542 +_CGB1e: ld de, wBGPals1 ld a, [wCurPartySpecies] call GetMonPalettePointer_ @@ -966,9 +920,8 @@ _CGB1e: ; 9542 call WipeAttrMap call ApplyAttrMap ret -; 9555 -_CGB_TradeTube: ; 9555 +_CGB_TradeTube: ld hl, PalPacket_TradeTube + 1 call CopyFourPalettes ld hl, PartyMenuOBPals @@ -982,9 +935,8 @@ _CGB_TradeTube: ; 9555 call LoadHLPaletteIntoDE call WipeAttrMap ret -; 9578 -_CGB_TrainerOrMonFrontpicPals: ; 9578 +_CGB_TrainerOrMonFrontpicPals: ld de, wBGPals1 ld a, [wCurPartySpecies] ld bc, wTempMonDVs @@ -994,9 +946,8 @@ _CGB_TrainerOrMonFrontpicPals: ; 9578 call ApplyAttrMap call ApplyPals ret -; 9591 -_CGB_MysteryGift: ; 9591 +_CGB_MysteryGift: ld hl, .Palettes ld de, wBGPals1 ld bc, 2 palettes @@ -1026,8 +977,6 @@ _CGB_MysteryGift: ; 9591 call FillBoxCGB call ApplyAttrMap ret -; 95e0 -.Palettes: ; 95e0 +.Palettes: INCLUDE "gfx/mystery_gift/mystery_gift.pal" -; 95f0 diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm index d9b9b1dbc18..3be670d75ac 100644 --- a/engine/gfx/color.asm +++ b/engine/gfx/color.asm @@ -107,7 +107,7 @@ InitPartyMenuPalettes: ret ; SGB layout for SCGB_PARTY_MENU_HP_PALS -SGB_ApplyPartyMenuHPPals: ; 8ade +SGB_ApplyPartyMenuHPPals: ld hl, wHPPals ld a, [wSGBPals] ld e, a @@ -648,7 +648,7 @@ ApplyAttrMap: ret ; CGB layout for SCGB_PARTY_MENU_HP_PALS -CGB_ApplyPartyMenuHPPals: ; 96f3 +CGB_ApplyPartyMenuHPPals: ld hl, wHPPals ld a, [wSGBPals] ld e, a diff --git a/engine/gfx/crystal_layouts.asm b/engine/gfx/crystal_layouts.asm index 71e2e4f5638..bc7aa32920f 100644 --- a/engine/gfx/crystal_layouts.asm +++ b/engine/gfx/crystal_layouts.asm @@ -20,15 +20,13 @@ GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile) jp hl .done ret -; 49330 (12:5330) -.dw ; 49330 +.dw dw MG_Mobile_Layout00 dw MG_Mobile_Layout01 dw MG_Mobile_Layout02 -; 49336 -MG_Mobile_Layout_FillBox: ; 49336 +MG_Mobile_Layout_FillBox: .row push bc push hl @@ -43,16 +41,15 @@ MG_Mobile_Layout_FillBox: ; 49336 dec b jr nz, .row ret -; 49346 -MG_Mobile_Layout_WipeAttrMap: ; 49346 (12:5346) +MG_Mobile_Layout_WipeAttrMap: hlcoord 0, 0, wAttrMap ld bc, SCREEN_HEIGHT * SCREEN_WIDTH xor a call ByteFill ret -MG_Mobile_Layout_LoadPals: ; 49351 (12:5351) +MG_Mobile_Layout_LoadPals: ld de, wBGPals1 ld hl, Palette_MysteryGiftMobile ld bc, 5 palettes @@ -65,7 +62,7 @@ MG_Mobile_Layout_LoadPals: ; 49351 (12:5351) call FarCopyWRAM ret -MG_Mobile_Layout00: ; 4936e (12:536e) +MG_Mobile_Layout00: call MG_Mobile_Layout_LoadPals call MG_Mobile_Layout_WipeAttrMap call MG_Mobile_Layout_CreatePalBoxes @@ -73,7 +70,7 @@ MG_Mobile_Layout00: ; 4936e (12:536e) farcall ApplyPals ret -MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384) +MG_Mobile_Layout_CreatePalBoxes: hlcoord 0, 0, wAttrMap lb bc, 4, 1 ld a, $1 @@ -109,35 +106,30 @@ MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384) ld a, $7 call ByteFill ret -; 493e1 (12:53e1) -Palette_MysteryGiftMobile: ; 493e1 +Palette_MysteryGiftMobile: INCLUDE "gfx/mystery_gift/mg_mobile.pal" -; 49409 -LoadOW_BGPal7:: ; 49409 +LoadOW_BGPal7:: ld hl, Palette_TextBG7 ld de, wBGPals1 palette PAL_BG_TEXT ld bc, 1 palettes ld a, BANK(wBGPals1) call FarCopyWRAM ret -; 49418 -Palette_TextBG7: ; 49418 +Palette_TextBG7: INCLUDE "gfx/font/bg_text.pal" -; 49420 -Function49420:: ; 49420 (12:5420) +Function49420:: ld hl, MansionPalette1 + 8 palettes ld de, wBGPals1 palette PAL_BG_ROOF ld bc, 1 palettes ld a, BANK(wBGPals1) call FarCopyWRAM ret -; 4942f (12:542f) -MG_Mobile_Layout01: ; 4942f +MG_Mobile_Layout01: call MG_Mobile_Layout_LoadPals ld de, wBGPals1 palette PAL_BG_TEXT ld hl, .Palette_49478 @@ -168,16 +160,14 @@ MG_Mobile_Layout01: ; 4942f ld a, $1 ld [hCGBPalUpdate], a ret -; 49478 -.Palette_49478: ; 49478 +.Palette_49478: RGB 31, 31, 31 RGB 26, 31, 00 RGB 20, 16, 03 RGB 00, 00, 00 -; 49480 -Function49480: ; 49480 +Function49480: hlcoord 0, 0, wAttrMap lb bc, 4, SCREEN_WIDTH ld a, $7 @@ -188,9 +178,8 @@ Function49480: ; 49480 hlcoord 19, 2, wAttrMap ld [hl], a ret -; 49496 -Function49496: ; 49496 +Function49496: hlcoord 0, 0, wAttrMap lb bc, 2, SCREEN_WIDTH ld a, $7 @@ -201,11 +190,10 @@ Function49496: ; 49496 hlcoord 19, 1, wAttrMap ld [hl], a ret -; 494ac INCLUDE "engine/tilesets/tileset_palettes.asm" -MG_Mobile_Layout02: ; 49706 +MG_Mobile_Layout02: ld hl, .Palette_49732 ld de, wBGPals1 ld bc, 1 palettes @@ -220,23 +208,20 @@ MG_Mobile_Layout02: ; 49706 ld a, BANK(wOBPals1) call FarCopyWRAM ret -; 49732 -.Palette_49732: ; 49732 +.Palette_49732: RGB 31, 31, 31 RGB 23, 16, 07 RGB 23, 07, 07 RGB 03, 07, 20 -; 4973a -.Palette_4973a: ; 4973a +.Palette_4973a: RGB 00, 00, 00 RGB 07, 05, 31 RGB 14, 18, 31 RGB 31, 31, 31 -; 49742 -Function49742: ; 49742 +Function49742: ld hl, .Palette_49757 ld de, wBGPals1 ld bc, 8 palettes @@ -244,13 +229,11 @@ Function49742: ; 49742 call FarCopyWRAM farcall ApplyPals ret -; 49757 -.Palette_49757: ; 49757 +.Palette_49757: INCLUDE "gfx/unknown/49757.pal" -; 49797 -_InitMG_Mobile_LinkTradePalMap: ; 49797 +_InitMG_Mobile_LinkTradePalMap: hlcoord 0, 0, wAttrMap lb bc, 16, 2 ld a, $4 @@ -300,9 +283,8 @@ _InitMG_Mobile_LinkTradePalMap: ; 49797 ld bc, 6 call ByteFill ret -; 49811 -LoadTradeRoomBGPals: ; 49811 +LoadTradeRoomBGPals: ld hl, TradeRoomPalette ld de, wBGPals1 palette PAL_BG_GREEN ld bc, 6 palettes @@ -310,16 +292,13 @@ LoadTradeRoomBGPals: ; 49811 call FarCopyWRAM farcall ApplyPals ret -; 49826 -TradeRoomPalette: ; 49826 +TradeRoomPalette: INCLUDE "gfx/trade/border.pal" -; 49856 -InitMG_Mobile_LinkTradePalMap: ; 49856 +InitMG_Mobile_LinkTradePalMap: call _InitMG_Mobile_LinkTradePalMap ret -; 4985a ; unused INCLUDE "gfx/unknown/4985a.asm" diff --git a/engine/gfx/dma_transfer.asm b/engine/gfx/dma_transfer.asm index e22adf69a9d..6519949df03 100644 --- a/engine/gfx/dma_transfer.asm +++ b/engine/gfx/dma_transfer.asm @@ -1,4 +1,4 @@ -HDMATransferAttrMapAndTileMapToWRAMBank3:: ; 104000 +HDMATransferAttrMapAndTileMapToWRAMBank3:: ld hl, .Function jp CallInSafeGFXMode @@ -18,9 +18,8 @@ HDMATransferAttrMapAndTileMapToWRAMBank3:: ; 104000 ld hl, wScratchAttrMap call HDMATransferToWRAMBank3 ret -; 10402d -HDMATransferTileMapToWRAMBank3:: ; 10402d +HDMATransferTileMapToWRAMBank3:: ld hl, .Function jp CallInSafeGFXMode @@ -33,9 +32,8 @@ HDMATransferTileMapToWRAMBank3:: ; 10402d ld hl, wScratchTileMap call HDMATransferToWRAMBank3 ret -; 104047 -HDMATransferAttrMapToWRAMBank3: ; 104047 +HDMATransferAttrMapToWRAMBank3: ld hl, .Function jp CallInSafeGFXMode @@ -48,9 +46,8 @@ HDMATransferAttrMapToWRAMBank3: ; 104047 ld hl, wScratchAttrMap call HDMATransferToWRAMBank3 ret -; 104061 -ReloadMapPart:: ; 104061 +ReloadMapPart:: ld hl, .Function jp CallInSafeGFXMode @@ -80,7 +77,7 @@ ReloadMapPart:: ; 104061 ret -Mobile_ReloadMapPart: ; 104099 +Mobile_ReloadMapPart: ld hl, ReloadMapPart ; useless ld hl, .Function jp CallInSafeGFXMode @@ -110,7 +107,6 @@ Mobile_ReloadMapPart: ; 104099 ei ret -; 1040d4 ; unused ld hl, .unreferenced_1040da @@ -134,7 +130,6 @@ Mobile_ReloadMapPart: ; 104099 ld [hDMATransfer], a call WaitDMATransfer ret -; 1040fb ; unused ld hl, .unreferenced_104101 @@ -148,9 +143,8 @@ Mobile_ReloadMapPart: ; 104099 ld hl, w3_d800 call HDMATransferToWRAMBank3 ret -; 104110 -OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 104110 +OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; OpenText ld hl, .Function jp CallInSafeGFXMode @@ -182,9 +176,8 @@ OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 104110 ld [rVBK], a ei ret -; 104148 -Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ; 104148 (41:4148) +Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ld hl, .Function jp CallInSafeGFXMode @@ -209,9 +202,8 @@ Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ; 104148 (41:4148) ld hl, wScratchTileMap call HDMATransfer_Wait127Scanlines_toBGMap ret -; 104177 -CallInSafeGFXMode: ; 104177 +CallInSafeGFXMode: ld a, [hBGMapMode] push af ld a, [hMapAnims] @@ -237,19 +229,17 @@ CallInSafeGFXMode: ; 104177 pop af ld [hBGMapMode], a ret -; 10419c -._hl_ ; 10419c +._hl_ jp hl -; 10419d -HDMATransferToWRAMBank3: ; 10419d (41:419d) +HDMATransferToWRAMBank3: call _LoadHDMAParameters ld a, $23 ld [hDMATransfer], a -WaitDMATransfer: ; 104a14 +WaitDMATransfer: .loop call DelayFrame ld a, [hDMATransfer] @@ -257,7 +247,7 @@ WaitDMATransfer: ; 104a14 jr nz, .loop ret -HDMATransfer_Wait127Scanlines_toBGMap: ; 1041ad (41:41ad) +HDMATransfer_Wait127Scanlines_toBGMap: ; HDMA transfer from hl to [hBGMapAddress] ; hBGMapAddress -> de ; 2 * SCREEN_HEIGHT -> c @@ -268,7 +258,7 @@ HDMATransfer_Wait127Scanlines_toBGMap: ; 1041ad (41:41ad) ld c, 2 * SCREEN_HEIGHT jr HDMATransfer_Wait127Scanlines -HDMATransfer_Wait123Scanlines_toBGMap: ; 1041b7 (41:41b7) +HDMATransfer_Wait123Scanlines_toBGMap: ; HDMA transfer from hl to [hBGMapAddress] ; hBGMapAddress -> de ; 2 * SCREEN_HEIGHT -> c @@ -279,9 +269,8 @@ HDMATransfer_Wait123Scanlines_toBGMap: ; 1041b7 (41:41b7) ld e, a ld c, 2 * SCREEN_HEIGHT jr HDMATransfer_Wait123Scanlines -; 1041c1 (41:41c1) -HDMATransfer_NoDI: ; 1041c1 +HDMATransfer_NoDI: ; HDMA transfer from hl to [hBGMapAddress] ; [hBGMapAddress] --> de ; 2 * SCREEN_HEIGHT --> c @@ -339,7 +328,6 @@ HDMATransfer_NoDI: ; 1041c1 ld hl, rHDMA5 res 7, [hl] ret -; 104205 HDMATransfer_Wait123Scanlines: ld b, $7b @@ -407,10 +395,9 @@ _continue_HDMATransfer: ei ret -; 10424e -_LoadHDMAParameters: ; 10424e (41:424e) +_LoadHDMAParameters: ld a, h ld [rHDMA1], a ld a, l @@ -422,14 +409,14 @@ _LoadHDMAParameters: ; 10424e (41:424e) ld [rHDMA4], a ret -PadTilemapForHDMATransfer: ; 10425f (41:425f) +PadTilemapForHDMATransfer: ld c, " " jr PadMapForHDMATransfer -PadAttrMapForHDMATransfer: ; 104263 (41:4263) +PadAttrMapForHDMATransfer: ld c, $0 -PadMapForHDMATransfer: ; 104265 (41:4265) +PadMapForHDMATransfer: ; pad a 20x18 map to 32x18 for HDMA transfer ; back up the padding value in c to hMapObjectIndexBuffer ld a, [hMapObjectIndexBuffer] @@ -467,7 +454,7 @@ PadMapForHDMATransfer: ; 104265 (41:4265) ret -_Get2bpp:: ; 104284 +_Get2bpp:: ; 2bpp when [rLCDC] & $80 ; switch to WRAM bank 6 ld a, [rSVBK] @@ -510,9 +497,8 @@ _Get2bpp:: ; 104284 pop af ld [rSVBK], a ret -; 1042b2 -_Get1bpp:: ; 1042b2 +_Get1bpp:: ; 1bpp when [rLCDC] & $80 .loop ld a, c @@ -537,9 +523,8 @@ _Get1bpp:: ; 1042b2 sub $10 ld c, a jr .loop -; 1042d6 -.bankswitch ; 1042d6 +.bankswitch ld a, [rSVBK] push af ld a, BANK(wScratchTileMap) @@ -576,12 +561,10 @@ _Get1bpp:: ; 1042b2 pop af ld [rSVBK], a ret -; 104303 -HDMATransfer_OnlyTopFourRows: ; 104303 +HDMATransfer_OnlyTopFourRows: ld hl, .Function jp CallInSafeGFXMode -; 104309 .Function: ld hl, wScratchTileMap @@ -604,7 +587,7 @@ HDMATransfer_OnlyTopFourRows: ; 104303 call HDMATransfer_Wait127Scanlines ret -.Copy: ; 10433a (41:433a) +.Copy: ld b, 4 .outer_loop ld c, SCREEN_WIDTH @@ -623,4 +606,3 @@ HDMATransfer_OnlyTopFourRows: ; 104303 dec b jr nz, .outer_loop ret -; 104350 diff --git a/engine/gfx/load_font.asm b/engine/gfx/load_font.asm index 40dbb9c10e4..41c0721d651 100644 --- a/engine/gfx/load_font.asm +++ b/engine/gfx/load_font.asm @@ -5,22 +5,20 @@ INCLUDE "gfx/font.asm" Unreferenced_fb434: db 0 -Unreferenced_Functionfb435: ; 4b435 +Unreferenced_Functionfb435: ld a, [Unreferenced_fb434] and a jp nz, Get1bpp_2 jp Get1bpp -; fb43f -Unreferenced_Functionfb43f: ; fb43f +Unreferenced_Functionfb43f: ld a, [Unreferenced_fb434] and a jp nz, Get2bpp_2 jp Get2bpp ; End unreferenced block -; fb449 -_LoadStandardFont:: ; fb449 +_LoadStandardFont:: ld de, Font ld hl, vTiles1 lb bc, BANK(Font), 128 ; "A" to "9" @@ -45,9 +43,8 @@ _LoadStandardFont:: ; fb449 lb bc, BANK(Font), 32 ; "'" to "9" call Get1bpp_2 ret -; fb48a -_LoadFontsExtra1:: ; fb48a +_LoadFontsExtra1:: ld de, FontsExtra_SolidBlackGFX ld hl, vTiles2 tile "■" ; $60 lb bc, BANK(FontsExtra_SolidBlackGFX), 1 @@ -61,26 +58,23 @@ _LoadFontsExtra1:: ; fb48a lb bc, BANK(FontExtra), 22 ; "" to "ぉ" call Get2bpp_2 jr LoadFrame -; fb4b0 -_LoadFontsExtra2:: ; fb4b0 +_LoadFontsExtra2:: ld de, FontsExtra2_UpArrowGFX ld hl, vTiles2 tile "▲" ; $61 ld b, BANK(FontsExtra2_UpArrowGFX) ld c, 1 call Get2bpp_2 ret -; fb4be -_LoadFontsBattleExtra:: ; fb4be +_LoadFontsBattleExtra:: ld de, FontBattleExtra ld hl, vTiles2 tile $60 lb bc, BANK(FontBattleExtra), 25 call Get2bpp_2 jr LoadFrame -; fb4cc -LoadFrame: ; fb4cc +LoadFrame: ld a, [wTextBoxFrame] maskbits NUM_FRAMES ld bc, 6 * LEN_1BPP_TILE @@ -96,9 +90,8 @@ LoadFrame: ; fb4cc lb bc, BANK(TextBoxSpaceGFX), 1 call Get1bpp_2 ret -; fb4f2 -LoadBattleFontsHPBar: ; fb4f2 +LoadBattleFontsHPBar: ld de, FontBattleExtra ld hl, vTiles2 tile $60 lb bc, BANK(FontBattleExtra), 12 @@ -109,7 +102,7 @@ LoadBattleFontsHPBar: ; fb4f2 call Get2bpp_2 call LoadFrame -LoadHPBar: ; fb50d +LoadHPBar: ld de, EnemyHPBarBorderGFX ld hl, vTiles2 tile $6c lb bc, BANK(EnemyHPBarBorderGFX), 4 @@ -127,9 +120,8 @@ LoadHPBar: ; fb50d lb bc, BANK(MobilePhoneTilesGFX), 2 call Get2bpp_2 ret -; fb53e -StatsScreen_LoadFont: ; fb53e +StatsScreen_LoadFont: call _LoadFontsBattleExtra ld de, EnemyHPBarBorderGFX ld hl, vTiles2 tile $6c @@ -147,10 +139,9 @@ StatsScreen_LoadFont: ; fb53e ld hl, vTiles2 tile $55 lb bc, BANK(ExpBarGFX), 8 call Get2bpp_2 -LoadStatsScreenPageTilesGFX: ; fb571 +LoadStatsScreenPageTilesGFX: ld de, StatsScreenPageTilesGFX ld hl, vTiles2 tile $31 lb bc, BANK(StatsScreenPageTilesGFX), 17 call Get2bpp_2 ret -; fb57e diff --git a/engine/gfx/load_overworld_font.asm b/engine/gfx/load_overworld_font.asm index f23f01c4e22..f4ef8461911 100644 --- a/engine/gfx/load_overworld_font.asm +++ b/engine/gfx/load_overworld_font.asm @@ -1,4 +1,4 @@ -LoadOverworldFont:: ; 106594 +LoadOverworldFont:: ld de, .OverworldFontGFX ld hl, vTiles1 lb bc, BANK(.OverworldFontGFX), $80 @@ -8,7 +8,6 @@ LoadOverworldFont:: ; 106594 lb bc, BANK(.OverworldFontSpaceGFX), 1 call Get2bpp ret -; 1065ad .OverworldFontGFX: INCBIN "gfx/font/overworld.2bpp" diff --git a/engine/gfx/load_pics.asm b/engine/gfx/load_pics.asm index 9c909a5cd36..9be8428a9c1 100644 --- a/engine/gfx/load_pics.asm +++ b/engine/gfx/load_pics.asm @@ -1,4 +1,4 @@ -GetUnownLetter: ; 51040 +GetUnownLetter: ; Return Unown letter in wUnownLetter based on DVs at hl ; Take the middle 2 bits of each DV and place them in order: @@ -48,7 +48,7 @@ GetUnownLetter: ; 51040 ld [wUnownLetter], a ret -GetMonFrontpic: ; 51077 +GetMonFrontpic: ld a, [wCurPartySpecies] ld [wCurSpecies], a call IsAPokemon @@ -60,7 +60,7 @@ GetMonFrontpic: ; 51077 ld [rSVBK], a ret -GetAnimatedFrontpic: ; 5108b +GetAnimatedFrontpic: ld a, [wCurPartySpecies] ld [wCurSpecies], a call IsAPokemon @@ -75,7 +75,7 @@ GetAnimatedFrontpic: ; 5108b ld [rSVBK], a ret -_GetFrontpic: ; 510a5 +_GetFrontpic: push de call GetBaseData ld a, [wBasePicSize] @@ -102,7 +102,7 @@ _GetFrontpic: ; 510a5 pop hl ret -GetFrontpicPointer: ; 510d7 +GetFrontpicPointer: ld a, [wCurPartySpecies] cp UNOWN jr z, .unown @@ -129,7 +129,7 @@ GetFrontpicPointer: ; 510d7 pop bc ret -GetAnimatedEnemyFrontpic: ; 51103 +GetAnimatedEnemyFrontpic: ld a, BANK(vTiles3) ld [rVBK], a push hl @@ -172,7 +172,7 @@ GetAnimatedEnemyFrontpic: ; 51103 ld [rVBK], a ret -LoadFrontpicTiles: ; 5114f +LoadFrontpicTiles: ld hl, wDecompressScratch swap c ld a, c @@ -193,7 +193,7 @@ LoadFrontpicTiles: ; 5114f jr nz, .loop ret -GetMonBackpic: ; 5116c +GetMonBackpic: ld a, [wCurPartySpecies] call IsAPokemon ret c @@ -244,7 +244,7 @@ GetMonBackpic: ; 5116c ld [rSVBK], a ret -FixPicBank: ; 511c5 +FixPicBank: ; This is a thing for some reason. PICS_FIX EQU $36 @@ -262,7 +262,7 @@ GLOBAL PICS_FIX pop hl ret -.PicsBanks: ; 511d4 +.PicsBanks: db BANK("Pics 1") ; BANK("Pics 1") + 0 db BANK("Pics 2") ; BANK("Pics 1") + 1 db BANK("Pics 3") ; BANK("Pics 1") + 2 @@ -288,7 +288,7 @@ GLOBAL PICS_FIX db BANK("Pics 23") ; BANK("Pics 1") + 22 db BANK("Pics 24") ; BANK("Pics 1") + 23 -Function511ec: ; 511ec +Function511ec: ld a, c push de ld hl, PokemonPicPointers @@ -307,7 +307,7 @@ Function511ec: ; 511ec call FarDecompress ret -GetTrainerPic: ; 5120d +GetTrainerPic: ld a, [wTrainerClass] and a ret z @@ -349,7 +349,7 @@ GetTrainerPic: ; 5120d ld [hBGMapMode], a ret -DecompressGet2bpp: ; 5125d +DecompressGet2bpp: ; Decompress lz data from b:hl to scratch space at 6:d000, then copy it to address de. ld a, [rSVBK] @@ -373,7 +373,7 @@ DecompressGet2bpp: ; 5125d ld [rSVBK], a ret -FixBackpicAlignment: ; 5127c +FixBackpicAlignment: push de push bc ld a, [wBoxAlignment] @@ -409,7 +409,7 @@ FixBackpicAlignment: ; 5127c pop de ret -PadFrontpic: ; 512ab +PadFrontpic: ; pads frontpic to fill 7x7 box ld a, b cp 6 @@ -461,7 +461,7 @@ PadFrontpic: ; 512ab jr nz, .Fill ret -LoadOrientedFrontpic: ; 512f2 +LoadOrientedFrontpic: ld a, [wBoxAlignment] and a jr nz, .x_flip diff --git a/engine/gfx/load_push_oam.asm b/engine/gfx/load_push_oam.asm index 95f67ff731a..11045bb9ddd 100644 --- a/engine/gfx/load_push_oam.asm +++ b/engine/gfx/load_push_oam.asm @@ -1,4 +1,4 @@ -WriteOAMDMACodeToHRAM:: ; 4031 +WriteOAMDMACodeToHRAM:: ld c, hTransferVirtualOAM - $ff00 ld b, .PushOAMEnd - .PushOAM ld hl, .PushOAM @@ -10,7 +10,7 @@ WriteOAMDMACodeToHRAM:: ; 4031 jr nz, .loop ret -.PushOAM: ; 403f +.PushOAM: ld a, HIGH(wVirtualOAM) ld [rDMA], a ld a, NUM_SPRITE_OAM_STRUCTS diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm index 5a26d2d7c3c..151f8bad52e 100644 --- a/engine/gfx/mon_icons.asm +++ b/engine/gfx/mon_icons.asm @@ -1,4 +1,4 @@ -LoadOverworldMonIcon: ; 8e82b +LoadOverworldMonIcon: ld a, e call ReadMonMenuIcon ld l, a @@ -12,9 +12,8 @@ LoadOverworldMonIcon: ; 8e82b ld b, BANK(Icons) ld c, 8 ret -; 8e83f -LoadMenuMonIcon: ; 8e83f +LoadMenuMonIcon: push hl push de push bc @@ -23,9 +22,8 @@ LoadMenuMonIcon: ; 8e83f pop de pop hl ret -; 8e849 -.LoadIcon: ; 8e849 +.LoadIcon: ld d, 0 ld hl, .Jumptable add hl, de @@ -34,10 +32,9 @@ LoadMenuMonIcon: ; 8e83f ld h, [hl] ld l, a jp hl -; 8e854 -.Jumptable: ; 8e854 (23:6854) +.Jumptable: dw PartyMenu_InitAnimatedMonIcon ; party menu dw NamingScreen_InitAnimatedMonIcon ; naming screen dw MoveList_InitAnimatedMonIcon ; moves (?) @@ -46,13 +43,13 @@ LoadMenuMonIcon: ; 8e83f dw Mobile_InitPartyMenuBGPal71 ; mobile dw .GetPartyMenuMonIcon ; unused -.GetPartyMenuMonIcon: ; 8e862 (23:6862) +.GetPartyMenuMonIcon: call InitPartyMenuIcon call .GetPartyMonItemGFX call SetPartyMonIconAnimSpeed ret -.GetPartyMonItemGFX: ; 8e86c (23:686c) +.GetPartyMonItemGFX: push bc ld a, [hObjectStructIndexBuffer] ld hl, wPartyMon1Item @@ -83,7 +80,7 @@ LoadMenuMonIcon: ; 8e83f ld [hl], a ret -Mobile_InitAnimatedMonIcon: ; 8e898 (23:6898) +Mobile_InitAnimatedMonIcon: call PartyMenu_InitAnimatedMonIcon ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID add hl, bc @@ -99,7 +96,7 @@ Mobile_InitAnimatedMonIcon: ; 8e898 (23:6898) ld [hl], a ret -Mobile_InitPartyMenuBGPal71: ; 8e8b1 (23:68b1) +Mobile_InitPartyMenuBGPal71: call InitPartyMenuIcon call SetPartyMonIconAnimSpeed ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID @@ -120,13 +117,13 @@ Mobile_InitPartyMenuBGPal71: ; 8e8b1 (23:68b1) ld [wc608 + 1], a ret -PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5) +PartyMenu_InitAnimatedMonIcon: call InitPartyMenuIcon call .SpawnItemIcon call SetPartyMonIconAnimSpeed ret -.SpawnItemIcon: ; 8e8df (23:68df) +.SpawnItemIcon: push bc ld a, [hObjectStructIndexBuffer] ld hl, wPartyMon1Item @@ -154,7 +151,7 @@ PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5) ld [hl], a ret -InitPartyMenuIcon: ; 8e908 (23:6908) +InitPartyMenuIcon: ld a, [wCurIconTile] push af ld a, [hObjectStructIndexBuffer] @@ -185,7 +182,7 @@ InitPartyMenuIcon: ; 8e908 (23:6908) ld [hl], a ret -SetPartyMonIconAnimSpeed: ; 8e936 (23:6936) +SetPartyMonIconAnimSpeed: push bc ld a, [hObjectStructIndexBuffer] ld b, a @@ -202,7 +199,7 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936) ld [hl], a ret -.getspeed ; 8e94c (23:694c) +.getspeed farcall PlacePartymonHPBar call GetHPPal ld e, d @@ -211,15 +208,13 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936) add hl, de ld b, [hl] ret -; 8e95e (23:695e) -.speeds ; 8e95e +.speeds db $00 ; HP_GREEN db $40 ; HP_YELLOW db $80 ; HP_RED -; 8e961 -NamingScreen_InitAnimatedMonIcon: ; 8e961 (23:6961) +NamingScreen_InitAnimatedMonIcon: ld a, [wd265] call ReadMonMenuIcon ld [wCurIcon], a @@ -233,7 +228,7 @@ NamingScreen_InitAnimatedMonIcon: ; 8e961 (23:6961) ld [hl], SPRITE_ANIM_SEQ_NULL ret -MoveList_InitAnimatedMonIcon: ; 8e97d (23:697d) +MoveList_InitAnimatedMonIcon: ld a, [wd265] call ReadMonMenuIcon ld [wCurIcon], a @@ -248,7 +243,7 @@ MoveList_InitAnimatedMonIcon: ; 8e97d (23:697d) ld [hl], SPRITE_ANIM_SEQ_NULL ret -Trade_LoadMonIconGFX: ; 8e99a (23:699a) +Trade_LoadMonIconGFX: ld a, [wd265] call ReadMonMenuIcon ld [wCurIcon], a @@ -257,7 +252,7 @@ Trade_LoadMonIconGFX: ; 8e99a (23:699a) call GetMemIconGFX ret -GetSpeciesIcon: ; 8e9ac +GetSpeciesIcon: ; Load species icon into VRAM at tile a push de ld a, [wd265] @@ -267,10 +262,9 @@ GetSpeciesIcon: ; 8e9ac ld a, e call GetIconGFX ret -; 8e9bc -FlyFunction_GetMonIcon: ; 8e9bc (23:69bc) +FlyFunction_GetMonIcon: push de ld a, [wd265] call ReadMonMenuIcon @@ -279,9 +273,8 @@ FlyFunction_GetMonIcon: ; 8e9bc (23:69bc) ld a, e call GetIcon_a ret -; 8e9cc (23:69cc) -Unreferenced_GetMonIcon2: ; 8e9cc +Unreferenced_GetMonIcon2: push de ld a, [wd265] call ReadMonMenuIcon @@ -289,11 +282,10 @@ Unreferenced_GetMonIcon2: ; 8e9cc pop de call GetIcon_de ret -; 8e9db -GetMemIconGFX: ; 8e9db (23:69db) +GetMemIconGFX: ld a, [wCurIconTile] -GetIconGFX: ; 8e9de +GetIconGFX: call GetIcon_a ld de, 8 tiles add hl, de @@ -308,20 +300,19 @@ GetIconGFX: ; 8e9de HeldItemIcons: INCBIN "gfx/icons/mail.2bpp" INCBIN "gfx/icons/item.2bpp" -; 8ea17 -GetIcon_de: ; 8ea17 +GetIcon_de: ; Load icon graphics into VRAM starting from tile de. ld l, e ld h, d jr GetIcon -GetIcon_a: ; 8ea1b +GetIcon_a: ; Load icon graphics into VRAM starting from tile a. ld l, a ld h, 0 -GetIcon: ; 8ea1e +GetIcon: ; Load icon graphics into VRAM starting from tile hl. ; One tile is 16 bytes long. @@ -352,16 +343,14 @@ endr pop hl ret -; 8ea3f -GetGFXUnlessMobile: ; 8ea3f +GetGFXUnlessMobile: ld a, [wLinkMode] cp LINK_MOBILE jp nz, Request2bpp jp Get2bpp_2 -; 8ea4a -FreezeMonIcons: ; 8ea4a +FreezeMonIcons: ld hl, wSpriteAnimationStructs ld e, PARTY_LENGTH ld a, [wMenuCursorY] @@ -393,9 +382,8 @@ FreezeMonIcons: ; 8ea4a dec e jr nz, .loop ret -; 8ea71 -UnfreezeMonIcons: ; 8ea71 +UnfreezeMonIcons: ld hl, wSpriteAnimationStructs ld e, PARTY_LENGTH .loop @@ -415,9 +403,8 @@ UnfreezeMonIcons: ; 8ea71 dec e jr nz, .loop ret -; 8ea8c (23:6a8c) -HoldSwitchmonIcon: ; 8ea8c +HoldSwitchmonIcon: ld hl, wSpriteAnimationStructs ld e, PARTY_LENGTH ld a, [wSwitchMon] @@ -448,7 +435,7 @@ HoldSwitchmonIcon: ; 8ea8c jr nz, .loop ret -ReadMonMenuIcon: ; 8eab3 +ReadMonMenuIcon: cp EGG jr z, .egg dec a @@ -461,7 +448,6 @@ ReadMonMenuIcon: ; 8eab3 .egg ld a, ICON_EGG ret -; 8eac4 INCLUDE "data/pokemon/menu_icons.asm" diff --git a/engine/gfx/pic_animation.asm b/engine/gfx/pic_animation.asm index 92529638821..362fe49cd6d 100644 --- a/engine/gfx/pic_animation.asm +++ b/engine/gfx/pic_animation.asm @@ -1,6 +1,6 @@ ; Pic animation arrangement. -Unused_AnimateMon_Slow_Normal: ; d0000 +Unused_AnimateMon_Slow_Normal: hlcoord 12, 0 ld a, [wBattleMode] cp WILD_BATTLE @@ -15,42 +15,36 @@ Unused_AnimateMon_Slow_Normal: ; d0000 ld d, $0 call AnimateFrontpic ret -; d001a -AnimateMon_Menu: ; d001a +AnimateMon_Menu: ld e, ANIM_MON_MENU ld d, $0 call AnimateFrontpic ret -; d0022 -AnimateMon_Trade: ; d0022 +AnimateMon_Trade: ld e, ANIM_MON_TRADE ld d, $0 call AnimateFrontpic ret -; d002a -AnimateMon_Evolve: ; d002a +AnimateMon_Evolve: ld e, ANIM_MON_EVOLVE ld d, $0 call AnimateFrontpic ret -; d0032 -AnimateMon_Hatch: ; d0032 +AnimateMon_Hatch: ld e, ANIM_MON_HATCH ld d, $0 call AnimateFrontpic ret -; d003a -AnimateMon_Unused: ; d003a +AnimateMon_Unused: ld e, ANIM_MON_UNUSED ld d, $0 call AnimateFrontpic ret -; d0042 pokeanim: MACRO rept _NARG @@ -64,7 +58,7 @@ endr db (PokeAnim_Finish_ - PokeAnim_SetupCommands) / 2 ENDM -PokeAnims: ; d0042 +PokeAnims: dw .Slow dw .Normal dw .Menu @@ -86,7 +80,7 @@ PokeAnims: ; d0042 .Egg2: pokeanim Idle, Play -AnimateFrontpic: ; d008e +AnimateFrontpic: call AnimateMon_CheckIfPokemon ret c call LoadMonAnimation @@ -97,9 +91,8 @@ AnimateFrontpic: ; d008e pop af jr nc, .loop ret -; d00a3 -LoadMonAnimation: ; d00a3 +LoadMonAnimation: push hl ld c, e ld b, 0 @@ -112,9 +105,8 @@ LoadMonAnimation: ; d00a3 pop hl call PokeAnim_InitPicAttributes ret -; d00b4 -SetUpPokeAnim: ; d00b4 +SetUpPokeAnim: ld a, [rSVBK] push af ld a, BANK(wPokeAnimSceneIndex) @@ -139,9 +131,8 @@ SetUpPokeAnim: ; d00b4 ret z scf ret -; d00da -PokeAnim_SetupCommands: ; d00da +PokeAnim_SetupCommands: setup_command: MACRO \1_: dw \1 ENDM @@ -157,16 +148,15 @@ ENDM setup_command PokeAnim_Cry setup_command PokeAnim_CryNoWait setup_command PokeAnim_StereoCry -; d00f2 -PokeAnim_SetWait: ; d00f2 +PokeAnim_SetWait: ld a, 18 ld [wPokeAnimWaitCounter], a ld a, [wPokeAnimSceneIndex] inc a ld [wPokeAnimSceneIndex], a -PokeAnim_Wait: ; d00fe +PokeAnim_Wait: ld hl, wPokeAnimWaitCounter dec [hl] ret nz @@ -174,9 +164,8 @@ PokeAnim_Wait: ; d00fe inc a ld [wPokeAnimSceneIndex], a ret -; d010b -PokeAnim_Setup: ; d010b +PokeAnim_Setup: ld c, FALSE ld b, 0 call PokeAnim_InitAnim @@ -185,9 +174,8 @@ PokeAnim_Setup: ; d010b inc a ld [wPokeAnimSceneIndex], a ret -; d011d -PokeAnim_Setup2: ; d011d +PokeAnim_Setup2: ld c, FALSE ld b, 4 call PokeAnim_InitAnim @@ -196,9 +184,8 @@ PokeAnim_Setup2: ; d011d inc a ld [wPokeAnimSceneIndex], a ret -; d012f -PokeAnim_Idle: ; d012f +PokeAnim_Idle: ld c, TRUE ld b, 0 call PokeAnim_InitAnim @@ -207,9 +194,8 @@ PokeAnim_Idle: ; d012f inc a ld [wPokeAnimSceneIndex], a ret -; d0141 -PokeAnim_Play: ; d0141 +PokeAnim_Play: call PokeAnim_DoAnimScript ld a, [wPokeAnimJumptableIndex] bit 7, a @@ -219,9 +205,8 @@ PokeAnim_Play: ; d0141 inc a ld [wPokeAnimSceneIndex], a ret -; d0155 -PokeAnim_Play2: ; d0155 +PokeAnim_Play2: call PokeAnim_DoAnimScript ld a, [wPokeAnimJumptableIndex] bit 7, a @@ -230,42 +215,37 @@ PokeAnim_Play2: ; d0155 inc a ld [wPokeAnimSceneIndex], a ret -; d0166 -PokeAnim_BasePic: ; d0166 +PokeAnim_BasePic: call PokeAnim_DeinitFrames ld a, [wPokeAnimSceneIndex] inc a ld [wPokeAnimSceneIndex], a ret -; d0171 -PokeAnim_Finish: ; d0171 +PokeAnim_Finish: call PokeAnim_DeinitFrames ld hl, wPokeAnimSceneIndex set 7, [hl] ret -; d017a -PokeAnim_Cry: ; d017a +PokeAnim_Cry: ld a, [wPokeAnimSpecies] call _PlayMonCry ld a, [wPokeAnimSceneIndex] inc a ld [wPokeAnimSceneIndex], a ret -; d0188 -PokeAnim_CryNoWait: ; d0188 +PokeAnim_CryNoWait: ld a, [wPokeAnimSpecies] call PlayMonCry2 ld a, [wPokeAnimSceneIndex] inc a ld [wPokeAnimSceneIndex], a ret -; d0196 -PokeAnim_StereoCry: ; d0196 +PokeAnim_StereoCry: ld a, $f ld [wCryTracks], a ld a, [wPokeAnimSpecies] @@ -274,9 +254,8 @@ PokeAnim_StereoCry: ; d0196 inc a ld [wPokeAnimSceneIndex], a ret -; d01a9 -PokeAnim_DeinitFrames: ; d01a9 +PokeAnim_DeinitFrames: ld a, [rSVBK] push af ld a, BANK(wPokeAnimCoord) @@ -288,9 +267,8 @@ PokeAnim_DeinitFrames: ; d01a9 pop af ld [rSVBK], a ret -; d01c6 -AnimateMon_CheckIfPokemon: ; d01c6 +AnimateMon_CheckIfPokemon: ld a, [wCurPartySpecies] cp EGG jr z, .fail @@ -302,9 +280,8 @@ AnimateMon_CheckIfPokemon: ; d01c6 .fail scf ret -; d01d6 -PokeAnim_InitPicAttributes: ; d01d6 +PokeAnim_InitPicAttributes: ld a, [rSVBK] push af ld a, BANK(wPokeAnimSceneIndex) @@ -355,9 +332,8 @@ PokeAnim_InitPicAttributes: ; d01d6 pop af ld [rSVBK], a ret -; d0228 -PokeAnim_InitAnim: ; d0228 +PokeAnim_InitAnim: ld a, [rSVBK] push af ld a, BANK(wPokeAnimIdleFlag) @@ -378,9 +354,8 @@ PokeAnim_InitAnim: ; d0228 pop af ld [rSVBK], a ret -; d0250 -PokeAnim_DoAnimScript: ; d0250 +PokeAnim_DoAnimScript: xor a ld [hBGMapMode], a .loop @@ -389,14 +364,12 @@ PokeAnim_DoAnimScript: ; d0250 ld hl, .Jumptable rst JumpTable ret -; d025d -.Jumptable: ; d025d +.Jumptable: dw .RunAnim dw .WaitAnim -; d0261 -.RunAnim: ; d0261 +.RunAnim: call PokeAnim_GetPointer ld a, [wPokeAnimCommand] cp endanim_command @@ -410,22 +383,20 @@ PokeAnim_DoAnimScript: ; d0250 call PokeAnim_GetDuration ld [wPokeAnimWaitCounter], a call PokeAnim_StartWaitAnim -.WaitAnim: ; d0282 +.WaitAnim: ld a, [wPokeAnimWaitCounter] dec a ld [wPokeAnimWaitCounter], a ret nz call PokeAnim_StopWaitAnim ret -; d028e -.SetRepeat: ; d028e +.SetRepeat: ld a, [wPokeAnimParameter] ld [wPokeAnimRepeatTimer], a jr .loop -; d0296 -.DoRepeat: ; d0296 +.DoRepeat: ld a, [wPokeAnimRepeatTimer] and a ret z @@ -435,15 +406,13 @@ PokeAnim_DoAnimScript: ; d0250 ld a, [wPokeAnimParameter] ld [wPokeAnimFrame], a jr .loop -; d02a8 -PokeAnim_End: ; d02a8 +PokeAnim_End: ld hl, wPokeAnimJumptableIndex set 7, [hl] ret -; d02ae -PokeAnim_GetDuration: ; d02ae +PokeAnim_GetDuration: ; a * (1 + [wPokeAnimSpeed] / 16) ld c, a ld b, $0 @@ -460,9 +429,8 @@ PokeAnim_GetDuration: ; d02ae or h add c ret -; d02c8 -PokeAnim_GetFrame: ; d02c8 +PokeAnim_GetFrame: call PokeAnim_PlaceGraphic ld a, [wPokeAnimCommand] and a @@ -473,35 +441,30 @@ PokeAnim_GetFrame: ; d02c8 pop hl call PokeAnim_ConvertAndApplyBitmask ret -; d02dc -PokeAnim_StartWaitAnim: ; d02dc +PokeAnim_StartWaitAnim: ld a, [wPokeAnimJumptableIndex] inc a ld [wPokeAnimJumptableIndex], a ret -; d02e4 -PokeAnim_StopWaitAnim: ; d02e4 +PokeAnim_StopWaitAnim: ld a, [wPokeAnimJumptableIndex] dec a ld [wPokeAnimJumptableIndex], a ret -; d02ec -PokeAnim_IsUnown: ; d02ec +PokeAnim_IsUnown: ld a, [wPokeAnimSpecies] cp UNOWN ret -; d02f2 -PokeAnim_IsEgg: ; d02f2 +PokeAnim_IsEgg: ld a, [wPokeAnimSpecies] cp EGG ret -; d02f8 -PokeAnim_GetPointer: ; d02f8 +PokeAnim_GetPointer: push hl ld a, [wPokeAnimFrame] ld e, a @@ -522,9 +485,8 @@ PokeAnim_GetPointer: ; d02f8 inc [hl] pop hl ret -; d031b -PokeAnim_GetBitmaskIndex: ; d031b +PokeAnim_GetBitmaskIndex: ld a, [wPokeAnimCommand] dec a ld c, a @@ -542,9 +504,8 @@ PokeAnim_GetBitmaskIndex: ; d031b ld [wPokeAnimCurBitmask], a inc hl ret -; d033b -PokeAnim_CopyBitmaskToBuffer: ; d033b +PokeAnim_CopyBitmaskToBuffer: call .GetSize push bc ld hl, wPokeAnimBitmaskAddr @@ -558,9 +519,8 @@ PokeAnim_CopyBitmaskToBuffer: ; d033b ld a, [wPokeAnimBitmaskBank] call FarCopyBytes ret -; d0356 -.GetSize: ; d0356 +.GetSize: push hl ld a, [wPokeAnimFrontpicHeight] sub 5 ; to get a number 0, 1, or 2 @@ -572,7 +532,6 @@ PokeAnim_CopyBitmaskToBuffer: ; d033b ld b, 0 pop hl ret -; d0368 .Sizes: db 4, 5, 7 @@ -588,7 +547,7 @@ y = y + 7 endr ENDM -PokeAnim_ConvertAndApplyBitmask: ; d036b +PokeAnim_ConvertAndApplyBitmask: xor a ld [wPokeAnimBitmaskCurBit], a ld [wPokeAnimBitmaskCurRow], a @@ -614,9 +573,8 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b pop hl jr nc, .loop ret -; d0392 -.IsCurBitSet: ; d0392 +.IsCurBitSet: ; which byte ld a, [wPokeAnimBitmaskCurBit] and $f8 @@ -652,9 +610,8 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b ld hl, wPokeAnimBitmaskCurBit inc [hl] ret -; d03bd -.ApplyFrame: ; d03bd +.ApplyFrame: push af call .GetCoord pop af @@ -665,9 +622,8 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b pop hl ld [hl], a ret -; d03cd -.GetCoord: ; d03cd +.GetCoord: call .GetStartCoord ld a, [wPokeAnimBitmaskCurRow] ld bc, SCREEN_WIDTH @@ -693,12 +649,11 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b .skip2 ret -; d03f4 ; unused db 6, 5, 4 -.GetTilemap: ; d03f7 +.GetTilemap: push af ld a, [wPokeAnimFrontpicHeight] cp 5 @@ -745,7 +700,6 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b .add_13 add 13 ret -; d042f ._5by5: poke_anim_box 5 @@ -765,7 +719,7 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b ; db 43, 44, 45, 46, 47, 48 -.GetStartCoord: ; d046c +.GetStartCoord: ld hl, wPokeAnimCoord ld a, [hli] ld h, [hl] @@ -793,9 +747,8 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b .add_bc add hl, bc ret -; d0499 -.NextBit: ; d0499 +.NextBit: ld a, [wPokeAnimBitmaskCurRow] inc a ld [wPokeAnimBitmaskCurRow], a @@ -818,9 +771,8 @@ PokeAnim_ConvertAndApplyBitmask: ; d036b .no_carry xor a ret -; d04bd -PokeAnim_PlaceGraphic: ; d04bd +PokeAnim_PlaceGraphic: call .ClearBox ld a, [wBoxAlignment] and a @@ -860,9 +812,8 @@ PokeAnim_PlaceGraphic: ; d04bd dec c jr nz, .loop ret -; d04f6 -.ClearBox: ; d04f6 +.ClearBox: ld hl, wPokeAnimCoord ld a, [hli] ld h, [hl] @@ -871,9 +822,8 @@ PokeAnim_PlaceGraphic: ; d04bd ld c, 7 call ClearBox ret -; d0504 -PokeAnim_SetVBank1: ; d0504 +PokeAnim_SetVBank1: ld a, [rSVBK] push af ld a, BANK(wPokeAnimCoord) @@ -885,9 +835,8 @@ PokeAnim_SetVBank1: ; d0504 pop af ld [rSVBK], a ret -; d051b -.SetFlag: ; d051b +.SetFlag: call PokeAnim_GetAttrMapCoord ld b, 7 ld c, 7 @@ -908,9 +857,8 @@ PokeAnim_SetVBank1: ; d0504 dec b jr nz, .row ret -; d0536 -PokeAnim_SetVBank0: ; d0536 +PokeAnim_SetVBank0: call PokeAnim_GetAttrMapCoord ld b, 7 ld c, 7 @@ -931,9 +879,8 @@ PokeAnim_SetVBank0: ; d0536 dec b jr nz, .row ret -; d0551 -PokeAnim_GetAttrMapCoord: ; d0551 +PokeAnim_GetAttrMapCoord: ld hl, wPokeAnimCoord ld a, [hli] ld h, [hl] @@ -941,9 +888,8 @@ PokeAnim_GetAttrMapCoord: ; d0551 ld de, wAttrMap - wTileMap add hl, de ret -; d055c -GetMonAnimPointer: ; d055c +GetMonAnimPointer: call PokeAnim_IsEgg jr z, .egg @@ -996,9 +942,8 @@ GetMonAnimPointer: ; d055c ld a, h ld [wPokeAnimPointerAddr + 1], a ret -; d05b4 -PokeAnim_GetFrontpicDims: ; d05b4 +PokeAnim_GetFrontpicDims: ld a, [rSVBK] push af ld a, BANK(wCurPartySpecies) @@ -1012,9 +957,8 @@ PokeAnim_GetFrontpicDims: ; d05b4 pop af ld [rSVBK], a ret -; d05ce -GetMonFramesPointer: ; d05ce +GetMonFramesPointer: call PokeAnim_IsEgg jr z, .egg @@ -1058,9 +1002,8 @@ GetMonFramesPointer: ; d05ce ld a, h ld [wPokeAnimFramesAddr + 1], a ret -; d061b -GetMonBitmaskPointer: ; d061b +GetMonBitmaskPointer: call PokeAnim_IsEgg jr z, .egg @@ -1097,9 +1040,8 @@ GetMonBitmaskPointer: ; d061b ld a, h ld [wPokeAnimBitmaskAddr + 1], a ret -; d065c -PokeAnim_GetSpeciesOrUnown: ; d065c +PokeAnim_GetSpeciesOrUnown: call PokeAnim_IsUnown jr z, .unown ld a, [wPokeAnimSpecies] @@ -1108,13 +1050,12 @@ PokeAnim_GetSpeciesOrUnown: ; d065c .unown ld a, [wPokeAnimUnownLetter] ret -; d0669 -Unused_HOF_AnimateAlignedFrontpic: ; d0669 +Unused_HOF_AnimateAlignedFrontpic: ld a, $1 ld [wBoxAlignment], a -HOF_AnimateFrontpic: ; d066e +HOF_AnimateFrontpic: call AnimateMon_CheckIfPokemon jr c, .fail ld h, d @@ -1138,4 +1079,3 @@ HOF_AnimateFrontpic: ; d066e inc a ld [wCurPartySpecies], a ret -; d0695 diff --git a/engine/gfx/place_graphic.asm b/engine/gfx/place_graphic.asm index 21b9149502c..628c72413d2 100644 --- a/engine/gfx/place_graphic.asm +++ b/engine/gfx/place_graphic.asm @@ -1,4 +1,4 @@ -PlaceGraphic: ; 2ef6e +PlaceGraphic: ; Fill wBoxAlignment-aligned box width b height c ; with iterating tile starting from hGraphicStartTile at hl. diff --git a/engine/gfx/player_gfx.asm b/engine/gfx/player_gfx.asm index deb16ad3ae2..04208905ab1 100644 --- a/engine/gfx/player_gfx.asm +++ b/engine/gfx/player_gfx.asm @@ -1,4 +1,4 @@ -Unreferenced_Function88248: ; 88248 +Unreferenced_Function88248: ld c, CAL ld a, [wPlayerGender] bit PLAYERGENDER_FEMALE_F, a @@ -10,17 +10,17 @@ Unreferenced_Function88248: ; 88248 ld [wTrainerClass], a ret -MovePlayerPicRight: ; 88258 +MovePlayerPicRight: hlcoord 6, 4 ld de, 1 jr MovePlayerPic -MovePlayerPicLeft: ; 88260 +MovePlayerPicLeft: hlcoord 13, 4 ld de, -1 ; fallthrough -MovePlayerPic: ; 88266 +MovePlayerPic: ; Move player pic at hl by de * 7 tiles. ld c, $8 .loop @@ -55,7 +55,7 @@ MovePlayerPic: ; 88266 pop hl jr .loop -ShowPlayerNamingChoices: ; 88297 +ShowPlayerNamingChoices: ld hl, ChrisNameMenuHeader ld a, [wPlayerGender] bit PLAYERGENDER_FEMALE_F, a @@ -84,7 +84,7 @@ GetPlayerNameArray: ; 88318 This Function is never called call InitName ret -GetPlayerIcon: ; 8832c +GetPlayerIcon: ; Get the player icon corresponding to gender ; Male @@ -102,7 +102,7 @@ GetPlayerIcon: ; 8832c .done ret -GetCardPic: ; 8833e +GetCardPic: ld hl, ChrisCardPic ld a, [wPlayerGender] bit PLAYERGENDER_FEMALE_F, a @@ -120,23 +120,23 @@ GetCardPic: ; 8833e call FarCopyBytes ret -ChrisCardPic: ; 88365 +ChrisCardPic: INCBIN "gfx/trainer_card/chris_card.2bpp" -KrisCardPic: ; 88595 +KrisCardPic: INCBIN "gfx/trainer_card/kris_card.2bpp" -CardGFX: ; 887c5 +CardGFX: INCBIN "gfx/trainer_card/trainer_card.2bpp" -GetPlayerBackpic: ; 88825 +GetPlayerBackpic: ld a, [wPlayerGender] bit PLAYERGENDER_FEMALE_F, a jr z, GetChrisBackpic call GetKrisBackpic ret -GetChrisBackpic: ; 88830 +GetChrisBackpic: ld hl, ChrisBackpic ld b, BANK(ChrisBackpic) ld de, vTiles2 tile $31 @@ -144,7 +144,7 @@ GetChrisBackpic: ; 88830 predef DecompressGet2bpp ret -HOF_LoadTrainerFrontpic: ; 88840 +HOF_LoadTrainerFrontpic: call WaitBGMap xor a ld [hBGMapMode], a @@ -173,7 +173,7 @@ HOF_LoadTrainerFrontpic: ; 88840 ld [hBGMapMode], a ret -DrawIntroPlayerPic: ; 88874 +DrawIntroPlayerPic: ; Draw the player pic at (6,4). ; Get class @@ -206,13 +206,13 @@ DrawIntroPlayerPic: ; 88874 predef PlaceGraphic ret -ChrisPic: ; 888a9 +ChrisPic: INCBIN "gfx/player/chris.2bpp" -KrisPic: ; 88bb9 +KrisPic: INCBIN "gfx/player/kris.2bpp" -GetKrisBackpic: ; 88ec9 +GetKrisBackpic: ; Kris's backpic is uncompressed. ld de, KrisBackpic ld hl, vTiles2 tile $31 @@ -220,5 +220,5 @@ GetKrisBackpic: ; 88ec9 call Get2bpp ret -KrisBackpic: ; 88ed6 +KrisBackpic: INCBIN "gfx/player/kris_back.2bpp" diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm index d53be908f72..538132ce28a 100644 --- a/engine/gfx/sgb_layouts.asm +++ b/engine/gfx/sgb_layouts.asm @@ -1,4 +1,4 @@ -LoadSGBLayout: ; 864c +LoadSGBLayout: call CheckCGB jp nz, LoadSGBLayoutCGB @@ -20,9 +20,8 @@ LoadSGBLayout: ; 864c ld de, _LoadSGBLayout_ReturnFromJumpTable push de jp hl -; 866f -.Jumptable: ; 866f +.Jumptable: dw .SGB_BattleGrayscale dw .SGB_BattleColors dw .SGB_PokegearPals @@ -54,15 +53,13 @@ LoadSGBLayout: ; 864c dw .SGB_TrainerOrMonFrontpicPals dw .SGB_MysteryGift dw .SGB1e -; 86ad -.SGB_BattleGrayscale: ; 86ad +.SGB_BattleGrayscale: ld hl, PalPacket_BattleGrayscale ld de, BlkPacket_Battle ret -; 86b4 -.SGB_BattleColors: ; 86b4 +.SGB_BattleColors: ld hl, BlkPacket_Battle call PushSGBPals_ @@ -135,9 +132,8 @@ LoadSGBLayout: ; 864c ld a, SCGB_BATTLE_COLORS ld [wSGBPredef], a ret -; 873c -.SGB_MoveList: ; 873c +.SGB_MoveList: ld hl, PalPacket_9bd6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -154,15 +150,13 @@ LoadSGBLayout: ; 864c ld hl, wSGBPals ld de, BlkPacket_MoveList ret -; 875c -.SGB_PokegearPals: ; 875c +.SGB_PokegearPals: ld hl, PalPacket_Pokegear ld de, BlkPacket_9a86 ret -; 8763 -.SGB_StatsScreenHPPals: ; 8763 +.SGB_StatsScreenHPPals: ld hl, PalPacket_9ce6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -196,15 +190,13 @@ LoadSGBLayout: ; 864c ld hl, wSGBPals ld de, BlkPacket_StatsScreen ret -; 87ab -.SGB_PartyMenu: ; 87ab +.SGB_PartyMenu: ld hl, PalPacket_PartyMenu ld de, wSGBPals + 1 ret -; 87b2 -.SGB_Pokedex: ; 87b2 +.SGB_Pokedex: ld hl, PalPacket_9ce6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -230,9 +222,8 @@ LoadSGBLayout: ; 864c ld hl, wSGBPals ld de, BlkPacket_Pokedex_PC ret -; 87e9 -.SGB_BillsPC: ; 87e9 +.SGB_BillsPC: ld hl, PalPacket_9ce6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -259,15 +250,13 @@ LoadSGBLayout: ; 864c ld hl, wSGBPals ld de, BlkPacket_Pokedex_PC ret -; 8823 -.SGB_PokedexUnownMode: ; 8823 +.SGB_PokedexUnownMode: call .SGB_Pokedex ld de, BlkPacket_PokedexUnownMode ret -; 882a -.SGB_PokedexSearchOption: ; 882a +.SGB_PokedexSearchOption: ld hl, PalPacket_9ce6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -283,34 +272,29 @@ LoadSGBLayout: ; 864c ld hl, wSGBPals ld de, BlkPacket_9a86 ret -; 884b -.SGB_PackPals: ; 884b +.SGB_PackPals: ld hl, PalPacket_Pack ld de, BlkPacket_9a86 ret -; 8852 -.SGB_SlotMachine: ; 8852 +.SGB_SlotMachine: ld hl, PalPacket_SlotMachine ld de, BlkPacket_SlotMachine ret -; 8859 -.SGB06: ; 8859 +.SGB06: ld hl, PalPacket_SCGB_06 ld de, BlkPacket_SCGB_06 ret -; 8860 .SGB_Diploma: -.SGB_MysteryGift: ; 8860 +.SGB_MysteryGift: ld hl, PalPacket_Diploma ld de, BlkPacket_9a86 ret -; 8867 -.SGB_GSIntro: ; 8867 +.SGB_GSIntro: ld b, 0 ld hl, .BlkPacketTable_GSIntro rept 4 @@ -324,35 +308,30 @@ endr ld h, [hl] ld l, a ret -; 8878 -.BlkPacketTable_GSIntro: ; 8878 +.BlkPacketTable_GSIntro: dw BlkPacket_9a86, PalPacket_GSIntroShellderLapras dw BlkPacket_GSIntroJigglypuffPikachu, PalPacket_GSIntroJigglypuffPikachu dw BlkPacket_9a86, PalPacket_GSIntroStartersTransition -; 8884 -.SGB_GSTitleScreen: ; 8884 +.SGB_GSTitleScreen: ld hl, PalPacket_GSTitleScreen ld de, BlkPacket_GSTitleScreen ld a, SCGB_DIPLOMA ld [wSGBPredef], a ret -; 8890 -.SGB13: ; 8890 +.SGB13: ld hl, PalPacket_SCGB_13 ld de, BlkPacket_SCGB_13 ret -; 8897 -.SGB_BetaPikachuMinigame: ; 8897 +.SGB_BetaPikachuMinigame: ld hl, PalPacket_BetaPikachuMinigame ld de, BlkPacket_9a86 ret -; 889e -.SGB_BetaPoker: ; 889e +.SGB_BetaPoker: ld hl, BlkPacket_9a86 ld de, wPlayerLightScreenCount ; ??? ld bc, PALPACKET_LENGTH @@ -360,9 +339,8 @@ endr ld hl, PalPacket_BetaPoker ld de, BlkPacket_9a86 ret -; 88b1 -.SGB_MapPals: ; 88b1 +.SGB_MapPals: ld hl, PalPacket_9bd6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -374,9 +352,8 @@ endr ld a, SCGB_MAPPALS ld [wSGBPredef], a ret -; 88cd -.SGB_Evolution: ; 88cd +.SGB_Evolution: push bc ld hl, PalPacket_9ce6 ld de, wSGBPals @@ -419,22 +396,19 @@ endr ld hl, wSGBPals ld de, BlkPacket_9a86 ret -; 891a .SGB0d: -.SGB_TrainerCard: ; 891a +.SGB_TrainerCard: ld hl, PalPacket_Diploma ld de, BlkPacket_9a86 ret -; 8921 -.SGB_UnownPuzzle: ; 8921 +.SGB_UnownPuzzle: ld hl, PalPacket_UnownPuzzle ld de, BlkPacket_9a86 ret -; 8928 -.SGB12: ; 8928 +.SGB12: ld hl, PalPacket_9bd6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -462,9 +436,8 @@ endr ld hl, wSGBPals ld de, wSGBPals + PALPACKET_LENGTH ret -; 8969 -.SGB1e: ; 8969 +.SGB1e: ld hl, PalPacket_9ce6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -495,15 +468,13 @@ endr ld hl, wSGBPals ld de, BlkPacket_9a86 ret -; 89a6 -.SGB_GamefreakLogo: ; 89a6 +.SGB_GamefreakLogo: ld hl, PalPacket_GamefreakLogo ld de, BlkPacket_9a86 ret -; 89ad -.SGB_PlayerOrMonFrontpicPals: ; 89ad +.SGB_PlayerOrMonFrontpicPals: ld hl, PalPacket_9ce6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -522,15 +493,13 @@ endr ld hl, wSGBPals ld de, BlkPacket_9a86 ret -; 89d9 -.SGB_TradeTube: ; 89d9 +.SGB_TradeTube: ld hl, PalPacket_TradeTube ld de, BlkPacket_9a86 ret -; 89e0 -.SGB_TrainerOrMonFrontpicPals: ; 89e0 +.SGB_TrainerOrMonFrontpicPals: ld hl, PalPacket_9ce6 ld de, wSGBPals ld bc, PALPACKET_LENGTH @@ -549,9 +518,8 @@ endr ld hl, wSGBPals ld de, BlkPacket_9a86 ret -; 8a0c -.GetMapPalsIndex: ; 8a0c +.GetMapPalsIndex: ld a, [wTimeOfDayPal] cp NITE_F jr c, .morn_day @@ -593,13 +561,11 @@ endr .gate ld a, PREDEFPAL_PEWTER ret -; 8a45 INCLUDE "data/maps/sgb_roof_pal_inds.asm" -_LoadSGBLayout_ReturnFromJumpTable: ; 8a60 +_LoadSGBLayout_ReturnFromJumpTable: push de call PushSGBPals_ pop hl jp PushSGBPals_ -; 8a68 diff --git a/engine/gfx/sprite_anims.asm b/engine/gfx/sprite_anims.asm index 9353b71c97b..1d3aa6a8b62 100644 --- a/engine/gfx/sprite_anims.asm +++ b/engine/gfx/sprite_anims.asm @@ -1,4 +1,4 @@ -DoAnimFrame: ; 8d24b +DoAnimFrame: ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID add hl, bc ld e, [hl] @@ -10,9 +10,8 @@ DoAnimFrame: ; 8d24b ld h, [hl] ld l, a jp hl -; 8d25b -.Jumptable: ; 8d25b (23:525b) +.Jumptable: ; entries correspond to SPRITE_ANIM_SEQ_* constants dw .Null dw .PartyMon @@ -50,10 +49,10 @@ DoAnimFrame: ; 8d24b dw .IntroUnownF dw .IntroSuicuneAway -.Null: ; 8d2a1 (23:52a1) +.Null: ret -.PartyMon ; 8d2a2 (23:52a2) +.PartyMon ld a, [wMenuCursorY] ld hl, SPRITEANIMSTRUCT_INDEX @@ -70,7 +69,7 @@ DoAnimFrame: ; 8d24b ld [hl], $0 ret -.PartyMonSwitch ; 8d2b9 (23:52b9) +.PartyMonSwitch ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc ld [hl], 8 * 3 @@ -112,7 +111,7 @@ DoAnimFrame: ; 8d24b ld [hl], a ret -.PartyMonSelected ; 8d2ea (23:52ea) +.PartyMonSelected ld a, [wMenuCursorY] ld hl, SPRITEANIMSTRUCT_INDEX @@ -131,17 +130,15 @@ DoAnimFrame: ; 8d24b ld [hl], 8 * 3 ret -.GSTitleTrail ; 8d302 (23:5302) +.GSTitleTrail call .AnonymousJumptable jp hl -; 8d306 (23:5306) ; Anonymous dw (see .AnonymousJumptable) dw .four_zero dw .four_one -; 8d30a -.four_zero ; 8d30a +.four_zero call .IncrementJumptableIndex ld hl, SPRITEANIMSTRUCT_INDEX @@ -159,7 +156,7 @@ DoAnimFrame: ; 8d24b add hl, bc ld [hl], a -.four_one ; 8d321 +.four_one ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -200,9 +197,8 @@ DoAnimFrame: ; 8d24b .asm_8d356 call DeinitializeSprite ret -; 8d35a -.GSIntroHoOh ; 8d35a (23:535a) +.GSIntroHoOh ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -216,19 +212,19 @@ DoAnimFrame: ; 8d24b ld [hl], a ret -.NamingScreenCursor ; 8d36c (23:536c) +.NamingScreenCursor callfar NamingScreen_AnimateCursor ret -.MailCursor ; 8d373 (23:5373) +.MailCursor callfar ComposeMail_AnimateCursor ret -.GameFreakLogo: ; 8d37a (23:537a) +.GameFreakLogo: callfar GameFreakLogoJumper ret -.GSIntroStar ; 8d381 (23:5381) +.GSIntroStar ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -278,7 +274,7 @@ DoAnimFrame: ; 8d24b call DeinitializeSprite ret -.GSIntroSparkle ; 8d3c3 (23:53c3) +.GSIntroSparkle ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hli] @@ -355,11 +351,11 @@ DoAnimFrame: ; 8d24b call DeinitializeSprite ret -.SlotsGolem: ; 8d422 (23:5422) +.SlotsGolem: callfar Slots_AnimateGolem ret -.SlotsChansey: ; 8d429 (23:5429) +.SlotsChansey: callfar Slots_AnimateChansey ld hl, wcf64 ld a, [hl] @@ -370,7 +366,7 @@ DoAnimFrame: ; 8d24b call _ReinitSpriteAnimFrame ret -.SlotsChanseyEgg: ; 8d43e (23:543e) +.SlotsChanseyEgg: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld a, [hl] @@ -403,22 +399,21 @@ DoAnimFrame: ; 8d24b ld [hl], a ret -.UnusedCursor ; 8d46e (23:546e) +.UnusedCursor callfar ret_e00ed ret -.PokegearArrow ; 8d475 (23:5475) +.PokegearArrow callfar AnimatePokegearModeIndicatorArrow ret -.DummyGameCursor ; 8d47c (23:547c) +.DummyGameCursor callfar DummyGame_InterpretJoypad_AnimateCursor ret -.TradePokeBall ; 8d483 (23:5483) +.TradePokeBall call .AnonymousJumptable jp hl -; 8d487 (23:5487) ; Anonymous dw (see .AnonymousJumptable) dw .TradePokeBall_zero @@ -427,9 +422,8 @@ DoAnimFrame: ; 8d24b dw .TradePokeBall_three dw .TradePokeBall_four dw .TradePokeBall_five -; 8d493 -.TradePokeBall_zero ; 8d493 +.TradePokeBall_zero ld a, SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_WOBBLE call _ReinitSpriteAnimFrame @@ -441,9 +435,8 @@ DoAnimFrame: ; 8d24b add hl, bc ld [hl], $20 ret -; 8d4a5 -.TradePokeBall_two ; 8d4a5 +.TradePokeBall_two ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -459,7 +452,7 @@ DoAnimFrame: ; 8d24b add hl, bc ld [hl], $40 -.TradePokeBall_three ; 8d4b8 +.TradePokeBall_three ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -478,9 +471,8 @@ DoAnimFrame: ; 8d24b ld de, SFX_GOT_SAFARI_BALLS call PlaySFX jr .TradePokeBall_five -; 8d4d5 -.TradePokeBall_one ; 8d4d5 +.TradePokeBall_one ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld [hl], $4 @@ -493,9 +485,8 @@ DoAnimFrame: ; 8d24b add hl, bc ld [hl], $24 ret -; 8d4e8 -.TradePokeBall_four ; 8d4e8 +.TradePokeBall_four ld hl, SPRITEANIMSTRUCT_0D add hl, bc ld a, [hl] @@ -541,12 +532,11 @@ DoAnimFrame: ; 8d24b call .IncrementJumptableIndex ret -.TradePokeBall_five ; 8d526 +.TradePokeBall_five call DeinitializeSprite ret -; 8d52a -.TradeTubeBulge ; 8d52a (23:552a) +.TradeTubeBulge ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -564,11 +554,11 @@ DoAnimFrame: ; 8d24b call DeinitializeSprite ret -.TrademonInTube ; 8d543 (23:5543) +.TrademonInTube callfar TradeAnim_AnimateTrademonInTube ret -.RevealNewMon: ; 8d54a (23:554a) +.RevealNewMon: ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -605,11 +595,11 @@ DoAnimFrame: ; 8d24b call DeinitializeSprite ret -.RadioTuningKnob: ; 8d578 (23:5578) +.RadioTuningKnob: callfar AnimateTuningKnob ret -.CutLeaves ; 8d57f (23:557f) +.CutLeaves ld hl, SPRITEANIMSTRUCT_0D add hl, bc ld e, [hl] @@ -648,7 +638,7 @@ DoAnimFrame: ; 8d24b ld [hl], a ret -.FlyFrom: ; 8d5b0 (23:55b0) +.FlyFrom: ld hl, SPRITEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] @@ -687,7 +677,7 @@ DoAnimFrame: ; 8d24b ld [hl], a ret -.FlyLeaf: ; 8d5e2 (23:55e2) +.FlyLeaf: ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -716,7 +706,7 @@ DoAnimFrame: ; 8d24b call DeinitializeSprite ret -.FlyTo: ; 8d607 (23:5607) +.FlyTo: ld hl, SPRITEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] @@ -748,15 +738,15 @@ DoAnimFrame: ; 8d24b ld [hl], a ret -.MobileTradeSentPulse ; 8d630 (23:5630) +.MobileTradeSentPulse farcall Function108bc7 ret -.MobileTradeOTPulse ; 8d637 (23:5637) +.MobileTradeOTPulse farcall Function108be0 ret -.IntroSuicune ; 8d63e (23:563e) +.IntroSuicune ld a, [wcf65] and a jr nz, .asm_8d645 @@ -783,7 +773,7 @@ DoAnimFrame: ; 8d24b call _ReinitSpriteAnimFrame ret -.IntroPichuWooper ; 8d666 (23:5666) +.IntroPichuWooper ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -802,7 +792,7 @@ DoAnimFrame: ; 8d24b .asm_8d67f ret -.IntroUnown ; 8d680 (23:5680) +.IntroUnown ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld d, [hl] @@ -829,7 +819,7 @@ DoAnimFrame: ; 8d24b ld [hl], a ret -.IntroUnownF ; 8d6a2 (23:56a2) +.IntroUnownF ld a, [wcf64] cp $40 ret nz @@ -837,7 +827,7 @@ DoAnimFrame: ; 8d24b call _ReinitSpriteAnimFrame ret -.IntroSuicuneAway ; 8d6ae (23:56ae) +.IntroSuicuneAway ld hl, SPRITEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] @@ -845,15 +835,15 @@ DoAnimFrame: ; 8d24b ld [hl], a ret -.EZChatCursor ; 8d6b7 (23:56b7) +.EZChatCursor farcall AnimateEZChatCursor ret -.Celebi ; 8d6be (23:56be) +.Celebi farcall UpdateCelebiPosition ret -.AnonymousJumptable: ; 8d6c5 (23:56c5) +.AnonymousJumptable: ld hl, sp+$0 ld e, [hl] inc hl @@ -870,20 +860,17 @@ DoAnimFrame: ; 8d24b ld h, [hl] ld l, a ret -; 8d6d8 (23:56d8) -.IncrementJumptableIndex: ; 8d6d8 +.IncrementJumptableIndex: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc inc [hl] ret -; 8d6de -.Sprites_Sine: ; 8d6de (23:56de) +.Sprites_Sine: call Sprites_Sine ret -.Sprites_Cosine: ; 8d6e2 (23:56e2) +.Sprites_Cosine: call Sprites_Cosine ret -; 8d6e6 (23:56e6) diff --git a/engine/gfx/sprites.asm b/engine/gfx/sprites.asm index 63666c624f0..709f8aad7ba 100644 --- a/engine/gfx/sprites.asm +++ b/engine/gfx/sprites.asm @@ -1,4 +1,4 @@ -ClearSpriteAnims: ; 8cf53 +ClearSpriteAnims: ld hl, wSpriteAnimDict ld bc, wSpriteAnimsEnd - wSpriteAnimDict .loop @@ -9,15 +9,13 @@ ClearSpriteAnims: ; 8cf53 or b jr nz, .loop ret -; 8cf62 -PlaySpriteAnimationsAndDelayFrame: ; 8cf62 +PlaySpriteAnimationsAndDelayFrame: call PlaySpriteAnimations call DelayFrame ret -; 8cf69 -PlaySpriteAnimations: ; 8cf69 +PlaySpriteAnimations: push hl push de push bc @@ -32,9 +30,8 @@ PlaySpriteAnimations: ; 8cf69 pop de pop hl ret -; 8cf7a -DoNextFrameForAllSprites: ; 8cf7a +DoNextFrameForAllSprites: ld hl, wSpriteAnimationStructs ld e, NUM_SPRITE_ANIM_STRUCTS @@ -72,9 +69,8 @@ DoNextFrameForAllSprites: ; 8cf7a .done ret -; 8cfa8 -DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8) +DoNextFrameForFirst16Sprites: ld hl, wSpriteAnimationStructs ld e, NUM_SPRITE_ANIM_STRUCTS @@ -113,7 +109,7 @@ DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8) .done ret -InitSpriteAnimStruct:: ; 8cfd6 +InitSpriteAnimStruct:: ; Initialize animation a at pixel x=e, y=d ; Find if there's any room in the wSpriteAnimationStructs array, which is 10x16 push de @@ -208,18 +204,16 @@ endr ld a, b ld [wSpriteAnimAddrBackup + 1], a ret -; 8d036 -DeinitializeSprite: ; 8d036 +DeinitializeSprite: ; Clear the index field of the struct in bc. ld hl, SPRITEANIMSTRUCT_INDEX add hl, bc ld [hl], $0 ret -; 8d03d -DeinitializeAllSprites: ; 8d03d (23:503d) +DeinitializeAllSprites: ; Clear the index field of every struct in the wSpriteAnimationStructs array. ld hl, wSpriteAnimationStructs ld bc, SPRITEANIMSTRUCT_LENGTH @@ -233,7 +227,7 @@ DeinitializeAllSprites: ; 8d03d (23:503d) ret -UpdateAnimFrame: ; 8d04c +UpdateAnimFrame: call InitSpriteAnimBuffer ; init WRAM call GetSpriteAnimFrame ; read from a memory array cp -3 @@ -319,9 +313,8 @@ UpdateAnimFrame: ; 8d04c pop bc scf ret -; 8d0be -AddOrSubtractY: ; 8d0be +AddOrSubtractY: push hl ld a, [hl] ld hl, wCurrSpriteAddSubFlags @@ -335,9 +328,8 @@ AddOrSubtractY: ; 8d0be .ok pop hl ret -; 8d0ce -AddOrSubtractX: ; 8d0ce +AddOrSubtractX: push hl ld a, [hl] ld hl, wCurrSpriteAddSubFlags @@ -351,9 +343,8 @@ AddOrSubtractX: ; 8d0ce .ok pop hl ret -; 8d0de -GetSpriteOAMAttr: ; 8d0de +GetSpriteOAMAttr: ld a, [wCurrSpriteAddSubFlags] ld b, a ld a, [hl] @@ -364,9 +355,8 @@ GetSpriteOAMAttr: ; 8d0de and $1f or b ret -; 8d0ec -InitSpriteAnimBuffer: ; 8d0ec +InitSpriteAnimBuffer: xor a ld [wCurrSpriteAddSubFlags], a ld hl, SPRITEANIMSTRUCT_TILE_ID @@ -382,9 +372,8 @@ InitSpriteAnimBuffer: ; 8d0ec ld a, [hli] ld [wCurrAnimYOffset], a ret -; 8d109 -GetSpriteAnimVTile: ; 8d109 +GetSpriteAnimVTile: ; a = wSpriteAnimDict[a] if a in wSpriteAnimDict else 0 ; vTiles offset push hl @@ -409,9 +398,8 @@ GetSpriteAnimVTile: ; 8d109 pop bc pop hl ret -; 8d120 -_ReinitSpriteAnimFrame:: ; 8d120 +_ReinitSpriteAnimFrame:: ld hl, SPRITEANIMSTRUCT_FRAMESET_ID add hl, bc ld [hl], a @@ -422,10 +410,9 @@ _ReinitSpriteAnimFrame:: ; 8d120 add hl, bc ld [hl], -1 ret -; 8d132 -GetSpriteAnimFrame: ; 8d132 +GetSpriteAnimFrame: .loop ld hl, SPRITEANIMSTRUCT_DURATION add hl, bc @@ -491,9 +478,8 @@ GetSpriteAnimFrame: ; 8d132 add hl, bc ld [hl], a jr .loop -; 8d189 -.GetPointer: ; 8d189 +.GetPointer: ; Get the data for the current frame for the current animation sequence ; SpriteAnimFrameData[SpriteAnim[SPRITEANIMSTRUCT_FRAMESET_ID]][SpriteAnim[SPRITEANIMSTRUCT_FRAME]] @@ -514,9 +500,8 @@ GetSpriteAnimFrame: ; 8d132 add hl, hl add hl, de ret -; 8d1a2 -GetFrameOAMPointer: ; 8d1a2 +GetFrameOAMPointer: ; Load OAM data pointer ld e, a ld d, 0 @@ -525,9 +510,8 @@ GetFrameOAMPointer: ; 8d1a2 add hl, de add hl, de ret -; 8d1ac -Unreferenced_BrokenGetStdGraphics: ; 8d1ac +Unreferenced_BrokenGetStdGraphics: push hl ld l, a ld h, 0 @@ -547,7 +531,6 @@ Unreferenced_BrokenGetStdGraphics: ; 8d1ac call Request2bpp pop bc ret -; 8d1c4 INCLUDE "data/sprite_anims/sequences.asm" @@ -573,19 +556,18 @@ BrokenStdGFXPointers: dbbw 16, $21, .deleted .deleted -; 8e72a (23:672a) -Sprites_Cosine: ; 8e72a +Sprites_Cosine: ; a = d * cos(a * pi/32) add %010000 ; cos(x) = sin(x + pi/2) ; fallthrough -Sprites_Sine: ; 8e72c +Sprites_Sine: ; a = d * sin(a * pi/32) calc_sine_wave -AnimateEndOfExpBar: ; 8e79d +AnimateEndOfExpBar: ld a, [hSGB] ld de, EndOfExpBarGFX and a @@ -609,9 +591,8 @@ AnimateEndOfExpBar: ; 8e79d jr nz, .loop call ClearSprites ret -; 8e7c6 -.AnimateFrame: ; 8e7c6 +.AnimateFrame: ld hl, wVirtualOAMSprite00 ld c, 8 ; number of animated circles .anim_loop @@ -648,14 +629,13 @@ AnimateEndOfExpBar: ; 8e79d ld a, PAL_BATTLE_OB_BLUE ld [hli], a ; attributes jr .anim_loop -; 8e7f4 -EndOfExpBarGFX: ; 8e7f4 +EndOfExpBarGFX: INCBIN "gfx/battle/expbarend.2bpp" -SGBEndOfExpBarGFX: ; 8e804 +SGBEndOfExpBarGFX: INCBIN "gfx/battle/expbarend_sgb.2bpp" -ClearSpriteAnims2: ; 8e814 +ClearSpriteAnims2: push hl push de push bc @@ -674,4 +654,3 @@ ClearSpriteAnims2: ; 8e814 pop de pop hl ret -; 8e82b diff --git a/engine/gfx/trademon_frontpic.asm b/engine/gfx/trademon_frontpic.asm index d5f7b55de76..d557123e9bc 100644 --- a/engine/gfx/trademon_frontpic.asm +++ b/engine/gfx/trademon_frontpic.asm @@ -1,4 +1,4 @@ -GetTrademonFrontpic: ; 4d7fd +GetTrademonFrontpic: ld a, [wOTTrademonSpecies] ld hl, wOTTrademonDVs ld de, vTiles2 @@ -13,7 +13,7 @@ GetTrademonFrontpic: ; 4d7fd predef GetAnimatedFrontpic ret -AnimateTrademonFrontpic: ; 4d81e +AnimateTrademonFrontpic: ld a, [wOTTrademonSpecies] call IsAPokemon ret c diff --git a/engine/items/buy_sell_toss.asm b/engine/items/buy_sell_toss.asm index 84481d0306d..d57a9009b48 100644 --- a/engine/items/buy_sell_toss.asm +++ b/engine/items/buy_sell_toss.asm @@ -1,13 +1,12 @@ -SelectQuantityToToss: ; 24fbf +SelectQuantityToToss: ld hl, TossItem_MenuHeader call LoadMenuHeader call Toss_Sell_Loop ret -; 24fc9 -SelectQuantityToBuy: ; 24fc9 +SelectQuantityToBuy: farcall GetItemPrice -RooftopSale_SelectQuantityToBuy: ; 24fcf +RooftopSale_SelectQuantityToBuy: ld a, d ld [wBuffer1], a ld a, e @@ -16,9 +15,8 @@ RooftopSale_SelectQuantityToBuy: ; 24fcf call LoadMenuHeader call Toss_Sell_Loop ret -; 24fe1 -SelectQuantityToSell: ; 24fe1 +SelectQuantityToSell: farcall GetItemPrice ld a, d ld [wBuffer1], a @@ -28,9 +26,8 @@ SelectQuantityToSell: ; 24fe1 call LoadMenuHeader call Toss_Sell_Loop ret -; 24ff9 -Toss_Sell_Loop: ; 24ff9 +Toss_Sell_Loop: ld a, 1 ld [wItemQuantityChangeBuffer], a .loop @@ -45,9 +42,8 @@ Toss_Sell_Loop: ; 24ff9 .nope and a ret -; 2500e -BuySellToss_InterpretJoypad: ; 2500e +BuySellToss_InterpretJoypad: call JoyTextDelay_ForcehJoyDown ; get joypad bit B_BUTTON_F, c jr nz, .b @@ -126,9 +122,8 @@ BuySellToss_InterpretJoypad: ; 2500e ld [wItemQuantityChangeBuffer], a and a ret -; 25072 -BuySellToss_UpdateQuantityDisplay: ; 25072 +BuySellToss_UpdateQuantityDisplay: call MenuBox call MenuBoxCoord2Tile ld de, SCREEN_WIDTH + 1 @@ -145,26 +140,22 @@ BuySellToss_UpdateQuantityDisplay: ; 25072 ld a, [wMenuDataBank] call FarCall_de ret -; 25097 -ret_25097: ; 25097 +ret_25097: ret -; 25098 -DisplayPurchasePrice: ; 25098 +DisplayPurchasePrice: call BuySell_MultiplyPrice call BuySell_DisplaySubtotal ret -; 2509f -DisplaySellingPrice: ; 2509f +DisplaySellingPrice: call BuySell_MultiplyPrice call Sell_HalvePrice call BuySell_DisplaySubtotal ret -; 250a9 -BuySell_MultiplyPrice: ; 250a9 +BuySell_MultiplyPrice: xor a ld [hMultiplicand + 0], a ld a, [wBuffer1] @@ -177,9 +168,8 @@ BuySell_MultiplyPrice: ; 250a9 call Multiply pop hl ret -; 250c1 -Sell_HalvePrice: ; 250c1 +Sell_HalvePrice: push hl ld hl, hProduct + 1 ld a, [hl] @@ -193,9 +183,8 @@ Sell_HalvePrice: ; 250c1 ld [hl], a pop hl ret -; 250d1 -BuySell_DisplaySubtotal: ; 250d1 +BuySell_DisplaySubtotal: push hl ld hl, hMoneyTemp ld a, [hProduct + 1] @@ -211,7 +200,6 @@ BuySell_DisplaySubtotal: ; 250d1 call PrintNum call WaitBGMap ret -; 250ed TossItem_MenuHeader: ; 0x250ed db MENU_BACKUP_TILES ; flags diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index db0ee1be1d1..5b0ce4ac650 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -1,4 +1,4 @@ -_DoItemEffect:: ; e722 +_DoItemEffect:: ld a, [wCurItem] ld [wd265], a call GetItemName @@ -10,10 +10,9 @@ _DoItemEffect:: ; e722 ld hl, ItemEffects rst JumpTable ret -; e73c -ItemEffects: ; e73c +ItemEffects: ; entries correspond to item ids dw PokeBallEffect ; MASTER_BALL dw PokeBallEffect ; ULTRA_BALL @@ -194,10 +193,9 @@ ItemEffects: ; e73c dw PokeBallEffect ; PARK_BALL dw NoEffect ; RAINBOW_WING dw NoEffect ; ITEM_B3 -; e8a2 -PokeBallEffect: ; e8a2 +PokeBallEffect: ld a, [wBattleMode] dec a jp nz, UseBallInTrainerBattle @@ -713,7 +711,6 @@ PokeBallEffect: ; e8a2 ld hl, wParkBallsRemaining dec [hl] ret -; ec0a BallMultiplierFunctionTable: @@ -1117,7 +1114,6 @@ Text_GotchaMonWasCaught: ; 0xedc9 pop bc ld hl, TextJump_Waitbutton ret -; ede6 TextJump_Waitbutton: ; 0xede6 ; @ @@ -1143,23 +1139,21 @@ Text_AskNicknameNewlyCaughtMon: ; 0xedf5 db "@" ; 0xedfa -ReturnToBattle_UseBall: ; edfa (3:6dfa) +ReturnToBattle_UseBall: farcall _ReturnToBattle_UseBall ret -TownMapEffect: ; ee01 +TownMapEffect: farcall PokegearMap ret -; ee08 -BicycleEffect: ; ee08 +BicycleEffect: farcall BikeFunction ret -; ee0f -EvoStoneEffect: ; ee0f +EvoStoneEffect: ld b, PARTYMENUACTION_EVO_STONE call UseItem_SelectMon @@ -1189,10 +1183,9 @@ EvoStoneEffect: ; ee0f xor a ld [wItemEffectSucceeded], a ret -; ee3d -VitaminEffect: ; ee3d +VitaminEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1236,14 +1229,13 @@ VitaminEffect: ; ee3d jp UseDisposableItem -NoEffectMessage: ; ee83 +NoEffectMessage: ld hl, WontHaveAnyEffectText call PrintText jp ClearPalettes -; ee8c -UpdateStatsAfterItem: ; ee8c +UpdateStatsAfterItem: ld a, MON_MAXHP call GetPartyParamLocation ld d, h @@ -1252,13 +1244,11 @@ UpdateStatsAfterItem: ; ee8c call GetPartyParamLocation ld b, TRUE predef_jump CalcMonStats -; ee9f -RareCandy_StatBooster_ExitMenu: ; ee9f +RareCandy_StatBooster_ExitMenu: xor a ld [wItemEffectSucceeded], a jp ClearPalettes -; eea6 Text_StatRose: ; 0xeea6 @@ -1268,7 +1258,7 @@ Text_StatRose: ; 0xeea6 ; 0xeeab -StatStrings: ; eeab +StatStrings: dw .health dw .attack dw .defense @@ -1280,10 +1270,9 @@ StatStrings: ; eeab .defense db "DEFENSE@" .speed db "SPEED@" .special db "SPECIAL@" -; eed9 -GetStatExpRelativePointer: ; eed9 +GetStatExpRelativePointer: ld a, [wCurItem] ld hl, Table_eeeb .next @@ -1298,18 +1287,16 @@ GetStatExpRelativePointer: ; eed9 ld c, a ld b, 0 ret -; eeeb -Table_eeeb: ; eeeb +Table_eeeb: db HP_UP, MON_HP_EXP - MON_STAT_EXP db PROTEIN, MON_ATK_EXP - MON_STAT_EXP db IRON, MON_DEF_EXP - MON_STAT_EXP db CARBOS, MON_SPD_EXP - MON_STAT_EXP db CALCIUM, MON_SPC_EXP - MON_STAT_EXP -; eef5 -RareCandy_StatBooster_GetParameters: ; eef5 +RareCandy_StatBooster_GetParameters: ld a, [wCurPartySpecies] ld [wCurSpecies], a ld [wd265], a @@ -1325,7 +1312,7 @@ RareCandy_StatBooster_GetParameters: ; eef5 ; 0xef14 -RareCandyEffect: ; ef14 +RareCandyEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1414,10 +1401,9 @@ RareCandyEffect: ; ef14 farcall EvolvePokemon jp UseDisposableItem -; efad -HealPowderEffect: ; efad +HealPowderEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon @@ -1436,21 +1422,19 @@ HealPowderEffect: ; efad .asm_efc9 jp StatusHealer_Jumptable -; efcc -StatusHealingEffect: ; efcc +StatusHealingEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon jp c, StatusHealer_ExitMenu -FullyHealStatus: ; efd4 +FullyHealStatus: call UseStatusHealer jp StatusHealer_Jumptable -; efda -UseStatusHealer: ; efda (3:6fda) +UseStatusHealer: call IsMonFainted ld a, $1 ret z @@ -1476,7 +1460,7 @@ UseStatusHealer: ; efda (3:6fda) ld a, $0 ret -IsItemUsedOnConfusedMon: ; f009 (3:7009) +IsItemUsedOnConfusedMon: call IsItemUsedOnBattleMon jr nc, .nope ld a, [wPlayerSubStatus3] @@ -1492,7 +1476,7 @@ IsItemUsedOnConfusedMon: ; f009 (3:7009) and a ret -BattlemonRestoreHealth: ; f01e (3:701e) +BattlemonRestoreHealth: call IsItemUsedOnBattleMon ret nc ld a, MON_HP @@ -1503,7 +1487,7 @@ BattlemonRestoreHealth: ; f01e (3:701e) ld [wBattleMonHP + 1], a ret -HealStatus: ; f030 (3:7030) +HealStatus: call IsItemUsedOnBattleMon ret nc xor a @@ -1524,7 +1508,7 @@ HealStatus: ; f030 (3:7030) pop bc ret -GetItemHealingAction: ; f058 (3:7058) +GetItemHealingAction: push hl ld a, [wCurItem] ld hl, StatusHealingActions @@ -1544,22 +1528,21 @@ GetItemHealingAction: ; f058 (3:7058) cp %11111111 pop hl ret -; f071 (3:7071) INCLUDE "data/items/heal_status.asm" -StatusHealer_Jumptable: ; f09e (3:709e) +StatusHealer_Jumptable: ld hl, .dw rst JumpTable ret -.dw ; f0a3 (3:70a3) +.dw dw StatusHealer_ClearPalettes dw StatusHealer_NoEffect dw StatusHealer_ExitMenu -RevivalHerbEffect: ; f0a9 +RevivalHerbEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon jp c, StatusHealer_ExitMenu @@ -1575,20 +1558,18 @@ RevivalHerbEffect: ; f0a9 .asm_f0c5 jp StatusHealer_Jumptable -; f0c8 -ReviveEffect: ; f0c8 +ReviveEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon jp c, StatusHealer_ExitMenu call RevivePokemon jp StatusHealer_Jumptable -; f0d6 -RevivePokemon: ; f0d6 +RevivePokemon: call IsMonFainted ld a, 1 ret nz @@ -1633,10 +1614,9 @@ RevivePokemon: ; f0d6 call UseDisposableItem ld a, 0 ret -; f128 -FullRestoreEffect: ; f128 +FullRestoreEffect: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon jp c, StatusHealer_ExitMenu @@ -1652,10 +1632,9 @@ FullRestoreEffect: ; f128 .NotAtFullHealth: call .FullRestore jp StatusHealer_Jumptable -; f144 -.FullRestore: ; f144 +.FullRestore: xor a ld [wLowHealthAlarm], a call ReviveFullHP @@ -1673,10 +1652,9 @@ FullRestoreEffect: ; f128 call UseDisposableItem ld a, 0 ret -; f16a -BitterBerryEffect: ; f16a +BitterBerryEffect: ld hl, wPlayerSubStatus3 bit SUBSTATUS_CONFUSED, [hl] ld a, 1 @@ -1694,25 +1672,21 @@ BitterBerryEffect: ; f16a .done jp StatusHealer_Jumptable -; f186 -RestoreHPEffect: ; f186 +RestoreHPEffect: call ItemRestoreHP jp StatusHealer_Jumptable -; f18c -EnergypowderEffect: ; f18c +EnergypowderEffect: ld c, HAPPINESS_BITTERPOWDER jr EnergypowderEnergyRootCommon -; f190 -EnergyRootEffect: ; f190 +EnergyRootEffect: ld c, HAPPINESS_ENERGYROOT -; f192 -EnergypowderEnergyRootCommon: ; f192 +EnergypowderEnergyRootCommon: push bc call ItemRestoreHP pop bc @@ -1725,10 +1699,9 @@ EnergypowderEnergyRootCommon: ; f192 .skip_happiness jp StatusHealer_Jumptable -; f1a9 -ItemRestoreHP: ; f1a9 (3:71a9) +ItemRestoreHP: ld b, PARTYMENUACTION_HEALING_ITEM call UseItem_SelectMon ld a, 2 @@ -1755,7 +1728,7 @@ ItemRestoreHP: ; f1a9 (3:71a9) ld a, 0 ret -HealHP_SFX_GFX: ; f1db (3:71db) +HealHP_SFX_GFX: push de ld de, SFX_POTION call WaitPlaySFX @@ -1768,7 +1741,7 @@ HealHP_SFX_GFX: ; f1db (3:71db) ld [wWhichHPBar], a predef_jump AnimateHPBar -UseItem_SelectMon: ; f1f9 (3:71f9) +UseItem_SelectMon: call .SelectMon ret c @@ -1784,7 +1757,7 @@ UseItem_SelectMon: ; f1f9 (3:71f9) and a ret -.SelectMon: ; f20b (3:720b) +.SelectMon: ld a, b ld [wPartyMenuActionText], a push hl @@ -1797,7 +1770,7 @@ UseItem_SelectMon: ; f1f9 (3:71f9) pop hl ret -ChooseMonToUseItemOn: ; f21c (3:721c) +ChooseMonToUseItemOn: farcall LoadPartyMenuGFX farcall InitPartyMenuWithCancel farcall InitPartyMenuGFX @@ -1809,7 +1782,7 @@ ChooseMonToUseItemOn: ; f21c (3:721c) farcall PartyMenuSelect ret -ItemActionText: ; f24a (3:724a) +ItemActionText: ld [wPartyMenuActionText], a ld a, [wCurPartySpecies] push af @@ -1832,7 +1805,7 @@ ItemActionText: ; f24a (3:724a) ld [wCurPartySpecies], a ret -ItemActionTextWaitButton: ; f279 (3:7279) +ItemActionTextWaitButton: xor a ld [hBGMapMode], a hlcoord 0, 0 @@ -1847,18 +1820,18 @@ ItemActionTextWaitButton: ; f279 (3:7279) call DelayFrames jp WaitPressAorB_BlinkCursor -StatusHealer_NoEffect: ; f299 (3:7299) +StatusHealer_NoEffect: call WontHaveAnyEffectMessage jr StatusHealer_ClearPalettes -StatusHealer_ExitMenu: ; f29e (3:729e) +StatusHealer_ExitMenu: xor a ld [wItemEffectSucceeded], a -StatusHealer_ClearPalettes: ; f2a2 (3:72a2) +StatusHealer_ClearPalettes: call ClearPalettes ret -IsItemUsedOnBattleMon: ; f2a6 (3:72a6) +IsItemUsedOnBattleMon: ld a, [wBattleMode] and a ret z @@ -1875,15 +1848,15 @@ IsItemUsedOnBattleMon: ; f2a6 (3:72a6) xor a ret -ReviveHalfHP: ; f2ba (3:72ba) +ReviveHalfHP: call LoadHPFromBuffer1 srl d rr e jr ContinueRevive -ReviveFullHP: ; f2c3 (3:72c3) +ReviveFullHP: call LoadHPFromBuffer1 -ContinueRevive: ; f2c6 (3:72c6) +ContinueRevive: ld a, MON_HP call GetPartyParamLocation ld [hl], d @@ -1891,7 +1864,7 @@ ContinueRevive: ; f2c6 (3:72c6) ld [hl], e jp LoadCurHPIntoBuffer5 -RestoreHealth: ; f2d1 (3:72d1) +RestoreHealth: ld a, MON_HP + 1 call GetPartyParamLocation ld a, [hl] @@ -1920,7 +1893,7 @@ RestoreHealth: ; f2d1 (3:72d1) .finish ret -RemoveHP: ; f2f9 (3:72f9) +RemoveHP: ld a, MON_HP + 1 call GetPartyParamLocation ld a, [hl] @@ -1937,7 +1910,7 @@ RemoveHP: ; f2f9 (3:72f9) call LoadCurHPIntoBuffer5 ret -IsMonFainted: ; f30d (3:730d) +IsMonFainted: push de call LoadMaxHPToBuffer1 call LoadCurHPToBuffer3 @@ -1947,7 +1920,7 @@ IsMonFainted: ; f30d (3:730d) pop de ret -IsMonAtFullHealth: ; f31b (3:731b) +IsMonAtFullHealth: call LoadHPFromBuffer3 ld h, d ld l, e @@ -1958,7 +1931,7 @@ IsMonAtFullHealth: ; f31b (3:731b) sbc d ret -LoadCurHPIntoBuffer5: ; f328 (3:7328) +LoadCurHPIntoBuffer5: ld a, MON_HP call GetPartyParamLocation ld a, [hli] @@ -1966,25 +1939,22 @@ LoadCurHPIntoBuffer5: ; f328 (3:7328) ld a, [hl] ld [wBuffer5], a ret -; f336 (3:7336) -LoadHPIntoBuffer5: ; f336 +LoadHPIntoBuffer5: ld a, d ld [wBuffer6], a ld a, e ld [wBuffer5], a ret -; f33f -LoadHPFromBuffer5: ; f33f +LoadHPFromBuffer5: ld a, [wBuffer6] ld d, a ld a, [wBuffer5] ld e, a ret -; f348 -LoadCurHPToBuffer3: ; f348 (3:7348) +LoadCurHPToBuffer3: ld a, MON_HP call GetPartyParamLocation ld a, [hli] @@ -1993,14 +1963,14 @@ LoadCurHPToBuffer3: ; f348 (3:7348) ld [wBuffer3], a ret -LoadHPFromBuffer3: ; f356 (3:7356) +LoadHPFromBuffer3: ld a, [wBuffer4] ld d, a ld a, [wBuffer3] ld e, a ret -LoadMaxHPToBuffer1: ; f35f (3:735f) +LoadMaxHPToBuffer1: push hl ld a, MON_MAXHP call GetPartyParamLocation @@ -2011,14 +1981,14 @@ LoadMaxHPToBuffer1: ; f35f (3:735f) pop hl ret -LoadHPFromBuffer1: ; f36f (3:736f) +LoadHPFromBuffer1: ld a, [wBuffer2] ld d, a ld a, [wBuffer1] ld e, a ret -GetOneFifthMaxHP: ; f378 (3:7378) +GetOneFifthMaxHP: push bc ld a, MON_MAXHP call GetPartyParamLocation @@ -2037,7 +2007,7 @@ GetOneFifthMaxHP: ; f378 (3:7378) pop bc ret -GetHealingItemAmount: ; f395 (3:7395) +GetHealingItemAmount: push hl ld a, [wCurItem] ld hl, HealingHPAmounts @@ -2060,11 +2030,10 @@ GetHealingItemAmount: ; f395 (3:7395) ld d, [hl] pop hl ret -; f3af (3:73af) INCLUDE "data/items/heal_hp.asm" -Softboiled_MilkDrinkFunction: ; f3df (3:73df) +Softboiled_MilkDrinkFunction: ; Softboiled/Milk Drink in the field ld a, [wPartyMenuCursor] dec a @@ -2094,7 +2063,7 @@ Softboiled_MilkDrinkFunction: ; f3df (3:73df) ld [wPartyMenuCursor], a ret -.SelectMilkDrinkRecipient: ; f419 (3:7419) +.SelectMilkDrinkRecipient: .loop push bc ld a, PARTYMENUACTION_HEALING_ITEM @@ -2127,7 +2096,6 @@ Softboiled_MilkDrinkFunction: ; f3df (3:73df) call MenuTextBoxBackup pop bc jr .loop -; f44a (3:744a) .Text_CantBeUsed: ; 0xf44a ; That can't be used on this #MON. @@ -2136,7 +2104,7 @@ Softboiled_MilkDrinkFunction: ; f3df (3:73df) ; 0xf44f -EscapeRopeEffect: ; f44f +EscapeRopeEffect: xor a ld [wItemEffectSucceeded], a farcall EscapeRopeFunction @@ -2145,24 +2113,20 @@ EscapeRopeEffect: ; f44f cp 1 call z, UseDisposableItem ret -; f462 -SuperRepelEffect: ; f462 +SuperRepelEffect: ld b, 200 jr UseRepel -; f466 -MaxRepelEffect: ; f466 +MaxRepelEffect: ld b, 250 jr UseRepel -; f466 -RepelEffect: ; f46a +RepelEffect: ld b, 100 -; f46c -UseRepel: ; f46c +UseRepel: ld a, [wRepelEffect] and a ld hl, TextJump_RepelUsedEarlierIsStillInEffect @@ -2180,16 +2144,15 @@ TextJump_RepelUsedEarlierIsStillInEffect: ; 0xf47d ; 0xf482 -XAccuracyEffect: ; f482 +XAccuracyEffect: ld hl, wPlayerSubStatus4 bit SUBSTATUS_X_ACCURACY, [hl] jp nz, WontHaveAnyEffect_NotUsedMessage set SUBSTATUS_X_ACCURACY, [hl] jp UseItemText -; f48f -PokeDollEffect: ; f48f +PokeDollEffect: ld a, [wBattleMode] dec a jr nz, .asm_f4a6 @@ -2205,28 +2168,25 @@ PokeDollEffect: ; f48f xor a ld [wItemEffectSucceeded], a ret -; f4ab -GuardSpecEffect: ; f4ab +GuardSpecEffect: ld hl, wPlayerSubStatus4 bit SUBSTATUS_MIST, [hl] jp nz, WontHaveAnyEffect_NotUsedMessage set SUBSTATUS_MIST, [hl] jp UseItemText -; f4b8 -DireHitEffect: ; f4b8 +DireHitEffect: ld hl, wPlayerSubStatus4 bit SUBSTATUS_FOCUS_ENERGY, [hl] jp nz, WontHaveAnyEffect_NotUsedMessage set SUBSTATUS_FOCUS_ENERGY, [hl] jp UseItemText -; f4c5 -XItemEffect: ; f4c5 +XItemEffect: call UseItemText ld a, [wCurItem] @@ -2257,12 +2217,11 @@ XItemEffect: ; f4c5 ld c, HAPPINESS_USEDXITEM farcall ChangeHappiness ret -; f504 INCLUDE "data/items/x_stats.asm" -PokeFluteEffect: ; f50c +PokeFluteEffect: ld a, [wBattleMode] and a jr nz, .dummy @@ -2326,7 +2285,6 @@ PokeFluteEffect: ; f50c dec c jr nz, .loop ret -; f56c .CatchyTune: ; 0xf56c @@ -2357,57 +2315,49 @@ PokeFluteEffect: ; f50c .battle jp PokeFluteTerminatorCharacter -; f58f -BlueCardEffect: ; f58f +BlueCardEffect: ld hl, .bluecardtext jp MenuTextBoxWaitButton .bluecardtext text_jump UnknownText_0x1c5c5e db "@" -; f59a -CoinCaseEffect: ; f59a +CoinCaseEffect: ld hl, .coincasetext jp MenuTextBoxWaitButton .coincasetext text_jump UnknownText_0x1c5c7b db "@" -; f5a5 -OldRodEffect: ; f5a5 +OldRodEffect: ld e, $0 jr UseRod -; f5a9 -GoodRodEffect: ; f5a9 +GoodRodEffect: ld e, $1 jr UseRod -; f5ad -SuperRodEffect: ; f5ad +SuperRodEffect: ld e, $2 jr UseRod -; f5b1 -UseRod: ; f5b1 +UseRod: farcall FishFunction ret -; f5b8 -ItemfinderEffect: ; f5b8 +ItemfinderEffect: farcall ItemFinder ret -; f5bf -RestorePPEffect: ; f5bf +RestorePPEffect: ld a, [wCurItem] ld [wd002], a @@ -2488,12 +2438,11 @@ RestorePPEffect: ; f5bf ld hl, TextJump_PPsIncreased call PrintText -FinishPPRestore: ; f64c +FinishPPRestore: call ClearPalettes jp UseDisposableItem -; f652 -BattleRestorePP: ; f652 +BattleRestorePP: ld a, [wBattleMode] and a jr z, .not_in_battle @@ -2548,15 +2497,13 @@ endr .done ret -; f6a7 -Not_PP_Up: ; f6a7 +Not_PP_Up: call RestorePP jr nz, BattleRestorePP jp PPRestoreItem_NoEffect -; f6af -Elixer_RestorePPofAllMoves: ; f6af +Elixer_RestorePPofAllMoves: xor a ld hl, wMenuCursorY ld [hli], a @@ -2586,17 +2533,16 @@ Elixer_RestorePPofAllMoves: ; f6af and a jp nz, BattleRestorePP -PPRestoreItem_NoEffect: ; f6dd +PPRestoreItem_NoEffect: call WontHaveAnyEffectMessage -PPRestoreItem_Cancel: ; f6e0 +PPRestoreItem_Cancel: call ClearPalettes xor a ld [wItemEffectSucceeded], a ret -; f6e8 -RestorePP: ; f6e8 +RestorePP: xor a ; PARTYMON ld [wMonType], a call GetMaxPPOfMove @@ -2640,7 +2586,6 @@ RestorePP: ; f6e8 .dont_restore xor a ret -; f725 TextJump_RaiseThePPOfWhichMove: ; 0xf725 ; Raise the PP of which move? @@ -2673,49 +2618,43 @@ UnknownText_0xf739: ; 0xf739 ; 0xf73e -SquirtbottleEffect: ; f73e +SquirtbottleEffect: farcall _Squirtbottle ret -; f745 -CardKeyEffect: ; f745 +CardKeyEffect: farcall _CardKey ret -; f74c -BasementKeyEffect: ; f74c +BasementKeyEffect: farcall _BasementKey ret -; f753 -SacredAshEffect: ; f753 +SacredAshEffect: farcall _SacredAsh ld a, [wItemEffectSucceeded] cp $1 ret nz call UseDisposableItem ret -; f763 -NormalBoxEffect: ; f763 +NormalBoxEffect: ld c, DECOFLAG_SILVER_TROPHY_DOLL jr OpenBox -; f767 -GorgeousBoxEffect: ; f767 +GorgeousBoxEffect: ld c, DECOFLAG_GOLD_TROPHY_DOLL -OpenBox: ; f769 +OpenBox: farcall SetSpecificDecorationFlag ld hl, .text call PrintText jp UseDisposableItem -; f778 .text ; 0xf778 ; There was a trophy inside! @@ -2723,32 +2662,29 @@ OpenBox: ; f769 db "@" ; 0xf77d -NoEffect: ; f77d +NoEffect: jp IsntTheTimeMessage -; f780 -Play_SFX_FULL_HEAL: ; f780 +Play_SFX_FULL_HEAL: push de ld de, SFX_FULL_HEAL call WaitPlaySFX pop de ret -; f789 -UseItemText: ; f789 +UseItemText: ld hl, UsedItemText call PrintText call Play_SFX_FULL_HEAL call WaitPressAorB_BlinkCursor -UseDisposableItem: ; f795 +UseDisposableItem: ld hl, wNumItems ld a, 1 ld [wItemQuantityChangeBuffer], a jp TossItem -; f7a0 -UseBallInTrainerBattle: ; f7a0 +UseBallInTrainerBattle: call ReturnToBattle_UseBall ld de, ANIM_THROW_POKE_BALL ld a, e @@ -2765,9 +2701,8 @@ UseBallInTrainerBattle: ; f7a0 ld hl, DontBeAThiefText call PrintText jr UseDisposableItem -; f7ca -WontHaveAnyEffect_NotUsedMessage: ; f7ca +WontHaveAnyEffect_NotUsedMessage: ld hl, WontHaveAnyEffectText call PrintText @@ -2775,14 +2710,12 @@ WontHaveAnyEffect_NotUsedMessage: ; f7ca ld a, $2 ld [wItemEffectSucceeded], a ret -; f7d6 -LooksBitterMessage: ; f7d6 +LooksBitterMessage: ld hl, LooksBitterText jp PrintText -; f7dc -Ball_BoxIsFullMessage: ; f7dc +Ball_BoxIsFullMessage: ld hl, Ball_BoxIsFullText call PrintText @@ -2790,37 +2723,35 @@ Ball_BoxIsFullMessage: ; f7dc ld a, $2 ld [wItemEffectSucceeded], a ret -; f7e8 -CantUseOnEggMessage: ; f7e8 +CantUseOnEggMessage: ld hl, CantUseOnEggText jr CantUseItemMessage -IsntTheTimeMessage: ; f7ed +IsntTheTimeMessage: ld hl, IsntTheTimeText jr CantUseItemMessage -WontHaveAnyEffectMessage: ; f7f2 +WontHaveAnyEffectMessage: ld hl, WontHaveAnyEffectText jr CantUseItemMessage -BelongsToSomeoneElseMessage: ; f7f7 +BelongsToSomeoneElseMessage: ld hl, BelongsToSomeoneElseText jr CantUseItemMessage -CyclingIsntAllowedMessage: ; f7fc +CyclingIsntAllowedMessage: ld hl, CyclingIsntAllowedText jr CantUseItemMessage -CantGetOnYourBikeMessage: ; f801 +CantGetOnYourBikeMessage: ld hl, CantGetOnYourBikeText -CantUseItemMessage: ; f804 +CantUseItemMessage: ; Item couldn't be used. xor a ld [wItemEffectSucceeded], a jp PrintText -; f80b LooksBitterText: ; 0xf80b ; It looks bitter… @@ -2901,7 +2832,7 @@ GotOffTheItemText: ; 0xf847 ; 0xf84c -ApplyPPUp: ; f84c +ApplyPPUp: ld a, MON_MOVES call GetPartyParamLocation push hl @@ -2935,11 +2866,10 @@ ApplyPPUp: ; f84c inc hl inc de jr .loop -; f881 -ComputeMaxPP: ; f881 +ComputeMaxPP: push bc ; Divide the base PP by 5. ld a, [de] @@ -2987,9 +2917,8 @@ ComputeMaxPP: ; f881 ld [hl], b pop bc ret -; f8b9 -RestoreAllPP: ; f8b9 +RestoreAllPP: ld a, MON_PP call GetPartyParamLocation push hl @@ -3023,10 +2952,9 @@ RestoreAllPP: ; f8b9 dec c jr nz, .loop ret -; f8ec -GetMaxPPOfMove: ; f8ec +GetMaxPPOfMove: ld a, [wStringBuffer1 + 0] push af ld a, [wStringBuffer1 + 1] @@ -3103,16 +3031,14 @@ GetMaxPPOfMove: ; f8ec pop af ld [wStringBuffer1 + 0], a ret -; f963 -GetMthMoveOfNthPartymon: ; f963 +GetMthMoveOfNthPartymon: ld a, [wCurPartyMon] call AddNTimes -GetMthMoveOfCurrentMon: ; f969 +GetMthMoveOfCurrentMon: ld a, [wMenuCursorY] ld c, a ld b, 0 add hl, bc ret -; f971 diff --git a/engine/items/items.asm b/engine/items/items.asm index c07042aed6c..28c79f4cc48 100644 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -1,4 +1,4 @@ -_ReceiveItem:: ; d1d5 +_ReceiveItem:: call DoesHLEqualNumItems jp nz, PutItemInPocket push hl @@ -10,28 +10,28 @@ _ReceiveItem:: ; d1d5 rst JumpTable ret -.Pockets: ; d1e9 +.Pockets: ; entries correspond to item types dw .Item dw .KeyItem dw .Ball dw .TMHM -.Item: ; d1f1 +.Item: ld h, d ld l, e jp PutItemInPocket -.KeyItem: ; d1f6 +.KeyItem: ld h, d ld l, e jp ReceiveKeyItem -.Ball: ; d1fb +.Ball: ld hl, wNumBalls jp PutItemInPocket -.TMHM: ; d201 +.TMHM: ld h, d ld l, e ld a, [wCurItem] @@ -39,7 +39,7 @@ _ReceiveItem:: ; d1d5 call GetTMHMNumber jp ReceiveTMHM -_TossItem:: ; d20d +_TossItem:: call DoesHLEqualNumItems jr nz, .remove push hl @@ -58,11 +58,11 @@ _TossItem:: ; d20d dw .Ball dw .TMHM -.Ball: ; d228 +.Ball: ld hl, wNumBalls jp RemoveItemFromPocket -.TMHM: ; d22e +.TMHM: ld h, d ld l, e ld a, [wCurItem] @@ -70,19 +70,19 @@ _TossItem:: ; d20d call GetTMHMNumber jp TossTMHM -.KeyItem: ; d23a +.KeyItem: ld h, d ld l, e jp TossKeyItem -.Item: ; d23f +.Item: ld h, d ld l, e .remove jp RemoveItemFromPocket -_CheckItem:: ; d244 +_CheckItem:: call DoesHLEqualNumItems jr nz, .nope push hl @@ -101,11 +101,11 @@ _CheckItem:: ; d244 dw .Ball dw .TMHM -.Ball: ; d25f +.Ball: ld hl, wNumBalls jp CheckTheItem -.TMHM: ; d265 +.TMHM: ld h, d ld l, e ld a, [wCurItem] @@ -113,19 +113,19 @@ _CheckItem:: ; d244 call GetTMHMNumber jp CheckTMHM -.KeyItem: ; d271 +.KeyItem: ld h, d ld l, e jp CheckKeyItems -.Item: ; d276 +.Item: ld h, d ld l, e .nope jp CheckTheItem -DoesHLEqualNumItems: ; d27b +DoesHLEqualNumItems: ld a, l cp LOW(wNumItems) ret nz @@ -133,7 +133,7 @@ DoesHLEqualNumItems: ; d27b cp HIGH(wNumItems) ret -GetPocketCapacity: ; d283 +GetPocketCapacity: ld c, MAX_ITEMS ld a, e cp LOW(wNumItems) @@ -155,7 +155,7 @@ GetPocketCapacity: ; d283 ld c, MAX_BALLS ret -PutItemInPocket: ; d29c +PutItemInPocket: ld d, h ld e, l inc hl @@ -231,7 +231,7 @@ PutItemInPocket: ; d29c scf ret -RemoveItemFromPocket: ; d2ff +RemoveItemFromPocket: ld d, h ld e, l ld a, [hli] @@ -296,7 +296,7 @@ RemoveItemFromPocket: ; d2ff and a ret -CheckTheItem: ; d349 +CheckTheItem: ld a, [wCurItem] ld c, a .loop @@ -313,7 +313,7 @@ CheckTheItem: ; d349 and a ret -ReceiveKeyItem: ; d35a +ReceiveKeyItem: ld hl, wNumKeyItems ld a, [hli] cp MAX_KEY_ITEMS @@ -333,7 +333,7 @@ ReceiveKeyItem: ; d35a and a ret -TossKeyItem: ; d374 +TossKeyItem: ld a, [wCurItemQuantity] ld e, a ld d, 0 @@ -363,7 +363,7 @@ TossKeyItem: ; d374 scf ret -.Toss: ; d396 +.Toss: ld hl, wNumKeyItems ld a, [wCurItem] ld c, a @@ -384,7 +384,7 @@ TossKeyItem: ; d374 scf ret -CheckKeyItems: ; d3b1 +CheckKeyItems: ld a, [wCurItem] ld c, a ld hl, wKeyItems @@ -401,7 +401,7 @@ CheckKeyItems: ; d3b1 scf ret -ReceiveTMHM: ; d3c4 +ReceiveTMHM: dec c ld b, 0 ld hl, wTMsHMs @@ -418,7 +418,7 @@ ReceiveTMHM: ; d3c4 and a ret -TossTMHM: ; d3d8 +TossTMHM: dec c ld b, 0 ld hl, wTMsHMs @@ -445,7 +445,7 @@ TossTMHM: ; d3d8 and a ret -CheckTMHM: ; d3fb +CheckTMHM: dec c ld b, $0 ld hl, wTMsHMs @@ -456,7 +456,7 @@ CheckTMHM: ; d3fb scf ret -GetTMHMNumber:: ; d407 +GetTMHMNumber:: ; Return the number of a TM/HM by item id c. ld a, c ; Skip any dummy items. @@ -473,7 +473,7 @@ GetTMHMNumber:: ; d407 ld c, a ret -GetNumberedTMHM: ; d417 +GetNumberedTMHM: ; Return the item id of a TM/HM by number c. ld a, c ; Skip any gaps. @@ -491,7 +491,7 @@ GetNumberedTMHM: ; d417 ld c, a ret -_CheckTossableItem:: ; d427 +_CheckTossableItem:: ; Return 1 in wItemAttributeParamBuffer and carry if wCurItem can't be removed from the bag. ld a, ITEMATTR_PERMISSIONS call GetItemAttr @@ -500,7 +500,7 @@ _CheckTossableItem:: ; d427 and a ret -CheckSelectableItem: ; d432 +CheckSelectableItem: ; Return 1 in wItemAttributeParamBuffer and carry if wCurItem can't be selected. ld a, ITEMATTR_PERMISSIONS call GetItemAttr @@ -509,7 +509,7 @@ CheckSelectableItem: ; d432 and a ret -CheckItemPocket:: ; d43d +CheckItemPocket:: ; Return the pocket for wCurItem in wItemAttributeParamBuffer. ld a, ITEMATTR_POCKET call GetItemAttr @@ -517,7 +517,7 @@ CheckItemPocket:: ; d43d ld [wItemAttributeParamBuffer], a ret -CheckItemContext: ; d448 +CheckItemContext: ; Return the context for wCurItem in wItemAttributeParamBuffer. ld a, ITEMATTR_HELP call GetItemAttr @@ -525,7 +525,7 @@ CheckItemContext: ; d448 ld [wItemAttributeParamBuffer], a ret -CheckItemMenu: ; d453 +CheckItemMenu: ; Return the menu for wCurItem in wItemAttributeParamBuffer. ld a, ITEMATTR_HELP call GetItemAttr @@ -534,7 +534,7 @@ CheckItemMenu: ; d453 ld [wItemAttributeParamBuffer], a ret -GetItemAttr: ; d460 +GetItemAttr: ; Get attribute a of wCurItem. push hl @@ -560,13 +560,13 @@ GetItemAttr: ; d460 pop hl ret -ItemAttr_ReturnCarry: ; d47f +ItemAttr_ReturnCarry: ld a, 1 ld [wItemAttributeParamBuffer], a scf ret -GetItemPrice: ; d486 +GetItemPrice: ; Return the price of wCurItem in de. push hl push bc diff --git a/engine/items/mart.asm b/engine/items/mart.asm index 911251f659f..a4a1f6314fe 100644 --- a/engine/items/mart.asm +++ b/engine/items/mart.asm @@ -6,7 +6,7 @@ const MARTTEXT_HERE_YOU_GO const MARTTEXT_SOLD_OUT -OpenMartDialog:: ; 15a45 +OpenMartDialog:: call GetMart ld a, c ld [wEngineBuffer1], a @@ -15,7 +15,6 @@ OpenMartDialog:: ; 15a45 ld hl, .dialogs rst JumpTable ret -; 15a57 .dialogs dw MartDialog @@ -23,18 +22,16 @@ OpenMartDialog:: ; 15a45 dw BargainShop dw Pharmacist dw RooftopSale -; 15a61 -MartDialog: ; 15a61 +MartDialog: ld a, 0 ld [wEngineBuffer1], a xor a ld [wEngineBuffer5], a call StandardMart ret -; 15a6e -HerbShop: ; 15a6e +HerbShop: call FarReadMart call LoadStandardMenuHeader ld hl, Text_HerbShop_Intro @@ -43,9 +40,8 @@ HerbShop: ; 15a6e ld hl, Text_HerbShop_ComeAgain call MartTextBox ret -; 15a84 -BargainShop: ; 15a84 +BargainShop: ld b, BANK(BargainShopData) ld de, BargainShopData call LoadMartPointer @@ -65,9 +61,8 @@ BargainShop: ; 15a84 ld hl, Text_BargainShop_ComeAgain call MartTextBox ret -; 15aae -Pharmacist: ; 15aae +Pharmacist: call FarReadMart call LoadStandardMenuHeader ld hl, Text_Pharmacist_Intro @@ -76,9 +71,8 @@ Pharmacist: ; 15aae ld hl, Text_Pharmacist_ComeAgain call MartTextBox ret -; 15ac4 -RooftopSale: ; 15ac4 +RooftopSale: ld b, BANK(RooftopSaleMart1) ld de, RooftopSaleMart1 ld hl, wStatusFlags @@ -97,11 +91,10 @@ RooftopSale: ; 15ac4 ld hl, Text_Mart_ComeAgain call MartTextBox ret -; 15aee INCLUDE "data/items/rooftop_sale.asm" -LoadMartPointer: ; 15b10 +LoadMartPointer: ld a, b ld [wMartPointerBank], a ld a, e @@ -117,9 +110,8 @@ LoadMartPointer: ; 15b10 ld [wBargainShopFlags], a ld [wFacingDirection], a ret -; 15b31 -GetMart: ; 15b31 +GetMart: ld a, e cp (Marts.End - Marts) / 2 jr c, .IsAMart @@ -136,9 +128,8 @@ GetMart: ; 15b31 ld d, [hl] ld b, BANK(Marts) ret -; 15b47 -StandardMart: ; 15b47 +StandardMart: .loop ld a, [wEngineBuffer5] ld hl, .MartFunctions @@ -155,17 +146,15 @@ StandardMart: ; 15b47 dw .Sell dw .Quit dw .AnythingElse -; 15b62 -.HowMayIHelpYou: ; 15b62 +.HowMayIHelpYou: call LoadStandardMenuHeader ld hl, Text_Mart_HowMayIHelpYou call PrintText ld a, $1 ; top menu ret -; 15b6e -.TopMenu: ; 15b6e +.TopMenu: ld hl, MenuHeader_BuySell call CopyMenuHeader call VerticalMenu @@ -184,41 +173,36 @@ StandardMart: ; 15b47 .sell ld a, $3 ; sell ret -; 15b8d -.Buy: ; 15b8d +.Buy: call ExitMenu call FarReadMart call BuyMenu and a ld a, $5 ; Anything else? ret -; 15b9a -.Sell: ; 15b9a +.Sell: call ExitMenu call SellMenu ld a, $5 ; Anything else? ret -; 15ba3 -.Quit: ; 15ba3 +.Quit: call ExitMenu ld hl, Text_Mart_ComeAgain call MartTextBox ld a, $ff ; exit ret -; 15baf -.AnythingElse: ; 15baf +.AnythingElse: call LoadStandardMenuHeader ld hl, Text_Mart_AnythingElse call PrintText ld a, $1 ; top menu ret -; 15bbb -FarReadMart: ; 15bbb +FarReadMart: ld hl, wMartPointer ld a, [hli] ld h, [hl] @@ -246,16 +230,15 @@ FarReadMart: ; 15bbb .done ret -; 15be5 -GetMartItemPrice: ; 15be5 +GetMartItemPrice: ; Return the price of item a in BCD at hl and in tiles at wStringBuffer1. push hl ld [wCurItem], a farcall GetItemPrice pop hl -GetMartPrice: ; 15bf0 +GetMartPrice: ; Return price de in BCD at hl and in tiles at wStringBuffer1. push hl ld a, d @@ -280,9 +263,8 @@ GetMartPrice: ; 15bf0 dec c jr nz, .loop ret -; 15c1a -.CharToNybble: ; 15c1a +.CharToNybble: ld a, [de] inc de cp " " @@ -292,9 +274,8 @@ GetMartPrice: ; 15bf0 .not_space sub "0" ret -; 15c25 -ReadMart: ; 15c25 +ReadMart: ; Load the mart pointer. Mart data is local (no need for bank). ld hl, wMartPointer ld a, [hli] @@ -337,12 +318,11 @@ ReadMart: ; 15c25 ld a, [hl] ld [wCurMart], a ret -; 15c51 INCLUDE "data/items/bargain_shop.asm" -BuyMenu: ; 15c62 +BuyMenu: call FadeToMenu farcall BlankScreen xor a @@ -354,9 +334,8 @@ BuyMenu: ; 15c62 jr nc, .loop call CloseSubmenu ret -; 15c7d -LoadBuyMenuText: ; 15c7d +LoadBuyMenuText: ; load text from a nested table ; which table is in wEngineBuffer1 ; which entry is in register a @@ -375,9 +354,8 @@ LoadBuyMenuText: ; 15c7d ld l, a call PrintText ret -; 15c91 -MartAskPurchaseQuantity: ; 15c91 +MartAskPurchaseQuantity: call GetMartDialogGroup ; gets a pointer from GetMartDialogGroup.MartTextFunctionPointers inc hl inc hl @@ -387,9 +365,8 @@ MartAskPurchaseQuantity: ; 15c91 cp 1 jp z, BargainShopAskPurchaseQuantity jp RooftopSaleAskPurchaseQuantity -; 15ca3 -GetMartDialogGroup: ; 15ca3 +GetMartDialogGroup: ld a, [wEngineBuffer1] ld e, a ld d, 0 @@ -398,17 +375,15 @@ GetMartDialogGroup: ; 15ca3 add hl, de add hl, de ret -; 15cb0 -.MartTextFunctionPointers: ; 15cb0 +.MartTextFunctionPointers: dwb .StandardMartPointers, 0 dwb .HerbShopPointers, 0 dwb .BargainShopPointers, 1 dwb .PharmacyPointers, 0 dwb .StandardMartPointers, 2 -; 15cbf -.StandardMartPointers: ; 15cbf +.StandardMartPointers: dw Text_Mart_HowMany dw Text_Mart_CostsThisMuch dw Text_Mart_InsufficientFunds @@ -416,7 +391,7 @@ GetMartDialogGroup: ; 15ca3 dw Text_Mart_HereYouGo dw BuyMenuLoop -.HerbShopPointers: ; 15ccb +.HerbShopPointers: dw Text_HerbShop_HowMany dw Text_HerbShop_CostsThisMuch dw Text_HerbShop_InsufficientFunds @@ -424,7 +399,7 @@ GetMartDialogGroup: ; 15ca3 dw Text_HerbShop_HereYouGo dw BuyMenuLoop -.BargainShopPointers: ; 15cd7 +.BargainShopPointers: dw BuyMenuLoop dw Text_BargainShop_CostsThisMuch dw Text_BargainShop_InsufficientFunds @@ -432,17 +407,16 @@ GetMartDialogGroup: ; 15ca3 dw Text_BargainShop_HereYouGo dw Text_BargainShop_SoldOut -.PharmacyPointers: ; 15ce3 +.PharmacyPointers: dw Text_Pharmacy_HowMany dw Text_Pharmacy_CostsThisMuch dw Text_Pharmacy_InsufficientFunds dw Text_Pharmacy_BagFull dw Text_Pharmacy_HereYouGo dw BuyMenuLoop -; 15cef -BuyMenuLoop: ; 15cef +BuyMenuLoop: farcall PlaceMoneyTopRight call UpdateSprites ld hl, MenuHeader_Buy @@ -512,7 +486,6 @@ BuyMenuLoop: ; 15cef call JoyWaitAorB and a ret -; 15d83 StandardMartAskPurchaseQuantity: ld a, 99 @@ -522,15 +495,13 @@ StandardMartAskPurchaseQuantity: farcall SelectQuantityToBuy call ExitMenu ret -; 15d97 -MartConfirmPurchase: ; 15d97 +MartConfirmPurchase: predef PartyMonItemName ld a, MARTTEXT_COSTS_THIS_MUCH call LoadBuyMenuText call YesNoBox ret -; 15da5 BargainShopAskPurchaseQuantity: ld a, 1 @@ -571,7 +542,6 @@ BargainShopAskPurchaseQuantity: call JoyWaitAorB scf ret -; 15de2 RooftopSaleAskPurchaseQuantity: ld a, MARTTEXT_HOW_MANY @@ -582,9 +552,8 @@ RooftopSaleAskPurchaseQuantity: farcall RooftopSale_SelectQuantityToBuy call ExitMenu ret -; 15df9 -.GetSalePrice: ; 15df9 +.GetSalePrice: ld a, [wMartItemID] ld e, a ld d, 0 @@ -601,7 +570,6 @@ RooftopSaleAskPurchaseQuantity: inc hl ld d, [hl] ret -; 15e0e Text_Mart_HowMany: ; 0x15e0e @@ -631,9 +599,8 @@ MenuHeader_Buy: ; 0x15e18 dba PlaceMenuItemName dba .PrintBCDPrices dba UpdateItemDescription -; 15e30 -.PrintBCDPrices: ; 15e30 +.PrintBCDPrices: ld a, [wScrollingMenuCursorPosition] ld c, a ld b, 0 @@ -650,7 +617,6 @@ MenuHeader_Buy: ; 0x15e18 ld c, PRINTNUM_LEADINGZEROS | PRINTNUM_MONEY | 3 call PrintBCDNumber ret -; 15e4a (5:5e4a) Text_HerbShop_Intro: ; 0x15e4a ; Hello, dear. I sell inexpensive herbal medicine. They're good, but a trifle bitter. Your #MON may not like them. Hehehehe… @@ -779,7 +745,7 @@ Text_Pharmacist_ComeAgain: ; 0x15eae ; 0x15eb3 -SellMenu: ; 15eb3 +SellMenu: call DisableSpriteUpdates farcall DepositSellInitPackBuffers .loop @@ -794,14 +760,12 @@ SellMenu: ; 15eb3 call ReturnToMapWithSpeechTextbox and a ret -; 15ed3 .Unreferenced_NothingToSell: ld hl, .NothingToSellText call MenuTextBoxBackup and a ret -; 15edb .NothingToSellText: ; 0x15edb ; You don't have anything to sell. @@ -810,15 +774,14 @@ SellMenu: ; 15eb3 ; 0x15ee0 -.TryToSellItem: ; 15ee0 +.TryToSellItem: farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] ld hl, .dw rst JumpTable ret -; 15eee -.dw ; 15eee +.dw dw .try_sell dw .cant_buy dw .cant_buy @@ -826,14 +789,12 @@ SellMenu: ; 15eb3 dw .try_sell dw .try_sell dw .try_sell -; 15efc -.cant_buy ; 15efc +.cant_buy ret -; 15efd -.try_sell ; 15efd +.try_sell farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] and a @@ -877,7 +838,6 @@ SellMenu: ; 15eb3 call ExitMenu and a ret -; 15f73 Text_Mart_SellHowMany: ; 0x15f73 ; How many? @@ -891,7 +851,7 @@ Text_Mart_ICanPayThisMuch: ; 0x15f78 db "@" ; 0x15f7d -.UnusedString15f7d: ; 15f7d +.UnusedString15f7d: db "!ダミー!@" Text_Mart_HowMayIHelpYou: ; 0x15f83 @@ -955,16 +915,14 @@ Text_Mart_SoldForAmount: ; 0x15fbe db "@" ; 0x15fc3 -PlayTransactionSound: ; 15fc3 +PlayTransactionSound: call WaitSFX ld de, SFX_TRANSACTION call PlaySFX ret -; 15fcd -MartTextBox: ; 15fcd +MartTextBox: call MenuTextBox call JoyWaitAorB call ExitMenu ret -; 15fd7 diff --git a/engine/items/pack.asm b/engine/items/pack.asm index 9f0e82f66f3..3ad330f3ac7 100644 --- a/engine/items/pack.asm +++ b/engine/items/pack.asm @@ -12,7 +12,7 @@ const PACKSTATE_QUITNOSCRIPT ; 9 const PACKSTATE_QUITRUNSCRIPT ; 10 -Pack: ; 10000 +Pack: ld hl, wOptions set NO_TEXT_SCROLL, [hl] call InitPackBuffers @@ -31,17 +31,15 @@ Pack: ; 10000 ld hl, wOptions res NO_TEXT_SCROLL, [hl] ret -; 10026 -.RunJumptable: ; 10026 +.RunJumptable: ld a, [wJumptableIndex] ld hl, .Jumptable call Pack_GetJumptablePointer jp hl -; 10030 -.Jumptable: ; 10030 (4:4030) +.Jumptable: ; entries correspond to PACKSTATE_* constants dw .InitGFX ; 0 dw .InitItemsPocket ; 1 @@ -55,7 +53,7 @@ Pack: ; 10000 dw Pack_QuitNoScript ; 9 dw Pack_QuitRunScript ; 10 -.InitGFX: ; 10046 (4:4046) +.InitGFX: xor a ld [hBGMapMode], a call Pack_InitGFX @@ -64,7 +62,7 @@ Pack: ; 10000 call Pack_InitColors ret -.InitItemsPocket: ; 10056 (4:4056) +.InitItemsPocket: xor a ; ITEM_POCKET ld [wCurrPocket], a call ClearPocketList @@ -73,7 +71,7 @@ Pack: ; 10000 call Pack_JumptableNext ret -.ItemsPocketMenu: ; 10067 (4:4067) +.ItemsPocketMenu: ld hl, ItemsPocketMenuHeader call CopyMenuHeader ld a, [wItemsPocketCursor] @@ -92,7 +90,7 @@ Pack: ; 10000 call .ItemBallsKey_LoadSubmenu ret -.InitKeyItemsPocket: ; 10094 (4:4094) +.InitKeyItemsPocket: ld a, KEY_ITEM_POCKET ld [wCurrPocket], a call ClearPocketList @@ -101,7 +99,7 @@ Pack: ; 10000 call Pack_JumptableNext ret -.KeyItemsPocketMenu: ; 100a6 (4:40a6) +.KeyItemsPocketMenu: ld hl, KeyItemsPocketMenuHeader call CopyMenuHeader ld a, [wKeyItemsPocketCursor] @@ -120,7 +118,7 @@ Pack: ; 10000 call .ItemBallsKey_LoadSubmenu ret -.InitTMHMPocket: ; 100d3 (4:40d3) +.InitTMHMPocket: ld a, TM_HM_POCKET ld [wCurrPocket], a call ClearPocketList @@ -131,7 +129,7 @@ Pack: ; 10000 call Pack_JumptableNext ret -.TMHMPocketMenu: ; 100e8 (4:40e8) +.TMHMPocketMenu: farcall TMHMPocket ld b, PACKSTATE_INITKEYITEMSPOCKET ; left ld c, PACKSTATE_INITITEMSPOCKET ; right @@ -160,7 +158,6 @@ Pack: ; 10000 call Pack_GetJumptablePointer jp hl -; 10124 (4:4124) .MenuHeader1: ; 0x10124 db MENU_BACKUP_TILES ; flags menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 @@ -175,11 +172,10 @@ Pack: ; 10000 db "QUIT@" ; 0x10137 -.Jumptable1: ; 10137 +.Jumptable1: dw .UseItem dw QuitItemSubmenu -; 1013b .MenuHeader2: ; 0x1013b db MENU_BACKUP_TILES ; flags @@ -196,13 +192,12 @@ Pack: ; 10000 db "QUIT@" ; 0x10153 -.Jumptable2: ; 10153 +.Jumptable2: dw .UseItem dw GiveItem dw QuitItemSubmenu -; 10159 -.UseItem: ; 10159 +.UseItem: farcall AskTeachTMHM ret c farcall ChooseMonToLearnTMHM @@ -222,7 +217,7 @@ Pack: ; 10000 call Pack_InitColors ret -.InitBallsPocket: ; 10186 (4:4186) +.InitBallsPocket: ld a, BALL_POCKET ld [wCurrPocket], a call ClearPocketList @@ -231,7 +226,7 @@ Pack: ; 10000 call Pack_JumptableNext ret -.BallsPocketMenu: ; 10198 (4:4198) +.BallsPocketMenu: ld hl, BallsPocketMenuHeader call CopyMenuHeader ld a, [wBallsPocketCursor] @@ -250,7 +245,7 @@ Pack: ; 10000 call .ItemBallsKey_LoadSubmenu ret -.ItemBallsKey_LoadSubmenu: ; 101c5 (4:41c5) +.ItemBallsKey_LoadSubmenu: farcall _CheckTossableItem ld a, [wItemAttributeParamBuffer] and a @@ -319,7 +314,6 @@ Pack: ; 10000 call Pack_GetJumptablePointer jp hl -; 10249 (4:4249) MenuHeader_UsableKeyItem: ; 0x10249 db MENU_BACKUP_TILES ; flags menu_coords 13, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 @@ -337,13 +331,12 @@ MenuHeader_UsableKeyItem: ; 0x10249 db "QUIT@" ; 0x1026a -Jumptable_UseGiveTossRegisterQuit: ; 1026a +Jumptable_UseGiveTossRegisterQuit: dw UseItem dw GiveItem dw TossMenu dw RegisterItem dw QuitItemSubmenu -; 10274 MenuHeader_UsableItem: ; 0x10274 db MENU_BACKUP_TILES ; flags @@ -361,12 +354,11 @@ MenuHeader_UsableItem: ; 0x10274 db "QUIT@" ; 0x10291 -Jumptable_UseGiveTossQuit: ; 10291 +Jumptable_UseGiveTossQuit: dw UseItem dw GiveItem dw TossMenu dw QuitItemSubmenu -; 10299 MenuHeader_UnusableItem: ; 0x10299 db MENU_BACKUP_TILES ; flags @@ -382,10 +374,9 @@ MenuHeader_UnusableItem: ; 0x10299 db "QUIT@" ; 0x102ac -Jumptable_UseQuit: ; 102ac +Jumptable_UseQuit: dw UseItem dw QuitItemSubmenu -; 102b0 MenuHeader_UnusableKeyItem: ; 0x102b0 db MENU_BACKUP_TILES ; flags @@ -402,11 +393,10 @@ MenuHeader_UnusableKeyItem: ; 0x102b0 db "QUIT@" ; 0x102c7 -Jumptable_UseRegisterQuit: ; 102c7 +Jumptable_UseRegisterQuit: dw UseItem dw RegisterItem dw QuitItemSubmenu -; 102cd MenuHeader_HoldableKeyItem: ; 0x102cd db MENU_BACKUP_TILES ; flags @@ -424,12 +414,11 @@ MenuHeader_HoldableKeyItem: ; 0x102cd db "QUIT@" ; 0x102ea -Jumptable_GiveTossRegisterQuit: ; 102ea +Jumptable_GiveTossRegisterQuit: dw GiveItem dw TossMenu dw RegisterItem dw QuitItemSubmenu -; 102f2 MenuHeader_HoldableItem: ; 0x102f2 db MENU_BACKUP_TILES ; flags @@ -446,22 +435,20 @@ MenuHeader_HoldableItem: ; 0x102f2 db "QUIT@" ; 0x1030b -Jumptable_GiveTossQuit: ; 1030b +Jumptable_GiveTossQuit: dw GiveItem dw TossMenu dw QuitItemSubmenu -; 10311 -UseItem: ; 10311 +UseItem: farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] ld hl, .dw rst JumpTable ret -; 1031f -.dw ; 1031f (4:431f) +.dw ; entries correspond to ITEMMENU_* constants dw .Oak ; ITEMMENU_NOUSE dw .Oak @@ -470,18 +457,17 @@ UseItem: ; 10311 dw .Current ; ITEMMENU_CURRENT dw .Party ; ITEMMENU_PARTY dw .Field ; ITEMMENU_CLOSE -; 1035c -.Oak: ; 1032d (4:432d) +.Oak: ld hl, Text_ThisIsntTheTime call Pack_PrintTextNoScroll ret -.Current: ; 10334 (4:4334) +.Current: call DoItemEffect ret -.Party: ; 10338 (4:4338) +.Party: ld a, [wPartyCount] and a jr z, .NoPokemon @@ -498,7 +484,7 @@ UseItem: ; 10311 call Pack_PrintTextNoScroll ret -.Field: ; 10355 (4:4355) +.Field: call DoItemEffect ld a, [wItemEffectSucceeded] and a @@ -506,9 +492,8 @@ UseItem: ; 10311 ld a, PACKSTATE_QUITRUNSCRIPT ld [wJumptableIndex], a ret -; 10364 (4:4364) -TossMenu: ; 10364 +TossMenu: ld hl, Text_ThrowAwayHowMany call Pack_PrintTextNoScroll farcall SelectQuantityToToss @@ -532,9 +517,8 @@ TossMenu: ; 10364 call Pack_PrintTextNoScroll .finish ret -; 1039d -Unreferenced_ResetPocketCursorPositions: ; 1039d +Unreferenced_ResetPocketCursorPositions: ld a, [wCurrPocket] and a ; ITEM_POCKET jr z, .items @@ -561,9 +545,8 @@ Unreferenced_ResetPocketCursorPositions: ; 1039d ld [wKeyItemsPocketCursor], a ld [wKeyItemsPocketScrollPosition], a ret -; 103c2 -RegisterItem: ; 103c2 +RegisterItem: farcall CheckSelectableItem ld a, [wItemAttributeParamBuffer] and a @@ -591,9 +574,8 @@ RegisterItem: ; 103c2 ld hl, Text_CantRegister call Pack_PrintTextNoScroll ret -; 103fd -GiveItem: ; 103fd +GiveItem: ld a, [wPartyCount] and a jp z, .NoPokemon @@ -647,22 +629,20 @@ GiveItem: ; 103fd call Pack_InitColors ret -.NoPokemon: ; 10486 (4:4486) +.NoPokemon: ld hl, TextJump_YouDontHaveAMon call Pack_PrintTextNoScroll ret -; 1048d (4:448d) .Egg: ; 0x1048d ; An EGG can't hold an item. text_jump Text_AnEGGCantHoldAnItem db "@" ; 0x10492 -QuitItemSubmenu: ; 10492 +QuitItemSubmenu: ret -; 10493 -BattlePack: ; 10493 +BattlePack: ld hl, wOptions set NO_TEXT_SCROLL, [hl] call InitPackBuffers @@ -681,17 +661,15 @@ BattlePack: ; 10493 ld hl, wOptions res NO_TEXT_SCROLL, [hl] ret -; 104b9 -.RunJumptable: ; 104b9 +.RunJumptable: ld a, [wJumptableIndex] ld hl, .Jumptable call Pack_GetJumptablePointer jp hl -; 104c3 -.Jumptable: ; 104c3 (4:44c3) +.Jumptable: ; entries correspond to PACKSTATE_* constants dw .InitGFX ; 0 dw .InitItemsPocket ; 1 @@ -705,7 +683,7 @@ BattlePack: ; 10493 dw Pack_QuitNoScript ; 9 dw Pack_QuitRunScript ; 10 -.InitGFX: ; 104d9 (4:44d9) +.InitGFX: xor a ld [hBGMapMode], a call Pack_InitGFX @@ -714,7 +692,7 @@ BattlePack: ; 10493 call Pack_InitColors ret -.InitItemsPocket: ; 104e9 (4:44e9) +.InitItemsPocket: xor a ; ITEM_POCKET ld [wCurrPocket], a call ClearPocketList @@ -723,7 +701,7 @@ BattlePack: ; 10493 call Pack_JumptableNext ret -.ItemsPocketMenu: ; 104fa (4:44fa) +.ItemsPocketMenu: ld hl, ItemsPocketMenuHeader call CopyMenuHeader ld a, [wItemsPocketCursor] @@ -742,7 +720,7 @@ BattlePack: ; 10493 call ItemSubmenu ret -.InitKeyItemsPocket: ; 10527 (4:4527) +.InitKeyItemsPocket: ld a, KEY_ITEM_POCKET ld [wCurrPocket], a call ClearPocketList @@ -751,7 +729,7 @@ BattlePack: ; 10493 call Pack_JumptableNext ret -.KeyItemsPocketMenu: ; 10539 (4:4539) +.KeyItemsPocketMenu: ld hl, KeyItemsPocketMenuHeader call CopyMenuHeader ld a, [wKeyItemsPocketCursor] @@ -770,7 +748,7 @@ BattlePack: ; 10493 call ItemSubmenu ret -.InitTMHMPocket: ; 10566 (4:4566) +.InitTMHMPocket: ld a, TM_HM_POCKET ld [wCurrPocket], a call ClearPocketList @@ -783,7 +761,7 @@ BattlePack: ; 10493 call Pack_JumptableNext ret -.TMHMPocketMenu: ; 10581 (4:4581) +.TMHMPocketMenu: farcall TMHMPocket ld b, PACKSTATE_INITKEYITEMSPOCKET ; left ld c, PACKSTATE_INITITEMSPOCKET ; right @@ -793,7 +771,7 @@ BattlePack: ; 10493 call TMHMSubmenu ret -.InitBallsPocket: ; 10594 (4:4594) +.InitBallsPocket: ld a, BALL_POCKET ld [wCurrPocket], a call ClearPocketList @@ -802,7 +780,7 @@ BattlePack: ; 10493 call Pack_JumptableNext ret -.BallsPocketMenu: ; 105a6 (4:45a6) +.BallsPocketMenu: ld hl, BallsPocketMenuHeader call CopyMenuHeader ld a, [wBallsPocketCursor] @@ -821,10 +799,10 @@ BattlePack: ; 10493 call ItemSubmenu ret -ItemSubmenu: ; 105d3 (4:45d3) +ItemSubmenu: farcall CheckItemContext ld a, [wItemAttributeParamBuffer] -TMHMSubmenu: ; 105dc (4:45dc) +TMHMSubmenu: and a jr z, .NoUse ld hl, .UsableMenuHeader @@ -846,7 +824,6 @@ TMHMSubmenu: ; 105dc (4:45dc) call Pack_GetJumptablePointer jp hl -; 10601 (4:4601) .UsableMenuHeader: ; 0x10601 db MENU_BACKUP_TILES ; flags menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 @@ -861,10 +838,9 @@ TMHMSubmenu: ; 105dc (4:45dc) db "QUIT@" ; 0x10614 -.UsableJumptable: ; 10614 +.UsableJumptable: dw .Use dw .Quit -; 10618 .UnusableMenuHeader: ; 0x10618 db MENU_BACKUP_TILES ; flags @@ -879,18 +855,17 @@ TMHMSubmenu: ; 105dc (4:45dc) db "QUIT@" ; 0x10627 -.UnusableJumptable: ; 10627 +.UnusableJumptable: dw .Quit -; 10629 -.Use: ; 10629 +.Use: farcall CheckItemContext ld a, [wItemAttributeParamBuffer] ld hl, .ItemFunctionJumptable rst JumpTable ret -.ItemFunctionJumptable: ; 10637 (4:4637) +.ItemFunctionJumptable: ; entries correspond to ITEMMENU_* constants dw .Oak ; ITEMMENU_NOUSE dw .Oak @@ -900,19 +875,19 @@ TMHMSubmenu: ; 105dc (4:45dc) dw .BattleField ; ITEMMENU_PARTY dw .BattleOnly ; ITEMMENU_CLOSE -.Oak: ; 10645 (4:4645) +.Oak: ld hl, Text_ThisIsntTheTime call Pack_PrintTextNoScroll ret -.Unused: ; 1064c (4:464c) +.Unused: call DoItemEffect ld a, [wItemEffectSucceeded] and a jr nz, .ReturnToBattle ret -.BattleField: ; 10656 (4:4656) +.BattleField: call DoItemEffect ld a, [wItemEffectSucceeded] and a @@ -924,32 +899,30 @@ TMHMSubmenu: ; 105dc (4:45dc) call Pack_InitColors ret -.ReturnToBattle: ; 1066c (4:466c) +.ReturnToBattle: call ClearBGPalettes jr .quit_run_script -.BattleOnly: ; 10671 (4:4671) +.BattleOnly: call DoItemEffect ld a, [wItemEffectSucceeded] and a jr z, .Oak cp $2 jr z, .didnt_use_item -.quit_run_script ; 1067e (4:467e) +.quit_run_script ld a, PACKSTATE_QUITRUNSCRIPT ld [wJumptableIndex], a ret -.didnt_use_item ; 10684 (4:4684) +.didnt_use_item xor a ld [wItemEffectSucceeded], a ret -; 10689 (4:4689) -.Quit: ; 10689 +.Quit: ret -; 1068a -InitPackBuffers: ; 1068a +InitPackBuffers: xor a ld [wJumptableIndex], a ; pocket id -> jumptable index @@ -965,9 +938,8 @@ InitPackBuffers: ; 1068a xor a ld [wSwitchItem], a ret -; 106a5 -DepositSellInitPackBuffers: ; 106a5 +DepositSellInitPackBuffers: xor a ld [hBGMapMode], a ld [wJumptableIndex], a ; PACKSTATE_INITGFX @@ -978,32 +950,29 @@ DepositSellInitPackBuffers: ; 106a5 call Pack_InitGFX call Pack_InitColors ret -; 106be -DepositSellPack: ; 106be +DepositSellPack: .loop call .RunJumptable call DepositSellTutorial_InterpretJoypad jr c, .loop ret -; 106c7 -.RunJumptable: ; 106c7 +.RunJumptable: ld a, [wJumptableIndex] ld hl, .Jumptable call Pack_GetJumptablePointer jp hl -; 106d1 -.Jumptable: ; 106d1 (4:46d1) +.Jumptable: ; entries correspond to *_POCKET constants dw .ItemsPocket dw .BallsPocket dw .KeyItemsPocket dw .TMHMPocket -.ItemsPocket: ; 106d9 (4:46d9) +.ItemsPocket: xor a ; ITEM_POCKET call InitPocket ld hl, PC_Mart_ItemsPocketMenuHeader @@ -1019,7 +988,7 @@ DepositSellPack: ; 106be ld [wItemsPocketCursor], a ret -.KeyItemsPocket: ; 106ff (4:46ff) +.KeyItemsPocket: ld a, KEY_ITEM_POCKET call InitPocket ld hl, PC_Mart_KeyItemsPocketMenuHeader @@ -1035,7 +1004,7 @@ DepositSellPack: ; 106be ld [wKeyItemsPocketCursor], a ret -.TMHMPocket: ; 10726 (4:4726) +.TMHMPocket: ld a, TM_HM_POCKET call InitPocket call WaitBGMap_DrawPackGFX @@ -1044,7 +1013,7 @@ DepositSellPack: ; 106be ld [wCurItem], a ret -.BallsPocket: ; 1073b (4:473b) +.BallsPocket: ld a, BALL_POCKET call InitPocket ld hl, PC_Mart_BallsPocketMenuHeader @@ -1060,14 +1029,14 @@ DepositSellPack: ; 106be ld [wBallsPocketCursor], a ret -InitPocket: ; 10762 (4:4762) +InitPocket: ld [wCurrPocket], a call ClearPocketList call DrawPocketName call WaitBGMap_DrawPackGFX ret -DepositSellTutorial_InterpretJoypad: ; 1076f +DepositSellTutorial_InterpretJoypad: ld hl, wMenuJoypad ld a, [hl] and A_BUTTON @@ -1119,9 +1088,8 @@ DepositSellTutorial_InterpretJoypad: ; 1076f pop de scf ret -; 107bb -TutorialPack: ; 107bb +TutorialPack: call DepositSellInitPackBuffers ld a, [wInputType] or a @@ -1134,29 +1102,26 @@ TutorialPack: ; 107bb xor a ; FALSE ld [wPackUsedItem], a ret -; 107d7 -.RunJumptable: ; 107d7 +.RunJumptable: ld a, [wJumptableIndex] ld hl, .dw call Pack_GetJumptablePointer jp hl -; 107e1 -.dw ; 107e1 (4:47e1) +.dw ; entries correspond to *_POCKET constants dw .Items dw .Balls dw .KeyItems dw .TMHM -.Items: ; 107e9 (4:47e9) +.Items: xor a ; ITEM_POCKET ld hl, .ItemsMenuHeader jr .DisplayPocket -; 107ef (4:47ef) .ItemsMenuHeader: ; 0x107ef db MENU_BACKUP_TILES ; flags menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 @@ -1172,14 +1137,12 @@ TutorialPack: ; 107bb dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 10807 -.KeyItems: ; 10807 (4:4807) +.KeyItems: ld a, KEY_ITEM_POCKET ld hl, .KeyItemsMenuHeader jr .DisplayPocket -; 1080e (4:480e) .KeyItemsMenuHeader: ; 0x1080e db MENU_BACKUP_TILES ; flags menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 @@ -1195,9 +1158,8 @@ TutorialPack: ; 107bb dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 10826 -.TMHM: ; 10826 (4:4826) +.TMHM: ld a, TM_HM_POCKET call InitPocket call WaitBGMap_DrawPackGFX @@ -1206,12 +1168,11 @@ TutorialPack: ; 107bb ld [wCurItem], a ret -.Balls: ; 1083b (4:483b) +.Balls: ld a, BALL_POCKET ld hl, .BallsMenuHeader jr .DisplayPocket -; 10842 (4:4842) .BallsMenuHeader: ; 0x10842 db MENU_BACKUP_TILES ; flags menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 @@ -1227,9 +1188,8 @@ TutorialPack: ; 107bb dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 1085a -.DisplayPocket: ; 1085a (4:485a) +.DisplayPocket: push hl call InitPocket pop hl @@ -1237,12 +1197,12 @@ TutorialPack: ; 107bb call ScrollingMenu ret -Pack_JumptableNext: ; 10866 (4:4866) +Pack_JumptableNext: ld hl, wJumptableIndex inc [hl] ret -Pack_GetJumptablePointer: ; 1086b +Pack_GetJumptablePointer: ld e, a ld d, 0 add hl, de @@ -1251,23 +1211,22 @@ Pack_GetJumptablePointer: ; 1086b ld h, [hl] ld l, a ret -; 10874 -Pack_QuitNoScript: ; 10874 (4:4874) +Pack_QuitNoScript: ld hl, wJumptableIndex set 7, [hl] xor a ; FALSE ld [wPackUsedItem], a ret -Pack_QuitRunScript: ; 1087e (4:487e) +Pack_QuitRunScript: ld hl, wJumptableIndex set 7, [hl] ld a, TRUE ld [wPackUsedItem], a ret -Pack_PrintTextNoScroll: ; 10889 (4:4889) +Pack_PrintTextNoScroll: ld a, [wOptions] push af set NO_TEXT_SCROLL, a @@ -1277,9 +1236,9 @@ Pack_PrintTextNoScroll: ; 10889 (4:4889) ld [wOptions], a ret -WaitBGMap_DrawPackGFX: ; 1089a (4:489a) +WaitBGMap_DrawPackGFX: call WaitBGMap -DrawPackGFX: ; 1089d +DrawPackGFX: ld a, [wCurrPocket] maskbits NUM_POCKETS ld e, a @@ -1305,16 +1264,14 @@ DrawPackGFX: ; 1089d .female farcall DrawKrisPackGFX ret -; 108cc -PackGFXPointers: ; 108cc +PackGFXPointers: dw PackGFX + (15 tiles) * 1 ; ITEM_POCKET dw PackGFX + (15 tiles) * 3 ; BALL_POCKET dw PackGFX + (15 tiles) * 0 ; KEY_ITEM_POCKET dw PackGFX + (15 tiles) * 2 ; TM_HM_POCKET -; 108d4 -Pack_InterpretJoypad: ; 108d4 (4:48d4) +Pack_InterpretJoypad: ld hl, wMenuJoypad ld a, [wSwitchItem] and a @@ -1398,7 +1355,7 @@ Pack_InterpretJoypad: ; 108d4 (4:48d4) scf ret -Pack_InitGFX: ; 10955 +Pack_InitGFX: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -1435,9 +1392,8 @@ Pack_InitGFX: ; 10955 call EnableLCD call DrawPackGFX ret -; 109a5 -PlacePackGFX: ; 109a5 +PlacePackGFX: hlcoord 0, 3 ld a, $50 ld de, SCREEN_WIDTH - 5 @@ -1453,9 +1409,8 @@ PlacePackGFX: ; 109a5 dec b jr nz, .row ret -; 109bb -DrawPocketName: ; 109bb +DrawPocketName: ld a, [wCurrPocket] ; * 15 ld d, a @@ -1484,9 +1439,8 @@ DrawPocketName: ; 109bb dec c jr nz, .row ret -; 109e1 -.tilemap ; 109e1 +.tilemap ; ITEM_POCKET db $00, $04, $04, $04, $01 ; top border db $06, $07, $08, $09, $0a ; Items @@ -1503,38 +1457,34 @@ DrawPocketName: ; 109bb db $00, $04, $04, $04, $01 ; top border db $10, $11, $12, $13, $14 ; TM/HM db $02, $05, $05, $05, $03 ; bottom border -; 10a1d -Pack_GetItemName: ; 10a1d +Pack_GetItemName: ld a, [wCurItem] ld [wNamedObjectIndexBuffer], a call GetItemName call CopyName1 ret -; 10a2a -Unreferenced_Pack_ClearTilemap: ; 10a2a +Unreferenced_Pack_ClearTilemap: hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " call ByteFill ret -; 10a36 -ClearPocketList: ; 10a36 (4:4a36) +ClearPocketList: hlcoord 5, 2 lb bc, 10, SCREEN_WIDTH - 5 call ClearBox ret -Pack_InitColors: ; 10a40 +Pack_InitColors: call WaitBGMap ld b, SCGB_PACKPALS call GetSGBLayout call SetPalettes call DelayFrame ret -; 10a4f ItemsPocketMenuHeader: ; 0x10a4f db MENU_BACKUP_TILES ; flags @@ -1551,7 +1501,6 @@ ItemsPocketMenuHeader: ; 0x10a4f dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 10a67 PC_Mart_ItemsPocketMenuHeader: ; 0x10a67 db MENU_BACKUP_TILES ; flags @@ -1568,7 +1517,6 @@ PC_Mart_ItemsPocketMenuHeader: ; 0x10a67 dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 10a7f KeyItemsPocketMenuHeader: ; 0x10a7f db MENU_BACKUP_TILES ; flags @@ -1585,7 +1533,6 @@ KeyItemsPocketMenuHeader: ; 0x10a7f dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 10a97 PC_Mart_KeyItemsPocketMenuHeader: ; 0x10a97 db MENU_BACKUP_TILES ; flags @@ -1602,7 +1549,6 @@ PC_Mart_KeyItemsPocketMenuHeader: ; 0x10a97 dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 10aaf BallsPocketMenuHeader: ; 0x10aaf db MENU_BACKUP_TILES ; flags @@ -1619,7 +1565,6 @@ BallsPocketMenuHeader: ; 0x10aaf dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 10ac7 PC_Mart_BallsPocketMenuHeader: ; 0x10ac7 db MENU_BACKUP_TILES ; flags @@ -1636,7 +1581,6 @@ PC_Mart_BallsPocketMenuHeader: ; 0x10ac7 dba PlaceMenuItemName dba PlaceMenuItemQuantity dba UpdateItemDescription -; 10adf Text_PackNoItems: ; 0x10adf ; No items. diff --git a/engine/items/pack_kris.asm b/engine/items/pack_kris.asm index 54a21e4470a..1a169ea6ecd 100644 --- a/engine/items/pack_kris.asm +++ b/engine/items/pack_kris.asm @@ -1,4 +1,4 @@ -DrawKrisPackGFX: ; 48e81 +DrawKrisPackGFX: ld hl, PackFGFXPointers add hl, de add hl, de @@ -10,11 +10,11 @@ DrawKrisPackGFX: ; 48e81 call Request2bpp ret -PackFGFXPointers: ; 48e93 +PackFGFXPointers: dw PackFGFX + (15 tiles) * 1 ; ITEM_POCKET dw PackFGFX + (15 tiles) * 3 ; BALL_POCKET dw PackFGFX + (15 tiles) * 0 ; KEY_ITEM_POCKET dw PackFGFX + (15 tiles) * 2 ; TM_HM_POCKET -PackFGFX: ; 48e9b +PackFGFX: INCBIN "gfx/pack/pack_f.2bpp" diff --git a/engine/items/switch_items.asm b/engine/items/switch_items.asm index 77b63524633..b5fa0f17855 100644 --- a/engine/items/switch_items.asm +++ b/engine/items/switch_items.asm @@ -1,4 +1,4 @@ -SwitchItemsInBag: ; 2490c (9:490c) +SwitchItemsInBag: ld a, [wSwitchItem] and a jr z, .init @@ -84,7 +84,7 @@ SwitchItemsInBag: ; 2490c (9:490c) ld [wSwitchItem], a ret -Function249a7: ; 249a7 (9:49a7) +Function249a7: ld a, [wSwitchItem] call ItemSwitch_GetNthItem ld d, h @@ -110,7 +110,7 @@ Function249a7: ; 249a7 (9:49a7) scf ret -Function249d1: ; 249d1 (9:49d1) +Function249d1: ld a, [wSwitchItem] call ItemSwitch_GetNthItem inc hl @@ -180,14 +180,14 @@ Function249d1: ; 249d1 (9:49d1) ld [wSwitchItem], a ret -Function24a40: ; 24a40 (9:4a40) +Function24a40: call ItemSwitch_GetNthItem ld de, wd002 call ItemSwitch_ConvertSpacingToDW call CopyBytes ret -Function24a4d: ; 24a4d (9:4a4d) +Function24a4d: call ItemSwitch_GetNthItem ld d, h ld e, l @@ -196,7 +196,7 @@ Function24a4d: ; 24a4d (9:4a4d) call CopyBytes ret -ItemSwitch_GetNthItem: ; 24a5c (9:4a5c) +ItemSwitch_GetNthItem: push af call ItemSwitch_ConvertSpacingToDW ld hl, wMenuData_ItemsPointerAddr @@ -208,7 +208,7 @@ ItemSwitch_GetNthItem: ; 24a5c (9:4a5c) call AddNTimes ret -Function24a6c: ; 24a6c (9:4a6c) +Function24a6c: push hl call ItemSwitch_ConvertSpacingToDW ld a, d @@ -224,7 +224,7 @@ Function24a6c: ; 24a6c (9:4a6c) pop hl ret -ItemSwitch_ConvertSpacingToDW: ; 24a80 (9:4a80) +ItemSwitch_ConvertSpacingToDW: ; This function is absolutely idiotic. push hl ld a, [wMenuData_ScrollingMenuSpacing] @@ -239,13 +239,11 @@ ItemSwitch_ConvertSpacingToDW: ; 24a80 (9:4a80) pop hl ret -; 24a91 (9:4a91) -.spacing_dws ; 24a91 +.spacing_dws dw 0, 1, 2 -; 24a97 -Function24a97: ; 24a97 (9:4a97) +Function24a97: push af call ItemSwitch_ConvertSpacingToDW ld a, c @@ -262,7 +260,7 @@ Function24a97: ; 24a97 (9:4a97) ld a, $1 ret -Function24aab: ; 24aab (9:4aab) +Function24aab: .loop ld a, [hld] ld [de], a diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm index 442f73cfa22..57586e2f002 100644 --- a/engine/items/tmhm.asm +++ b/engine/items/tmhm.asm @@ -1,4 +1,4 @@ -TMHMPocket: ; 2c76f (b:476f) +TMHMPocket: ld a, $1 ld [hInMenu], a call TMHM_PocketLoop @@ -20,7 +20,7 @@ TMHMPocket: ; 2c76f (b:476f) scf ret -.ConvertItemToTMHMNumber: ; 2c798 (b:4798) +.ConvertItemToTMHMNumber: ld a, [wCurItem] ld c, a callfar GetNumberedTMHM @@ -28,7 +28,7 @@ TMHMPocket: ; 2c76f (b:476f) ld [wCurItem], a ret -ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7) +ConvertCurItemIntoCurTMHM: ld a, [wCurItem] ld c, a callfar GetTMHMNumber @@ -36,12 +36,12 @@ ConvertCurItemIntoCurTMHM: ; 2c7a7 (b:47a7) ld [wCurTMHM], a ret -GetTMHMItemMove: ; 2c7b6 (b:47b6) +GetTMHMItemMove: call ConvertCurItemIntoCurTMHM predef GetTMHMMove ret -AskTeachTMHM: ; 2c7bf (b:47bf) +AskTeachTMHM: ld hl, wOptions ld a, [hl] push af @@ -70,13 +70,13 @@ AskTeachTMHM: ; 2c7bf (b:47bf) ld [wOptions], a ret -ChooseMonToLearnTMHM: ; 2c7fb +ChooseMonToLearnTMHM: ld hl, wStringBuffer2 ld de, wTMHMMoveNameBackup ld bc, 12 call CopyBytes call ClearBGPalettes -ChooseMonToLearnTMHM_NoRefresh: ; 2c80a +ChooseMonToLearnTMHM_NoRefresh: farcall LoadPartyMenuGFX farcall InitPartyMenuWithCancel farcall InitPartyMenuGFX @@ -115,9 +115,8 @@ ChooseMonToLearnTMHM_NoRefresh: ; 2c80a pop de pop hl jr .loopback -; 2c867 -TeachTMHM: ; 2c867 +TeachTMHM: predef CanLearnTMHMMove push bc @@ -166,7 +165,6 @@ TeachTMHM: ; 2c867 .learned_move scf ret -; 2c8bf (b:48bf) Text_BootedTM: ; 0x2c8bf ; Booted up a TM. @@ -192,7 +190,7 @@ Text_TMHMNotCompatible: ; 0x2c8ce db "@" ; 0x2c8d3 -TMHM_PocketLoop: ; 2c8d3 (b:48d3) +TMHM_PocketLoop: xor a ld [hBGMapMode], a call TMHM_DisplayPocketItems @@ -225,7 +223,7 @@ TMHM_PocketLoop: ; 2c8d3 (b:48d3) ld [wMenuCursorX], a jr TMHM_ShowTMMoveDescription -TMHM_JoypadLoop: ; 2c915 (b:4915) +TMHM_JoypadLoop: call TMHM_DisplayPocketItems call StaticMenuJoypad ld b, a @@ -247,7 +245,7 @@ TMHM_JoypadLoop: ; 2c915 (b:4915) jp nz, TMHM_ExitPocket bit D_LEFT_F, a jp nz, TMHM_ExitPocket -TMHM_ShowTMMoveDescription: ; 2c946 (b:4946) +TMHM_ShowTMMoveDescription: call TMHM_CheckHoveringOverCancel jp nc, TMHM_ExitPocket hlcoord 0, 12 @@ -265,7 +263,7 @@ TMHM_ShowTMMoveDescription: ; 2c946 (b:4946) call PrintMoveDesc jp TMHM_JoypadLoop -TMHM_ChooseTMorHM: ; 2c974 (b:4974) +TMHM_ChooseTMorHM: call TMHM_PlaySFX_ReadText2 call CountTMsHMs ; This stores the count to wd265. ld a, [wMenuCursorY] @@ -277,7 +275,7 @@ TMHM_ChooseTMorHM: ; 2c974 (b:4974) ld a, [wd265] cp b jr z, _TMHM_ExitPack ; our cursor was hovering over CANCEL -TMHM_CheckHoveringOverCancel: ; 2c98a (b:498a) +TMHM_CheckHoveringOverCancel: call TMHM_GetCurrentPocketPosition ld a, [wMenuCursorY] ld b, a @@ -297,19 +295,19 @@ TMHM_CheckHoveringOverCancel: ; 2c98a (b:498a) cp -1 ret -TMHM_ExitPack: ; 2c9a5 (b:49a5) +TMHM_ExitPack: call TMHM_PlaySFX_ReadText2 -_TMHM_ExitPack: ; 2c9a8 (b:49a8) +_TMHM_ExitPack: ld a, $2 ld [wMenuJoypad], a and a ret -TMHM_ExitPocket: ; 2c9af (b:49af) +TMHM_ExitPocket: and a ret -TMHM_ScrollPocket: ; 2c9b1 (b:49b1) +TMHM_ScrollPocket: ld a, b bit 7, a jr nz, .skip @@ -339,7 +337,7 @@ TMHM_ScrollPocket: ; 2c9b1 (b:49b1) call TMHM_DisplayPocketItems jp TMHM_ShowTMMoveDescription -TMHM_DisplayPocketItems: ; 2c9e2 (b:49e2) +TMHM_DisplayPocketItems: ld a, [wBattleType] cp BATTLETYPE_TUTORIAL jp z, Tutorial_TMHMPocket @@ -433,7 +431,7 @@ TMHM_DisplayPocketItems: ; 2c9e2 (b:49e2) .done ret -TMHMPocket_GetCurrentLineCoord: ; 2ca86 (b:4a86) +TMHMPocket_GetCurrentLineCoord: hlcoord 5, 0 ld bc, 2 * SCREEN_WIDTH ld a, 6 @@ -445,9 +443,8 @@ TMHMPocket_GetCurrentLineCoord: ; 2ca86 (b:4a86) dec e jr nz, .loop ret -; 2ca95 (b:4a95) -Unreferenced_Function2ca95: ; 2ca95 +Unreferenced_Function2ca95: pop hl ld bc, 3 add hl, bc @@ -459,13 +456,11 @@ Unreferenced_Function2ca95: ; 2ca95 call PlaceString pop hl ret -; 2caae -TMHM_String_Cancel: ; 2caae +TMHM_String_Cancel: db "CANCEL@" -; 2cab5 -TMHM_GetCurrentPocketPosition: ; 2cab5 (b:4ab5) +TMHM_GetCurrentPocketPosition: ld hl, wTMsHMs ld a, [wTMHMPocketScrollPosition] ld b, a @@ -482,7 +477,7 @@ TMHM_GetCurrentPocketPosition: ; 2cab5 (b:4ab5) dec c ret -Tutorial_TMHMPocket: ; 2caca (b:4aca) +Tutorial_TMHMPocket: hlcoord 9, 3 push de ld de, TMHM_String_Cancel @@ -490,15 +485,14 @@ Tutorial_TMHMPocket: ; 2caca (b:4aca) pop de ret -TMHM_PlaySFX_ReadText2: ; 2cad6 (b:4ad6) +TMHM_PlaySFX_ReadText2: push de ld de, SFX_READ_TEXT_2 call PlaySFX pop de ret -; 2cadf (b:4adf) -Unreferenced_Function2cadf: ; 2cadf +Unreferenced_Function2cadf: call ConvertCurItemIntoCurTMHM call .CheckHaveRoomForTMHM ld hl, .NoRoomText @@ -506,7 +500,6 @@ Unreferenced_Function2cadf: ; 2cadf ld hl, .ReceivedText .print jp PrintText -; 2caf0 .NoRoomText: ; 0x2caf0 ; You have no room for any more @ S. @@ -520,7 +513,7 @@ Unreferenced_Function2cadf: ; 2cadf db "@" ; 0x2cafa -.CheckHaveRoomForTMHM: ; 2cafa +.CheckHaveRoomForTMHM: ld a, [wd265] dec a ld hl, wTMsHMs @@ -533,9 +526,8 @@ Unreferenced_Function2cadf: ; 2cadf ret nc ld [hl], a ret -; 2cb0c -ConsumeTM: ; 2cb0c (b:4b0c) +ConsumeTM: call ConvertCurItemIntoCurTMHM ld a, [wd265] dec a @@ -556,7 +548,7 @@ ConsumeTM: ; 2cb0c (b:4b0c) ld [wTMHMPocketScrollPosition], a ret -CountTMsHMs: ; 2cb2a (b:4b2a) +CountTMsHMs: ld b, 0 ld c, NUM_TMS + NUM_HMS ld hl, wTMsHMs @@ -572,7 +564,7 @@ CountTMsHMs: ; 2cb2a (b:4b2a) ld [wd265], a ret -PrintMoveDesc: ; 2cb3e +PrintMoveDesc: push hl ld hl, MoveDescriptions ld a, [wCurSpecies] @@ -586,4 +578,3 @@ PrintMoveDesc: ; 2cb3e ld d, [hl] pop hl jp PlaceString -; 2cb52 diff --git a/engine/items/tmhm2.asm b/engine/items/tmhm2.asm index 9db3dc29115..bb98d8ab85a 100644 --- a/engine/items/tmhm2.asm +++ b/engine/items/tmhm2.asm @@ -1,4 +1,4 @@ -CanLearnTMHMMove: ; 11639 +CanLearnTMHMMove: ld a, [wCurPartySpecies] ld [wCurSpecies], a call GetBaseData @@ -31,9 +31,8 @@ CanLearnTMHMMove: ; 11639 pop hl ld c, 0 ret -; 1166a -GetTMHMMove: ; 1166a +GetTMHMMove: ld a, [wd265] dec a ld hl, TMHMMoves @@ -43,7 +42,6 @@ GetTMHMMove: ; 1166a ld a, [hl] ld [wd265], a ret -; 1167a INCLUDE "data/moves/tmhm_moves.asm" diff --git a/engine/link/init_list.asm b/engine/link/init_list.asm index 26c77b5bbea..8557b2e9f86 100644 --- a/engine/link/init_list.asm +++ b/engine/link/init_list.asm @@ -1,4 +1,4 @@ -InitList: ; 50db9 +InitList: ld a, [wInitListType] cp INIT_ENEMYOT_LIST diff --git a/engine/link/link.asm b/engine/link/link.asm index e0b7f797235..f85dcba9c8b 100644 --- a/engine/link/link.asm +++ b/engine/link/link.asm @@ -1,4 +1,4 @@ -LinkCommunications: ; 28000 +LinkCommunications: call ClearBGPalettes ld c, 80 call DelayFrames @@ -35,7 +35,7 @@ LinkCommunications: ; 28000 cp LINK_TIMECAPSULE jp nz, Gen2ToGen2LinkComms -Gen2ToGen1LinkComms: ; 2805d +Gen2ToGen1LinkComms: call ClearLinkData call Link_PrepPartyData_Gen1 call FixDataForLinkTransfer @@ -177,9 +177,8 @@ Gen2ToGen1LinkComms: ; 2805d ld de, MUSIC_ROUTE_30 call PlayMusic jp InitTradeMenuDisplay -; 28177 -Gen2ToGen2LinkComms: ; 28177 +Gen2ToGen2LinkComms: call ClearLinkData call Link_PrepPartyData_Gen2 call FixDataForLinkTransfer @@ -474,9 +473,8 @@ Gen2ToGen2LinkComms: ; 28177 ld de, MUSIC_ROUTE_30 call PlayMusic jp InitTradeMenuDisplay -; 283b2 -LinkTimeout: ; 283b2 +LinkTimeout: ld de, .TooMuchTimeHasElapsed ld b, 10 .loop @@ -506,7 +504,6 @@ LinkTimeout: ; 283b2 call GetSGBLayout call WaitBGMap2 ret -; 283ed .TooMuchTimeHasElapsed: ; 0x283ed ; Too much time has elapsed. Please try again. @@ -514,7 +511,7 @@ LinkTimeout: ; 283b2 db "@" ; 0x283f2 -ExchangeBytes: ; 283f2 +ExchangeBytes: ld a, TRUE ld [hSerialIgnoringInitialData], a .loop @@ -546,13 +543,11 @@ ExchangeBytes: ; 283f2 or c jr nz, .loop ret -; 28419 -String_PleaseWait: ; 28419 +String_PleaseWait: db "PLEASE WAIT!@" -; 28426 -ClearLinkData: ; 28426 +ClearLinkData: ld hl, wLinkData ld bc, wLinkDataEnd - wLinkData .loop @@ -563,9 +558,8 @@ ClearLinkData: ; 28426 or c jr nz, .loop ret -; 28434 -FixDataForLinkTransfer: ; 28434 +FixDataForLinkTransfer: ld hl, wd1f3 ld a, SERIAL_PREAMBLE_BYTE ld b, wLinkBattleRNs - wd1f3 @@ -636,9 +630,8 @@ FixDataForLinkTransfer: ; 28434 ld a, SERIAL_PATCH_LIST_PART_TERMINATOR ld [de], a ret -; 28499 -Link_PrepPartyData_Gen1: ; 28499 +Link_PrepPartyData_Gen1: ld de, wLinkData ld a, SERIAL_PREAMBLE_BYTE ld b, PARTY_LENGTH @@ -693,9 +686,8 @@ Link_PrepPartyData_Gen1: ; 28499 .copy_ot_nicks ld bc, PARTY_LENGTH * NAME_LENGTH jp CopyBytes -; 284f6 -.ConvertPartyStruct2to1: ; 284f6 +.ConvertPartyStruct2to1: ld b, h ld c, l push de @@ -804,9 +796,8 @@ Link_PrepPartyData_Gen1: ; 28499 ld h, b ld l, c ret -; 28595 -Link_PrepPartyData_Gen2: ; 28595 +Link_PrepPartyData_Gen2: ld de, wLinkData ld a, SERIAL_PREAMBLE_BYTE ld b, PARTY_LENGTH @@ -942,9 +933,8 @@ Link_PrepPartyData_Gen2: ; 28595 ld a, SERIAL_PATCH_LIST_PART_TERMINATOR ld [de], a ret -; 28682 -Function28682: ; 28682 +Function28682: ld c, 5 .loop ld [de], a @@ -952,9 +942,8 @@ Function28682: ; 28682 dec c jr nz, .loop ret -; 2868a -Function2868a: ; 2868a +Function2868a: push hl ld d, h ld e, l @@ -980,9 +969,8 @@ Function2868a: ; 2868a ld de, wOTPartyMonNicknames ld bc, PARTY_LENGTH * MON_NAME_LENGTH jp CopyBytes -; 286ba -.ConvertToGen2: ; 286ba +.ConvertToGen2: ld b, h ld c, l ld a, [de] @@ -1102,9 +1090,8 @@ Function2868a: ; 2868a inc de inc de ret -; 28771 -TimeCapsule_ReplaceTeruSama: ; 28771 +TimeCapsule_ReplaceTeruSama: ld a, b and a ret z @@ -1130,7 +1117,7 @@ TimeCapsule_ReplaceTeruSama: ; 28771 INCLUDE "data/items/catch_rate_items.asm" -Link_CopyOTData: ; 2879e +Link_CopyOTData: .loop ld a, [hli] cp SERIAL_NO_DATA_BYTE @@ -1142,9 +1129,8 @@ Link_CopyOTData: ; 2879e or c jr nz, .loop ret -; 287ab -Link_CopyRandomNumbers: ; 287ab +Link_CopyRandomNumbers: ld a, [hSerialConnectionStatus] cp USING_INTERNAL_CLOCK ret z @@ -1163,9 +1149,8 @@ Link_CopyRandomNumbers: ; 287ab dec c jr nz, .loop ret -; 287ca -Link_FindFirstNonControlCharacter_SkipZero: ; 287ca +Link_FindFirstNonControlCharacter_SkipZero: .loop ld a, [hli] and a @@ -1176,9 +1161,8 @@ Link_FindFirstNonControlCharacter_SkipZero: ; 287ca jr z, .loop dec hl ret -; 287d8 -Link_FindFirstNonControlCharacter_AllowZero: ; 287d8 +Link_FindFirstNonControlCharacter_AllowZero: .loop ld a, [hli] cp SERIAL_PREAMBLE_BYTE @@ -1187,9 +1171,8 @@ Link_FindFirstNonControlCharacter_AllowZero: ; 287d8 jr z, .loop dec hl ret -; 287e3 -InitTradeMenuDisplay: ; 287e3 +InitTradeMenuDisplay: call ClearScreen call LoadTradeScreenBorder farcall InitTradeSpeciesList @@ -1204,9 +1187,8 @@ InitTradeMenuDisplay: ; 287e3 inc a ld [wPlayerLinkAction], a jp LinkTrade_PlayerPartyMenu -; 28803 -LinkTrade_OTPartyMenu: ; 28803 +LinkTrade_OTPartyMenu: ld a, OTPARTYMON ld [wMonType], a ld a, A_BUTTON | D_UP | D_DOWN @@ -1228,7 +1210,7 @@ LinkTrade_OTPartyMenu: ; 28803 xor a ld [w2DMenuFlags2], a -LinkTradeOTPartymonMenuLoop: ; 28835 +LinkTradeOTPartymonMenuLoop: farcall LinkTradeMenu ld a, d and a @@ -1268,9 +1250,8 @@ LinkTradeOTPartymonMenuLoop: ; 28835 bit D_DOWN_F, a jp z, LinkTradePartiesMenuMasterLoop jp Function28ac9 -; 2888b -LinkTrade_PlayerPartyMenu: ; 2888b +LinkTrade_PlayerPartyMenu: farcall InitMG_Mobile_LinkTradePalMap xor a ld [wMonType], a @@ -1294,7 +1275,7 @@ LinkTrade_PlayerPartyMenu: ; 2888b ld [w2DMenuFlags2], a call WaitBGMap2 -LinkTradePartymonMenuLoop: ; 288c5 +LinkTradePartymonMenuLoop: farcall LinkTradeMenu ld a, d and a @@ -1343,16 +1324,14 @@ LinkTradePartymonMenuLoop: ; 288c5 pop bc pop hl jp Function28ade -; 2891c -LinkTradePartiesMenuMasterLoop: ; 2891c +LinkTradePartiesMenuMasterLoop: ld a, [wMonType] and a jp z, LinkTradePartymonMenuLoop ; PARTYMON jp LinkTradeOTPartymonMenuLoop ; OTPARTYMON -; 28926 -Function28926: ; 28926 +Function28926: call LoadTileMapToTempTileMap ld a, [wMenuCursorY] push af @@ -1510,7 +1489,6 @@ Function28926: ; 28926 ld c, 100 call DelayFrames jp InitTradeMenuDisplay -; 28aaf .Text_CantTradeLastMon: ; 0x28aaf @@ -1519,7 +1497,7 @@ Function28926: ; 28926 db "@" ; 0x28ab4 -.String_Stats_Trade: ; 28ab4 +.String_Stats_Trade: db "STATS TRADE@" .Text_Abnormal: ; 0x28ac4 @@ -1529,7 +1507,7 @@ Function28926: ; 28926 ; 0x28ac9 -Function28ac9: ; 28ac9 +Function28ac9: ld a, [wMenuCursorY] cp 1 jp nz, LinkTradePartiesMenuMasterLoop @@ -1541,7 +1519,7 @@ Function28ac9: ; 28ac9 ld [hl], " " pop bc pop hl -Function28ade: ; 28ade +Function28ade: .loop1 ld a, "▶" ldcoord_a 9, 17 @@ -1576,7 +1554,7 @@ Function28ade: ; 28ade ld a, [wOtherPlayerLinkMode] cp $f jr nz, .loop1 -Function28b22: ; 28b22 +Function28b22: call RotateThreePalettesRight call ClearScreen ld b, SCGB_DIPLOMA @@ -1592,9 +1570,8 @@ Function28b22: ; 28b22 ld a, (1 << rSC_ON) | 1 ld [rSC], a ret -; 28b42 -Unreferenced_Function28b42: ; 28b42 +Unreferenced_Function28b42: hlcoord 0, 16 ld a, "┘" ld bc, 2 * SCREEN_WIDTH @@ -1606,22 +1583,19 @@ Unreferenced_Function28b42: ; 28b42 hlcoord 2, 16 ld de, .Cancel jp PlaceString -; 28b61 -.Cancel: ; 28b61 +.Cancel: db "CANCEL@" -; 28b68 -Function28b68: ; 28b68 +Function28b68: ld a, [wOtherPlayerLinkMode] hlcoord 6, 9 ld bc, SCREEN_WIDTH call AddNTimes ld [hl], "▷" ret -; 28b77 -LinkEngine_FillBox: ; 28b77 +LinkEngine_FillBox: .row push bc push hl @@ -1636,9 +1610,8 @@ LinkEngine_FillBox: ; 28b77 dec b jr nz, .row ret -; 28b87 -LinkTrade: ; 28b87 +LinkTrade: xor a ld [wcf57], a ld [wOtherPlayerLinkAction], a @@ -1972,15 +1945,13 @@ LinkTrade: ; 28b87 cp LINK_TIMECAPSULE jp z, Gen2ToGen1LinkComms jp Gen2ToGen2LinkComms -; 28ea3 -Function28ea3: ; 28ea3 +Function28ea3: ld c, 100 call DelayFrames jp InitTradeMenuDisplay -; 28eab -String28eab: ; 28eab +String28eab: db "TRADE" next "CANCEL@" @@ -1990,33 +1961,30 @@ UnknownText_0x28eb8: ; 0x28eb8 db "@" ; 0x28ebd -String28ebd: ; 28ebd +String28ebd: db "Trade completed!@" -String_TooBadTheTradeWasCanceled: ; 28ece +String_TooBadTheTradeWasCanceled: db "Too bad! The trade" next "was canceled!@" -LinkTextboxAtHL: ; 28eef +LinkTextboxAtHL: ld d, h ld e, l farcall LinkTextbox ret -; 28ef8 -LoadTradeScreenBorder: ; 28ef8 +LoadTradeScreenBorder: farcall _LoadTradeScreenBorder ret -; 28eff -SetTradeRoomBGPals: ; 28eff +SetTradeRoomBGPals: farcall LoadTradeRoomBGPals_ ; just a nested farcall; so wasteful call SetPalettes ret -; 28f09 -Unreferenced_Function28f09: ; 28f09 +Unreferenced_Function28f09: hlcoord 0, 0 ld b, 6 ld c, 18 @@ -2027,11 +1995,10 @@ Unreferenced_Function28f09: ; 28f09 call LinkTextboxAtHL farcall PlaceTradePartnerNamesAndParty ret -; 28f24 INCLUDE "engine/movie/trade_animation.asm" -CheckTimeCapsuleCompatibility: ; 29bfb +CheckTimeCapsuleCompatibility: ; Checks to see if your party is compatible with the Gen 1 games. ; Returns the following in wScriptVar: ; 0: Party is okay @@ -2111,9 +2078,8 @@ CheckTimeCapsuleCompatibility: ; 29bfb .done ld [wScriptVar], a ret -; 29c67 -Function29c67: ; 29c67 +Function29c67: ld a, [wPartyCount] sub b ld c, a @@ -2125,9 +2091,8 @@ Function29c67: ; 29c67 ld [wd265], a call GetPokemonName ret -; 29c7b -EnterTimeCapsule: ; 29c7b +EnterTimeCapsule: ld c, 10 call DelayFrames ld a, $4 @@ -2139,9 +2104,8 @@ EnterTimeCapsule: ; 29c7b inc a ld [wLinkMode], a ret -; 29c92 -WaitForOtherPlayerToExit: ; 29c92 +WaitForOtherPlayerToExit: ld c, 3 call DelayFrames ld a, CONNECTION_NOT_ESTABLISHED @@ -2187,23 +2151,20 @@ WaitForOtherPlayerToExit: ; 29c92 ld [hVBlank], a ld [wLinkMode], a ret -; 29ce8 -SetBitsForLinkTradeRequest: ; 29ce8 +SetBitsForLinkTradeRequest: ld a, LINK_TRADECENTER - 1 ld [wPlayerLinkAction], a ld [wd265], a ret -; 29cf1 -SetBitsForBattleRequest: ; 29cf1 +SetBitsForBattleRequest: ld a, LINK_COLOSSEUM - 1 ld [wPlayerLinkAction], a ld [wd265], a ret -; 29cfa -SetBitsForTimeCapsuleRequest: ; 29cfa +SetBitsForTimeCapsuleRequest: ld a, $2 ld [rSB], a xor a @@ -2216,9 +2177,8 @@ SetBitsForTimeCapsuleRequest: ; 29cfa ld [wPlayerLinkAction], a ld [wd265], a ret -; 29d11 -WaitForLinkedFriend: ; 29d11 +WaitForLinkedFriend: ld a, [wPlayerLinkAction] and a jr z, .no_link_action @@ -2288,9 +2248,8 @@ WaitForLinkedFriend: ; 29d11 xor a ld [wScriptVar], a ret -; 29d92 -CheckLinkTimeout: ; 29d92 +CheckLinkTimeout: ld a, $1 ld [wPlayerLinkAction], a ld hl, wLinkTimeoutFrames @@ -2310,9 +2269,8 @@ CheckLinkTimeout: ; 29d92 and a ret nz jp Link_ResetSerialRegistersAfterLinkClosure -; 29dba -Function29dba: ; 29dba +Function29dba: ld a, $5 ld [wPlayerLinkAction], a ld hl, wLinkTimeoutFrames @@ -2358,9 +2316,8 @@ Function29dba: ; 29dba xor a ld [hVBlank], a ret -; 29e0c -Link_CheckCommunicationError: ; 29e0c +Link_CheckCommunicationError: xor a ld [hSerialReceivedNewData], a ld a, [wLinkTimeoutFrames] @@ -2389,9 +2346,8 @@ Link_CheckCommunicationError: ; 29e0c ld [hli], a ld [hl], a ret -; 29e3b -.CheckConnected: ; 29e3b +.CheckConnected: call WaitLinkTransfer ld hl, wLinkTimeoutFrames ld a, [hli] @@ -2400,9 +2356,8 @@ Link_CheckCommunicationError: ; 29e0c ld a, [hl] inc a ret -; 29e47 -.AcknowledgeSerial: ; 29e47 +.AcknowledgeSerial: ld b, 10 .loop call DelayFrame @@ -2410,9 +2365,8 @@ Link_CheckCommunicationError: ; 29e0c dec b jr nz, .loop ret -; 29e53 -.ConvertDW: ; 29e53 +.ConvertDW: ; [wLinkTimeoutFrames] = ((hl - $100) / 4) + $100 ; = (hl / 4) + $c0 dec h @@ -2426,9 +2380,8 @@ Link_CheckCommunicationError: ; 29e0c ld a, l ld [wLinkTimeoutFrames + 1], a ret -; 29e66 -TryQuickSave: ; 29e66 +TryQuickSave: ld a, [wd265] push af farcall Link_SaveGame @@ -2442,9 +2395,8 @@ TryQuickSave: ; 29e66 pop af ld [wd265], a ret -; 29e82 -CheckBothSelectedSameRoom: ; 29e82 +CheckBothSelectedSameRoom: ld a, [wd265] call Link_EnsureSync push af @@ -2469,9 +2421,8 @@ CheckBothSelectedSameRoom: ; 29e82 xor a ; FALSE ld [wScriptVar], a ret -; 29eaf -TimeCapsule: ; 29eaf +TimeCapsule: ld a, LINK_TIMECAPSULE ld [wLinkMode], a call DisableSpriteUpdates @@ -2480,9 +2431,8 @@ TimeCapsule: ; 29eaf xor a ld [hVBlank], a ret -; 29ec4 -TradeCenter: ; 29ec4 +TradeCenter: ld a, LINK_TRADECENTER ld [wLinkMode], a call DisableSpriteUpdates @@ -2491,9 +2441,8 @@ TradeCenter: ; 29ec4 xor a ld [hVBlank], a ret -; 29ed9 -Colosseum: ; 29ed9 +Colosseum: ld a, LINK_COLOSSEUM ld [wLinkMode], a call DisableSpriteUpdates @@ -2502,24 +2451,21 @@ Colosseum: ; 29ed9 xor a ld [hVBlank], a ret -; 29eee -CloseLink: ; 29eee +CloseLink: xor a ld [wLinkMode], a ld c, 3 call DelayFrames jp Link_ResetSerialRegistersAfterLinkClosure -; 29efa -FailedLinkToPast: ; 29efa +FailedLinkToPast: ld c, 40 call DelayFrames ld a, $e jp Link_EnsureSync -; 29f04 -Link_ResetSerialRegistersAfterLinkClosure: ; 29f04 +Link_ResetSerialRegistersAfterLinkClosure: ld c, 3 call DelayFrames ld a, CONNECTION_NOT_ESTABLISHED @@ -2530,9 +2476,8 @@ Link_ResetSerialRegistersAfterLinkClosure: ; 29f04 ld [hSerialReceive], a ld [rSC], a ret -; 29f17 -Link_EnsureSync: ; 29f17 +Link_EnsureSync: add $d0 ld [wPlayerLinkAction], a ld [wcf57], a @@ -2559,9 +2504,8 @@ Link_EnsureSync: ; 29f17 ld a, b and $f ret -; 29f47 -CableClubCheckWhichChris: ; 29f47 +CableClubCheckWhichChris: ld a, [hSerialConnectionStatus] cp USING_EXTERNAL_CLOCK ld a, TRUE @@ -2571,11 +2515,9 @@ CableClubCheckWhichChris: ; 29f47 .yes ld [wScriptVar], a ret -; 29f54 -Unreferenced_Gen1LinkCommsBorderGFX: ; 29f54 +Unreferenced_Gen1LinkCommsBorderGFX: INCBIN "gfx/trade/unused_gen_1_border_tiles.2bpp" -; 29fe4 Unreferenced_Function29fe4: ld a, BANK(sPartyMail) diff --git a/engine/link/link_2.asm b/engine/link/link_2.asm index e2fe47dc589..ed7a7e2c92f 100644 --- a/engine/link/link_2.asm +++ b/engine/link/link_2.asm @@ -1,4 +1,4 @@ -LinkMonStatsScreen: ; 4d319 +LinkMonStatsScreen: ld a, [wMenuCursorY] dec a ld [wCurPartyMon], a @@ -17,12 +17,12 @@ LinkMonStatsScreen: ; 4d319 call WaitBGMap2 ret -Link_WaitBGMap: ; 4d354 +Link_WaitBGMap: call WaitBGMap call WaitBGMap2 ret -LinkTextbox2: ; 4d35b +LinkTextbox2: ld h, d ld l, e push bc @@ -52,9 +52,8 @@ LinkTextbox2: ; 4d35b dec b jr nz, .row ret -; 4d37e -.PlaceBorder: ; 4d37e +.PlaceBorder: push hl ld a, $76 ld [hli], a @@ -84,9 +83,8 @@ LinkTextbox2: ; 4d35b call .PlaceRow ld [hl], "└" ret -; 4d3ab -.PlaceRow: ; 4d3ab +.PlaceRow: ld d, c .row_loop ld [hli], a diff --git a/engine/link/link_trade.asm b/engine/link/link_trade.asm index 4c2af084298..2e584fe4ce9 100644 --- a/engine/link/link_trade.asm +++ b/engine/link/link_trade.asm @@ -1,24 +1,21 @@ LinkCommsBorderGFX: INCBIN "gfx/trade/border_tiles.2bpp" -; 16d421 -__LoadTradeScreenBorder: ; 16d421 +__LoadTradeScreenBorder: ld de, LinkCommsBorderGFX ld hl, vTiles2 lb bc, BANK(LinkCommsBorderGFX), 70 call Get2bpp ret -; 16d42e -Function16d42e: ; 16d42e +Function16d42e: ld hl, Tilemap_MobileTradeBorderFullscreen decoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call CopyBytes ret -; 16d43b -Function16d43b: ; 16d43b +Function16d43b: call LoadStandardMenuHeader call ClearBGPalettes call ClearTileMap @@ -32,7 +29,6 @@ Function16d43b: ; 16d43b call JoyWaitAorB call Call_ExitMenu ret -; 16d465 Tilemap_MobileTradeBorderFullscreen: INCBIN "gfx/trade/border_mobile_fullscreen.tilemap" @@ -43,7 +39,7 @@ INCBIN "gfx/trade/border_cable_top.tilemap" Tilemap_CableTradeBorderBottom: INCBIN "gfx/trade/border_cable_bottom.tilemap" -_LinkTextbox: ; 16d61d +_LinkTextbox: ld h, d ld l, e push bc @@ -73,9 +69,8 @@ _LinkTextbox: ; 16d61d dec b jr nz, .row ret -; 16d640 -.PlaceBorder ; 16d640 +.PlaceBorder push hl ld a, $30 ld [hli], a @@ -105,18 +100,16 @@ _LinkTextbox: ; 16d61d call .PlaceRow ld [hl], $37 ret -; 16d66d -.PlaceRow ; 16d66d +.PlaceRow ld d, c .row_loop ld [hli], a dec d jr nz, .row_loop ret -; 16d673 -InitTradeSpeciesList: ; 16d673 +InitTradeSpeciesList: call _LoadTradeScreenBorder call Function16d6ae farcall InitMG_Mobile_LinkTradePalMap @@ -125,32 +118,27 @@ InitTradeSpeciesList: ; 16d673 ld de, .CANCEL call PlaceString ret -; 16d68f -.CANCEL: ; 16d68f +.CANCEL: db "CANCEL@" -; 16d696 -_LoadTradeScreenBorder: ; 16d696 +_LoadTradeScreenBorder: call __LoadTradeScreenBorder ret -; 16d69a -LinkComms_LoadPleaseWaitTextboxBorderGFX: ; 16d69a +LinkComms_LoadPleaseWaitTextboxBorderGFX: ld de, LinkCommsBorderGFX + $30 tiles ld hl, vTiles2 tile $76 lb bc, BANK(LinkCommsBorderGFX), 8 call Get2bpp ret -; 16d6a7 -LoadTradeRoomBGPals_: ; 16d6a7 +LoadTradeRoomBGPals_: farcall LoadTradeRoomBGPals ret -; 16d6ae -Function16d6ae: ; 16d6ae +Function16d6ae: call Function16d42e ld hl, Tilemap_CableTradeBorderTop decoord 0, 0 @@ -161,23 +149,20 @@ Function16d6ae: ; 16d6ae ld bc, 2 * SCREEN_WIDTH call CopyBytes ret -; 16d6ca -LinkTextbox: ; 16d6ca +LinkTextbox: call _LinkTextbox ret -; 16d6ce -Function16d6ce: ; 16d6ce +Function16d6ce: call LoadStandardMenuHeader call Function16d6e1 farcall WaitLinkTransfer call Call_ExitMenu call WaitBGMap2 ret -; 16d6e1 -Function16d6e1: ; 16d6e1 +Function16d6e1: hlcoord 4, 10 ld b, 1 ld c, 10 @@ -189,19 +174,16 @@ Function16d6e1: ; 16d6e1 call WaitBGMap2 ld c, 50 jp DelayFrames -; 16d701 -.Waiting: ; 16d701 +.Waiting: db "WAITING..!@" -; 16d70c -LinkTradeMenu: ; 16d70c +LinkTradeMenu: call .MenuAction call .GetJoypad ret -; 16d713 -.GetJoypad: ; 16d713 +.GetJoypad: push bc push af ld a, [hJoyLast] @@ -216,9 +198,8 @@ LinkTradeMenu: ; 16d70c pop bc ld d, a ret -; 16d725 -.MenuAction: ; 16d725 +.MenuAction: ld hl, w2DMenuFlags2 res 7, [hl] ld a, [hBGMapMode] @@ -246,9 +227,8 @@ LinkTradeMenu: ; 16d70c .done ret -; 16d759 -.UpdateBGMapAndOAM: ; 16d759 +.UpdateBGMapAndOAM: ld a, [hOAMUpdate] push af ld a, $1 @@ -269,9 +249,8 @@ LinkTradeMenu: ; 16d70c jr z, .loop2 and a ret -; 16d77a -.UpdateCursor: ; 16d77a +.UpdateCursor: ld hl, wCursorCurrentTile ld a, [hli] ld h, [hl] @@ -346,9 +325,8 @@ LinkTradeMenu: ; 16d70c ld a, h ld [wCursorCurrentTile + 1], a ret -; 16d7e7 -.TryAnims: ; 16d7e7 +.TryAnims: ld a, [w2DMenuFlags1] bit 6, a jr z, .skip_anims @@ -360,4 +338,3 @@ LinkTradeMenu: ; 16d70c ret z scf ret -; 16d7fe diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm index 4aed9ee70ee..8ac734af62a 100644 --- a/engine/link/mystery_gift.asm +++ b/engine/link/mystery_gift.asm @@ -1,4 +1,4 @@ -DoMysteryGift: ; 1048ba (41:48ba) +DoMysteryGift: call ClearTileMap call ClearSprites call WaitBGMap @@ -98,84 +98,74 @@ DoMysteryGift: ; 1048ba (41:48ba) ld hl, .Text_Sent ; sent item jr .PrintTextAndExit -.LinkCanceled: ; 1049af (41:49af) +.LinkCanceled: ld hl, .Text_LinkCanceled ; Link has been canceled jr .PrintTextAndExit -.CommunicationError: ; 1049b4 (41:49b4) +.CommunicationError: ld hl, .Text_CommunicationError ; Communication error call PrintText jp DoMysteryGift -.GiftWaiting: ; 1049bd (41:49bd) +.GiftWaiting: ld hl, .Text_ReceiveGiftAtCounter ; receive gift at counter jr .PrintTextAndExit -.FriendNotReady: ; 1049c2 (41:49c2) +.FriendNotReady: ld hl, .Text_FriendNotReady ; friend not ready -.PrintTextAndExit: ; 1049c5 (41:49c5) +.PrintTextAndExit: call PrintText ld a, LCDC_DEFAULT ld [rLCDC], a ret -; 1049cd (41:49cd) -.String_PressAToLink_BToCancel: ; 1049cd +.String_PressAToLink_BToCancel: db "Press A to" next "link IR-Device" next "Press B to" next "cancel it." db "@" -; 1049fd -.Text_LinkCanceled: ; 1049fd +.Text_LinkCanceled: text_jump UnknownText_0x1c0436 db "@" -; 104a02 -.Text_CommunicationError: ; 104a02 +.Text_CommunicationError: text_jump UnknownText_0x1c0454 db "@" -; 104a07 -.Text_ReceiveGiftAtCounter: ; 104a07 +.Text_ReceiveGiftAtCounter: text_jump UnknownText_0x1c046a db "@" -; 104a0c -.Text_FriendNotReady: ; 104a0c +.Text_FriendNotReady: text_jump UnknownText_0x1c048e db "@" -; 104a11 -.Text_MaxFiveGifts: ; 104a11 +.Text_MaxFiveGifts: text_jump UnknownText_0x1c04a7 db "@" -; 104a16 -.Text_MaxOneGiftPerPerson: ; 104a16 +.Text_MaxOneGiftPerPerson: text_jump UnknownText_0x1c04c6 db "@" -; 104a1b -.Text_Sent: ; 104a1b +.Text_Sent: text_jump UnknownText_0x1c04e9 db "@" -; 104a20 -.Text_SentToHome: ; 104a20 +.Text_SentToHome: text_jump UnknownText_0x1c04fa db "@" -; 104a25 -.CheckAlreadyGotFiveGiftsToday: ; 104a25 (41:4a25) +.CheckAlreadyGotFiveGiftsToday: call GetMysteryGiftBank ld a, [sNumDailyMysteryGiftPartnerIDs] cp $5 jp CloseSRAM -.CheckAlreadyGotAGiftFromThatPerson: ; 104a30 (41:4a30) +.CheckAlreadyGotAGiftFromThatPerson: call GetMysteryGiftBank ld a, [wMysteryGiftPartnerID] ld b, a @@ -203,7 +193,7 @@ DoMysteryGift: ; 1048ba (41:48ba) .No: jp CloseSRAM -.AddMysteryGiftPartnerID: ; 104a56 (41:4a56) +.AddMysteryGiftPartnerID: call GetMysteryGiftBank ld hl, sNumDailyMysteryGiftPartnerIDs ld a, [hl] @@ -219,7 +209,7 @@ DoMysteryGift: ; 1048ba (41:48ba) ld [hl], a jp CloseSRAM -.SaveMysteryGiftTrainerName: ; 104a71 (41:4a71) +.SaveMysteryGiftTrainerName: call GetMysteryGiftBank ld a, $1 ld [sMysteryGiftTrainerHouseFlag], a @@ -235,7 +225,7 @@ DoMysteryGift: ; 1048ba (41:48ba) call CopyBytes jp CloseSRAM -Function104a95: ; 104a95 (41:4a95) +Function104a95: di farcall ClearChannels call Function104d5e @@ -305,10 +295,10 @@ Function104a95: ; 104a95 (41:4a95) ld [hMGStatusFlags], a jp Function104bd0 -Function104b04: ; 104b04 (41:4b04) +Function104b04: call Function104b40 jp nz, Function104bd0 -Function104b0a: ; 104b0a (41:4b0a) +Function104b0a: call Function104d38 jp nz, Function104bd0 call Function104b88 @@ -318,7 +308,7 @@ Function104b0a: ; 104b0a (41:4b0a) call Function105033 jp Function104bd0 -Function104b22: ; 104b22 (41:4b22) +Function104b22: call Function104b88 jp nz, Function104bd0 call Function104d43 @@ -330,13 +320,13 @@ Function104b22: ; 104b22 (41:4b22) call Function10502e jp Function104bd0 -Function104b40: ; 104b40 (41:4b40) +Function104b40: ld hl, hPrintNum1 ld b, $1 call Function104d56 ret nz -Function104b49: ; 104b49 (41:4b49) +Function104b49: call Function105033 ld a, [hMGStatusFlags] cp $6c @@ -368,7 +358,7 @@ Function104b49: ; 104b49 (41:4b49) cp $6c ret -Function104b88: ; 104b88 (41:4b88) +Function104b88: ld a, $96 ld [hPrintNum1], a ld hl, hPrintNum1 @@ -404,7 +394,7 @@ Function104b88: ; 104b88 (41:4b88) cp $6c ret -Function104bd0: ; 104bd0 (41:4bd0) +Function104bd0: nop ld a, [hMGStatusFlags] cp $10 @@ -451,7 +441,7 @@ Function104bd0: ; 104bd0 (41:4bd0) pop af ret -Function104c2d: ; 104c2d (41:4c2d) +Function104c2d: di farcall ClearChannels call Function104d5e @@ -488,7 +478,7 @@ Function104c2d: ; 104c2d (41:4c2d) call Function10502e jp Function104d1c -Function104c8a: ; 104c8a (41:4c8a) +Function104c8a: ld hl, hPrintNum1 ld b, $1 call Function104d56 @@ -524,7 +514,7 @@ Function104c8a: ; 104c8a (41:4c8a) cp $6c ret -Function104cd2: ; 104cd2 (41:4cd2) +Function104cd2: ld a, $3c ld [hPrintNum1], a ld hl, hPrintNum1 @@ -561,7 +551,7 @@ Function104cd2: ; 104cd2 (41:4cd2) cp $6c ret -Function104d1c: ; 104d1c (41:4d1c) +Function104d1c: nop ld a, [hMGStatusFlags] push af @@ -576,39 +566,39 @@ Function104d1c: ; 104d1c (41:4d1c) pop af ret -Function104d32: ; 104d32 (41:4d32) +Function104d32: ld a, $80 ld [hMGStatusFlags], a and a ret -Function104d38: ; 104d38 (41:4d38) +Function104d38: call Function104d96 call Function104e46 ld a, [hMGStatusFlags] cp $6c ret -Function104d43: ; 104d43 (41:4d43) +Function104d43: call Function104d96 call Function104dfe ld a, [hMGStatusFlags] cp $6c ret -Function104d4e: ; 104d4e (41:4d4e) +Function104d4e: call Function104e93 ld a, [hMGStatusFlags] cp $6c ret -Function104d56: ; 104d56 (41:4d56) +Function104d56: call Function104f57 ld a, [hMGStatusFlags] cp $6c ret -Function104d5e: ; 104d5e (41:4d5e) +Function104d5e: call Function104d74 ld a, $4 ld [rIE], a @@ -624,7 +614,7 @@ Function104d5e: ; 104d5e (41:4d5e) jr nz, .asm_104d6d ret -Function104d74: ; 104d74 (41:4d74) +Function104d74: xor a ld [rTAC], a ld a, $fe @@ -636,7 +626,7 @@ Function104d74: ; 104d74 (41:4d74) ld [rTAC], a ret -Function104d86: ; 104d86 (41:4d86) +Function104d86: xor a ld [rTAC], a ld [rTMA], a @@ -647,21 +637,21 @@ Function104d86: ; 104d86 (41:4d86) ld [rTAC], a ret -Function104d96: ; 104d96 (41:4d96) +Function104d96: ld a, $c0 call Function104e8c ld a, $1 ld [hPrintNum9], a ret -Function104da0: ; 104da0 (41:4da0) +Function104da0: xor a call Function104e8c ld a, $2 ld [rTAC], a ret -Function104da9: ; 104da9 (41:4da9) +Function104da9: inc d ret z xor a @@ -673,7 +663,7 @@ Function104da9: ; 104da9 (41:4da9) or a ret -Function104db7: ; 104db7 (41:4db7) +Function104db7: inc d ret z xor a @@ -685,7 +675,7 @@ Function104db7: ; 104db7 (41:4db7) or a ret -Function104dc5: ; 104dc5 (41:4dc5) +Function104dc5: ld a, $c1 ld [$ff00+c], a .wait @@ -696,7 +686,7 @@ Function104dc5: ; 104dc5 (41:4dc5) halt jr .wait -Function104dd1: ; 104dd1 (41:4dd1) +Function104dd1: ld a, $c0 ld [$ff00+c], a .wait @@ -707,7 +697,7 @@ Function104dd1: ; 104dd1 (41:4dd1) halt jr .wait -Function104ddd: ; 104ddd (41:4ddd) +Function104ddd: ld d, $0 ld e, d ld a, $1 @@ -730,7 +720,7 @@ Function104ddd: ; 104ddd (41:4ddd) and b jr nz, .loop -Function104dfe: ; 104dfe (41:4dfe) +Function104dfe: ld c, LOW(rRP) ld d, $0 ld e, d @@ -757,7 +747,7 @@ Function104dfe: ; 104dfe (41:4dfe) call Function104dd1 ret -Function104e3a: ; 104e3a (41:4e3a) +Function104e3a: ; Wait a random amount of time call Random ld e, a @@ -768,7 +758,7 @@ Function104e3a: ; 104e3a (41:4e3a) ld a, d or e jr nz, .loop -Function104e46: ; 104e46 (41:4e46) +Function104e46: ld a, $2 ld [hPrintNum9], a ld c, LOW(rRP) @@ -800,13 +790,13 @@ Function104e46: ; 104e46 (41:4e46) ld [hMGStatusFlags], a ret -Function104e8c: ; 104e8c (41:4e8c) +Function104e8c: ld [rRP], a ld a, $ff ld [hMGStatusFlags], a ret -Function104e93: ; 104e93 (41:4e93) +Function104e93: xor a ld [hPrintNum5], a ld [hPrintNum6], a @@ -843,7 +833,7 @@ Function104e93: ; 104e93 (41:4e93) pop hl ret -Function104ed6: ; 104ed6 (41:4ed6) +Function104ed6: ld c, LOW(rRP) ld d, $5 call Function104dd1 @@ -910,25 +900,25 @@ Function104ed6: ; 104ed6 (41:4ed6) call Function104dd1 ret -Function104f42: ; 104f42 (41:4f42) +Function104f42: ld a, [hMGStatusFlags] or $2 ld [hMGStatusFlags], a ret -Function104f49: ; 104f49 (41:4f49) +Function104f49: ld a, [hMGStatusFlags] or $1 ld [hMGStatusFlags], a ret -Function104f50: ; 104f50 (41:4f50) +Function104f50: ld a, [hMGStatusFlags] or $80 ld [hMGStatusFlags], a ret -Function104f57: ; 104f57 (41:4f57) +Function104f57: xor a ld [hPrintNum5], a ld [hPrintNum6], a @@ -980,7 +970,7 @@ Function104f57: ; 104f57 (41:4f57) ld [hPrintNum6], a ret -Function104faf: ; 104faf (41:4faf) +Function104faf: ld c, LOW(rRP) ld d, $0 call Function104db7 @@ -1059,15 +1049,15 @@ Function104faf: ; 104faf (41:4faf) call Function104dd1 ret -Function10502e: ; 10502e (41:502e) +Function10502e: ld b, $0 jp Function104e93 -Function105033: ; 105033 (41:5033) +Function105033: ld b, $0 jp Function104f57 -MysteryGift_ReadJoypad: ; 105038 (41:5038) +MysteryGift_ReadJoypad: ; We can only get four inputs at a time. ; We take d-pad first for no particular reason. ld a, R_DPAD @@ -1112,7 +1102,7 @@ endr ld [rJOYP], a ret -MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069) +MysteryGift_CheckAndSetDecorationAlreadyReceived: call GetMysteryGiftBank ld d, $0 ld b, CHECK_FLAG @@ -1134,7 +1124,7 @@ MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069) xor a ret -MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091) +MysteryGift_CopyReceivedDecosToPC: call GetMysteryGiftBank ld c, $0 .loop @@ -1157,7 +1147,7 @@ MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091) jr c, .loop jp CloseSRAM -UnlockMysteryGift: ; 1050b9 +UnlockMysteryGift: call GetMysteryGiftBank ld hl, sMysteryGiftUnlocked ld a, [hl] @@ -1167,9 +1157,8 @@ UnlockMysteryGift: ; 1050b9 ld [hl], a .ok jp CloseSRAM -; 1050c8 -Function1050c8: ; 1050c8 +Function1050c8: call GetMysteryGiftBank ld a, [sNumDailyMysteryGiftPartnerIDs] cp $ff @@ -1178,10 +1167,9 @@ Function1050c8: ; 1050c8 ld [sNumDailyMysteryGiftPartnerIDs], a .okay jp CloseSRAM -; 1050d9 -BackupMysteryGift: ; 1050d9 +BackupMysteryGift: call GetMysteryGiftBank ld hl, sMysteryGiftItem ld de, sBackupMysteryGiftItem @@ -1191,10 +1179,9 @@ BackupMysteryGift: ; 1050d9 ld a, [hl] ld [de], a jp CloseSRAM -; 1050ea -RestoreMysteryGift: ; 1050ea (41:50ea) +RestoreMysteryGift: call GetMysteryGiftBank ld hl, sBackupMysteryGiftItem ld de, sMysteryGiftItem @@ -1205,7 +1192,7 @@ RestoreMysteryGift: ; 1050ea (41:50ea) ld [de], a jp CloseSRAM -MysteryGift_ClearTrainerData: ; 1050fb (41:50fb) +MysteryGift_ClearTrainerData: ld hl, wMysteryGiftTrainerData xor a ld b, wMysteryGiftTrainerDataEnd - wMysteryGiftTrainerData @@ -1216,13 +1203,12 @@ MysteryGift_ClearTrainerData: ; 1050fb (41:50fb) ret -GetMysteryGiftBank: ; 105106 +GetMysteryGiftBank: ld a, BANK(sBackupMysteryGiftItem) jp GetSRAMBank -; 10510b -StagePartyDataForMysteryGift: ; 10510b (41:510b) +StagePartyDataForMysteryGift: ; You will be sending this data to your mystery gift partner. ; Structure is the same as a trainer with species and moves ; defined. @@ -1273,7 +1259,7 @@ StagePartyDataForMysteryGift: ; 10510b (41:510b) ld [wca00], a jp CloseSRAM -InitMysteryGiftLayout: ; 105153 (41:5153) +InitMysteryGiftLayout: call ClearBGPalettes call DisableLCD ld hl, MysteryGiftGFX @@ -1364,37 +1350,36 @@ InitMysteryGiftLayout: ; 105153 (41:5153) call SetPalettes ret -.Load5GFX: ; 10522e (41:522e) +.Load5GFX: ld b, 5 jr .gfx_loop -; 105232 (41:5232) .Unreferenced_Load6GFX: ld b, 6 jr .gfx_loop -.Load16GFX: ; 105236 (41:5236) +.Load16GFX: ld b, 16 -.gfx_loop ; 105238 (41:5238) +.gfx_loop ld [hli], a inc a dec b jr nz, .gfx_loop ret -.Load9Column: ; 10523e (41:523e) +.Load9Column: ld b, 9 jr .col_loop -.Load11Column: ; 105242 (41:5242) +.Load11Column: ld b, 11 jr .col_loop -.Load14Column: ; 105246 (41:5246) +.Load14Column: ld b, 14 -.col_loop ; 105248 (41:5248) +.col_loop ld [hl], a ld de, SCREEN_WIDTH add hl, de @@ -1402,7 +1387,7 @@ InitMysteryGiftLayout: ; 105153 (41:5153) jr nz, .col_loop ret -.Load16Row: ; 105251 (41:5251) +.Load16Row: ld b, 16 .row_loop ld [hli], a @@ -1410,11 +1395,11 @@ InitMysteryGiftLayout: ; 105153 (41:5153) jr nz, .row_loop ret -MysteryGiftGFX: ; 105258 +MysteryGiftGFX: INCBIN "gfx/mystery_gift/mystery_gift.2bpp" .End -Function105688: ; 105688 (41:5688) +Function105688: call ClearTileMap call ClearSprites call WaitBGMap @@ -1455,7 +1440,7 @@ Function105688: ; 105688 (41:5688) ld hl, Text_ListedCardAsNumber jr PrintTextAndExit_JP -Function1056eb: ; 1056eb (41:56eb) +Function1056eb: ld c, 16 .loop ld hl, wVirtualOAMSprite00YCoord @@ -1484,55 +1469,52 @@ endr pop bc jr .loop -Function105712: ; 105712 (41:5712) +Function105712: call Function105777 ld hl, Text_MGLinkCanceled jr PrintTextAndExit_JP -Function10571a: ; 10571a (41:571a) +Function10571a: call Function105777 ld hl, Text_MGCommError call PrintText jp Function105688 -PrintTextAndExit_JP: ; 105726 (41:5726) +PrintTextAndExit_JP: call PrintText ld a, LCDC_DEFAULT ld [rLCDC], a ret -; 10572e (41:572e) -String_PressAToLink_BToCancel_JP: ; 10572e +String_PressAToLink_BToCancel_JP: db "エーボタンおすと" next "つうしんおこなわれるよ!" next "ビーボタンおすと" next "つうしんちゅうし します" db "@" -; 10575e -Text_ReceivedCard: ; 10575e +Text_ReceivedCard: text_jump UnknownText_0x1c051a db "@" -Text_ListedCardAsNumber: ; 105763 +Text_ListedCardAsNumber: text_jump UnknownText_0x1c0531 db "@" -Text_CardNotRegistered: ; 105768 +Text_CardNotRegistered: text_jump UnknownText_0x1c0555 db "@" -Text_MGLinkCanceled: ; 10576d +Text_MGLinkCanceled: text_jump UnknownText_0x1c0573 db "@" -Text_MGCommError: ; 105772 +Text_MGCommError: text_jump UnknownText_0x1c0591 db "@" -; 105777 -Function105777: ; 105777 (41:5777) +Function105777: call ClearSprites call ClearTileMap call EnableLCD @@ -1542,7 +1524,7 @@ Function105777: ; 105777 (41:5777) call SetPalettes ret -Function10578c: ; 10578c (41:578c) +Function10578c: ld de, wLinkData ld a, BANK(sPlayerData) call GetSRAMBank @@ -1572,7 +1554,7 @@ Function10578c: ; 10578c (41:578c) call CloseSRAM ret -Function1057d7: ; 1057d7 (41:57d7) +Function1057d7: call ClearBGPalettes call DisableLCD ld hl, MysteryGiftJP_GFX @@ -1666,36 +1648,36 @@ Function1057d7: ; 1057d7 (41:57d7) farcall GetMysteryGift_MobileAdapterLayout jp SetPalettes -.Load6Row: ; 1058c6 (41:58c6) +.Load6Row: ld b, 6 jr .row_loop -.Load11Row: ; 1058ca (41:58ca) +.Load11Row: ld b, 11 jr .row_loop -.Load12Row: ; 1058ce (41:58ce) +.Load12Row: ld b, 12 -.row_loop ; 1058d0 (41:58d0) +.row_loop ld [hli], a inc a dec b jr nz, .row_loop ret -.Load9Column: ; 1058d6 (41:58d6) +.Load9Column: ld b, 9 jr .column_loop -.Load11Column: ; 1058da (41:58da) +.Load11Column: ld b, 11 jr .column_loop -.Load14Column: ; 1058de (41:58de) +.Load14Column: ld b, 14 -.column_loop ; 1058e0 (41:58e0) +.column_loop ld [hl], a ld de, SCREEN_WIDTH add hl, de @@ -1703,16 +1685,15 @@ Function1057d7: ; 1057d7 (41:57d7) jr nz, .column_loop ret -.Load16Row: ; 1058e9 (41:58e9) +.Load16Row: ld b, 16 .row_loop_no_inc ld [hli], a dec b jr nz, .row_loop_no_inc ret -; 1058f0 (41:58f0) -.OAM_data: ; 1058f0 +.OAM_data: dsprite 2, 1, 6, 4, $00, 0 dsprite 2, 1, 7, 4, $01, 0 dsprite 2, 1, 8, 4, $02, 0 @@ -1731,5 +1712,5 @@ Function1057d7: ; 1057d7 (41:57d7) dsprite 1, 1, 14, 4, $07, 0 ; japanese mystery gift gfx -MysteryGiftJP_GFX: ; 105930 +MysteryGiftJP_GFX: INCBIN "gfx/mystery_gift/mystery_gift_jp.2bpp" diff --git a/engine/link/mystery_gift_2.asm b/engine/link/mystery_gift_2.asm index e0e2e88fd2b..a2ce6067805 100644 --- a/engine/link/mystery_gift_2.asm +++ b/engine/link/mystery_gift_2.asm @@ -1,4 +1,4 @@ -PrepMysteryGiftDataToSend: ; 2c642 (b:4642) +PrepMysteryGiftDataToSend: ld de, wMysteryGiftStaging ld a, $1 ld [de], a @@ -56,7 +56,7 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642) ld bc, wMysteryGiftPlayerDataEnd - wMysteryGiftPlayerData jp CopyBytes -.RandomSample: ; 2c6ac (b:46ac) +.RandomSample: push de call Random cp 10 percent @@ -121,7 +121,7 @@ PrepMysteryGiftDataToSend: ; 2c642 (b:4642) pop de ret -MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708) +MysteryGiftGetItemHeldEffect: ld a, c cp MysteryGiftItems.End - MysteryGiftItems jr nc, MysteryGiftFallbackItem @@ -131,7 +131,7 @@ MysteryGiftGetItemHeldEffect: ; 2c708 (b:4708) ld c, [hl] ret -MysteryGiftGetDecoration: ; 2c715 (b:4715) +MysteryGiftGetDecoration: ld a, c cp MysteryGiftDecos.End - MysteryGiftDecos jr nc, MysteryGiftFallbackItem @@ -141,10 +141,9 @@ MysteryGiftGetDecoration: ; 2c715 (b:4715) ld c, [hl] ret -MysteryGiftFallbackItem: ; 2c722 (b:4722) +MysteryGiftFallbackItem: ld c, DECO_POLKADOT_BED ; GREAT_BALL ret -; 2c725 (b:4725) INCLUDE "data/items/mystery_gift_items.asm" diff --git a/engine/link/place_waiting_text.asm b/engine/link/place_waiting_text.asm index 9b22607222c..1476830420d 100644 --- a/engine/link/place_waiting_text.asm +++ b/engine/link/place_waiting_text.asm @@ -1,4 +1,4 @@ -PlaceWaitingText:: ; 4000 +PlaceWaitingText:: hlcoord 3, 10 ld b, 1 ld c, 11 @@ -20,5 +20,5 @@ PlaceWaitingText:: ; 4000 ld c, 50 jp DelayFrames -.Waiting: ; 4025 +.Waiting: db "Waiting...!@" diff --git a/engine/link/time_capsule.asm b/engine/link/time_capsule.asm index f90b7e24976..195062c1e83 100644 --- a/engine/link/time_capsule.asm +++ b/engine/link/time_capsule.asm @@ -1,6 +1,6 @@ ; These functions seem to be related to backwards compatibility -ValidateOTTrademon: ; fb57e +ValidateOTTrademon: ld a, [wd003] ld hl, wOTPartyMon1Species call GetPartyLocation @@ -63,9 +63,8 @@ ValidateOTTrademon: ; fb57e .abnormal scf ret -; fb5dd -Functionfb5dd: ; fb5dd +Functionfb5dd: ld a, [wd002] ld d, a ld a, [wPartyCount] @@ -100,9 +99,8 @@ Functionfb5dd: ; fb5dd .done and a ret -; fb60d -PlaceTradePartnerNamesAndParty: ; fb60d +PlaceTradePartnerNamesAndParty: hlcoord 4, 0 ld de, wPlayerName call PlaceString @@ -118,7 +116,7 @@ PlaceTradePartnerNamesAndParty: ; fb60d call .PlaceSpeciesNames hlcoord 7, 9 ld de, wOTPartySpecies -.PlaceSpeciesNames: ; fb634 +.PlaceSpeciesNames: ld c, $0 .loop ld a, [de] @@ -142,6 +140,5 @@ PlaceTradePartnerNamesAndParty: ; fb60d pop bc inc c jr .loop -; fb656 INCLUDE "data/pokemon/gen1_base_special.asm" diff --git a/engine/link/time_capsule_2.asm b/engine/link/time_capsule_2.asm index a56e5178507..4300105c6c5 100644 --- a/engine/link/time_capsule_2.asm +++ b/engine/link/time_capsule_2.asm @@ -1,4 +1,4 @@ -ConvertMon_2to1: ; fb8f1 +ConvertMon_2to1: ; Takes the Gen-2 Pokemon number stored in wd265, finds it in the Pokered_MonIndices table, and returns its index in wd265. push bc push hl @@ -16,9 +16,8 @@ ConvertMon_2to1: ; fb8f1 pop hl pop bc ret -; fb908 -ConvertMon_1to2: ; fb908 +ConvertMon_1to2: ; Takes the Gen-1 Pokemon number stored in wd265 and returns the corresponding value from Pokered_MonIndices in wd265. push bc push hl @@ -33,7 +32,6 @@ ConvertMon_1to2: ; fb908 pop hl pop bc ret -; fb91c INCLUDE "data/pokemon/gen1_order.asm" diff --git a/engine/math/get_square_root.asm b/engine/math/get_square_root.asm index 412fd04ffca..6791fd7b8be 100644 --- a/engine/math/get_square_root.asm +++ b/engine/math/get_square_root.asm @@ -1,6 +1,6 @@ NUM_SQUARE_ROOTS EQU 255 -GetSquareRoot: ; 13b87 +GetSquareRoot: ; Return the square root of de in b. ; Rather than calculating the result, we take the index of the @@ -24,7 +24,7 @@ GetSquareRoot: ; 13b87 jr c, .loop ret -.Squares: ; 13b98 +.Squares: x = 1 rept NUM_SQUARE_ROOTS dw x * x diff --git a/engine/math/math.asm b/engine/math/math.asm index 0cd6b0b47c8..4240ef6cd3b 100644 --- a/engine/math/math.asm +++ b/engine/math/math.asm @@ -1,4 +1,4 @@ -_Multiply:: ; 66de +_Multiply:: ; hMultiplier is one byte. ld a, 8 @@ -82,10 +82,9 @@ _Multiply:: ; 66de ld [hProduct + 0], a ret -; 673e -_Divide:: ; 673e +_Divide:: xor a ld [hMathBuffer + 0], a ld [hMathBuffer + 1], a @@ -193,4 +192,3 @@ _Divide:: ; 673e ld [hDividend + 0], a ret -; 67c1 diff --git a/engine/math/print_num.asm b/engine/math/print_num.asm index fec798d5cd0..c8899be6c08 100644 --- a/engine/math/print_num.asm +++ b/engine/math/print_num.asm @@ -1,4 +1,4 @@ -_PrintNum:: ; c4c7 +_PrintNum:: ; Print c digits of the b-byte value from de to hl. ; Allows 2 to 7 digits. For 1-digit numbers, add ; the value to char "0" instead of calling PrintNum. @@ -178,7 +178,7 @@ _PrintNum:: ; c4c7 pop bc ret -.PrintYen: ; c5ba +.PrintYen: push af ld a, [hPrintNum1] and a @@ -193,7 +193,7 @@ _PrintNum:: ; c4c7 pop af ret -.PrintDigit: ; c5cb (3:45cb) +.PrintDigit: dec e jr nz, .ok ld a, "0" @@ -278,14 +278,14 @@ _PrintNum:: ; c4c7 ld [hl], "" ret -.PrintLeadingZero: ; c644 +.PrintLeadingZero: ; prints a leading zero unless they are turned off in the flags bit 7, d ; print leading zeroes? ret z ld [hl], "0" ret -.AdvancePointer: ; c64a +.AdvancePointer: ; increments the pointer unless leading zeroes are not being printed, ; the number is left-aligned, and no nonzero digits have been printed yet bit 7, d ; print leading zeroes? diff --git a/engine/math/sine.asm b/engine/math/sine.asm index 23e86c01529..c7422aaf840 100644 --- a/engine/math/sine.asm +++ b/engine/math/sine.asm @@ -1,4 +1,4 @@ -_Sine:: ; 84d9 +_Sine:: ; a = d * sin(e * pi/32) ld a, e calc_sine_wave diff --git a/engine/menus/debug.asm b/engine/menus/debug.asm index d148af542c9..d10d8b7b1a7 100644 --- a/engine/menus/debug.asm +++ b/engine/menus/debug.asm @@ -22,7 +22,7 @@ const DEBUGTEST_E ; $7e const DEBUGTEST_F ; $7f -ColorTest: ; 818ac +ColorTest: ; A debug menu to test monster and trainer palettes at runtime. ld a, [hCGB] @@ -62,15 +62,14 @@ ColorTest: ; 818ac pop af ld [hInMenu], a ret -; 818f4 -Function818f4: ; 818f4 +Function818f4: ld a, [wd002] and a jr nz, Function81911 ld hl, PokemonPalettes -Function818fd: ; 818fd +Function818fd: ld de, wOverworldMapBlocks ld c, NUM_POKEMON + 1 .asm_81902 @@ -85,7 +84,7 @@ Function818fd: ; 818fd jr nz, .asm_81902 ret -Function81911: ; 81911 +Function81911: ld hl, TrainerPalettes ld de, wOverworldMapBlocks ld c, NUM_TRAINER_CLASSES @@ -100,9 +99,8 @@ Function81911: ; 81911 dec c jr nz, .asm_81919 ret -; 81928 -Function81928: ; 81928 +Function81928: ld a, BANK(PokemonPalettes) ; BANK(TrainerPalettes) call GetFarByte ld [de], a @@ -123,9 +121,8 @@ Function81928: ; 81928 ld [de], a inc de ret -; 81948 -Function81948: ; 81948 +Function81948: ld a, $1 ld [rVBK], a ld hl, vTiles0 @@ -148,9 +145,8 @@ Function81948: ; 81948 call ByteFill call ClearSprites ret -; 8197c -Function8197c: ; 8197c +Function8197c: ld hl, DebugColorTestGFX + 1 tiles ld de, vTiles2 tile DEBUGTEST_UP_ARROW ld bc, 22 tiles @@ -171,9 +167,8 @@ Function8197c: ; 8197c or b jr nz, .asm_8199d ret -; 819a7 -Function819a7: ; 819a7 +Function819a7: ld a, [hCGB] and a ret z @@ -214,16 +209,14 @@ Function819a7: ; 819a7 pop af ld [rSVBK], a ret -; 819f4 -Palette_DebugBG: ; 819f4 +Palette_DebugBG: INCLUDE "gfx/debug/bg.pal" -Palette_DebugOB: ; 81a34 +Palette_DebugOB: INCLUDE "gfx/debug/ob.pal" -; 81a74 -Function81a74: ; 81a74 +Function81a74: call JoyTextDelay ld a, [wJumptableIndex] cp $4 @@ -273,9 +266,8 @@ Function81a74: ; 81a74 ld a, $0 ld [wJumptableIndex], a ret -; 81ac3 -Function81ac3: ; 81ac3 +Function81ac3: ; Looping back around the pic set. ld a, [wd002] and a @@ -286,18 +278,16 @@ Function81ac3: ; 81ac3 .asm_81acc ld a, NUM_TRAINER_CLASSES - 1 ; MYSTICALMAN ret -; 81acf -Jumptable_81acf: ; 81acf +Jumptable_81acf: dw Function81adb dw Function81c18 dw Function81c33 dw Function81cc2 dw Function81d8e dw Function81daf -; 81adb -Function81adb: ; 81adb +Function81adb: xor a ld [hBGMapMode], a hlcoord 0, 0 @@ -382,14 +372,12 @@ Function81adb: ; 81adb ld a, $1 ld [wJumptableIndex], a ret -; 81baf String_81baf: db "レア", DEBUGTEST_BLACK, DEBUGTEST_BLACK, "@" ; rare (shiny) String_81bb4: db "ノーマル@" ; normal String_81bb9: db DEBUGTEST_A, "きりかえ▶@" ; (A) switches -; 81bc0 -Function81bc0: ; 81bc0 +Function81bc0: decoord 0, 11, wAttrMap hlcoord 2, 11 ld a, $1 @@ -402,7 +390,7 @@ Function81bc0: ; 81bc0 hlcoord 2, 15 ld a, $3 -Function81bde: ; 81bde +Function81bde: push af ld a, DEBUGTEST_UP_ARROW ld [hli], a @@ -415,9 +403,8 @@ Function81bde: ; 81bde ld bc, $28 call ByteFill ret -; 81bf4 -Function81bf4: ; 81bf4 +Function81bf4: ld a, [wcf66] inc a ld l, a @@ -435,9 +422,8 @@ Function81bf4: ; 81bf4 ld de, wc608 call Function81ea5 ret -; 81c18 -Function81c18: ; 81c18 +Function81c18: ld a, [hCGB] and a jr z, .asm_81c2a @@ -452,9 +438,8 @@ Function81c18: ; 81c18 ld a, $2 ld [wJumptableIndex], a ret -; 81c33 -Function81c33: ; 81c33 +Function81c33: ld a, [hCGB] and a jr z, .asm_81c69 @@ -511,9 +496,8 @@ Function81c33: ; 81c33 ld a, $3 ld [wJumptableIndex], a ret -; 81ca7 -Function81ca7: ; 81ca7 +Function81ca7: inc hl inc hl inc hl @@ -528,14 +512,13 @@ Function81ca7: ; 81ca7 ld a, [de] swap a -Function81cbc: ; 81cbc +Function81cbc: and $f add DEBUGTEST_0 ld [hld], a ret -; 81cc2 -Function81cc2: ; 81cc2 +Function81cc2: ld a, [hJoyLast] and B_BUTTON jr nz, .asm_81cdf @@ -574,16 +557,14 @@ Function81cc2: ; 81cc2 ld a, $0 ld [wJumptableIndex], a ret -; 81d02 -Jumptable_81d02: ; 81d02 +Jumptable_81d02: dw Function81d0a dw Function81d34 dw Function81d46 dw Function81d58 -; 81d0a -Function81d0a: ; 81d0a +Function81d0a: ld hl, hJoyLast ld a, [hl] and D_DOWN @@ -610,7 +591,7 @@ Function81d0a: ; 81d0a call Function81ea5 ret -Function81d34: ; 81d34 +Function81d34: ld hl, hJoyLast ld a, [hl] and D_DOWN @@ -621,7 +602,7 @@ Function81d34: ; 81d34 ld hl, wc608 + 10 jr Function81d63 -Function81d46: ; 81d46 +Function81d46: ld hl, hJoyLast ld a, [hl] and D_DOWN @@ -632,14 +613,14 @@ Function81d46: ; 81d46 ld hl, wc608 + 11 jr Function81d63 -Function81d58: ; 81d58 +Function81d58: ld hl, hJoyLast ld a, [hl] and D_UP jr nz, Function81d84 ld hl, wc608 + 12 -Function81d63: ; 81d63 +Function81d63: ld a, [hJoyLast] and D_RIGHT jr nz, Function81d70 @@ -648,37 +629,36 @@ Function81d63: ; 81d63 jr nz, Function81d77 ret -Function81d70: ; 81d70 +Function81d70: ld a, [hl] cp $1f ret nc inc [hl] jr Function81d7b -Function81d77: ; 81d77 +Function81d77: ld a, [hl] and a ret z dec [hl] -Function81d7b: ; 81d7b +Function81d7b: call Function81e67 ld a, $2 ld [wJumptableIndex], a ret -Function81d84: ; 81d84 +Function81d84: ld hl, wcf64 dec [hl] ret -Function81d89: ; 81d89 +Function81d89: ld hl, wcf64 inc [hl] ret -; 81d8e -Function81d8e: ; 81d8e +Function81d8e: hlcoord 0, 10 ld bc, $a0 ld a, DEBUGTEST_BLACK @@ -692,9 +672,8 @@ Function81d8e: ; 81d8e ld a, $5 ld [wJumptableIndex], a ret -; 81daf -Function81daf: ; 81daf +Function81daf: ld hl, hJoyPressed ld a, [hl] and B_BUTTON @@ -706,15 +685,13 @@ Function81daf: ; 81daf ld a, $0 ld [wJumptableIndex], a ret -; 81dc1 -Function81dc1: ; 81dc1 +Function81dc1: ld hl, wJumptableIndex set 7, [hl] ret -; 81dc7 -Function81dc7: ; 81dc7 +Function81dc7: ld hl, hJoyLast ld a, [hl] and D_UP @@ -749,9 +726,8 @@ Function81dc7: ; 81dc7 ld [wd004], a call Function81df4 ret -; 81df4 -Function81df4: ; 81df4 +Function81df4: hlcoord 10, 11 call Function81e5e hlcoord 10, 12 @@ -783,13 +759,11 @@ Function81df4: ; 81df4 hlcoord 10, 14 call PlaceString ret -; 81e46 String_81e46: db "おぼえられる@" ; can be taught String_81e4d: db "おぼえられない@" ; cannot be taught -; 81e55 -Function81e55: ; 81e55 +Function81e55: cp $32 jr c, .asm_81e5b inc a @@ -798,16 +772,14 @@ Function81e55: ; 81e55 .asm_81e5b add $bf ret -; 81e5e -Function81e5e: ; 81e5e +Function81e5e: ld bc, 10 ld a, DEBUGTEST_BLACK call ByteFill ret -; 81e67 -Function81e67: ; 81e67 +Function81e67: ld a, [wc608 + 10] and $1f ld e, a @@ -843,9 +815,8 @@ Function81e67: ; 81e67 ld a, d ld [wc608 + 1], a ret -; 81ea5 -Function81ea5: ; 81ea5 +Function81ea5: ld a, [de] and $1f ld [wc608 + 10], a @@ -867,9 +838,8 @@ Function81ea5: ; 81ea5 srl a ld [wc608 + 12], a ret -; 81eca -Function81eca: ; 81eca +Function81eca: ld a, [wcf66] inc a ld l, a @@ -884,9 +854,8 @@ Function81eca: ; 81eca ld bc, 4 call CopyBytes ret -; 81ee3 -Function81ee3: ; 81ee3 +Function81ee3: .asm_81ee3 ld a, LOW(PALRGB_WHITE) ld [hli], a @@ -910,9 +879,8 @@ Function81ee3: ; 81ee3 dec c jr nz, .asm_81ee3 ret -; 81efc -Bank20_FillBoxWithByte: ; 81efc +Bank20_FillBoxWithByte: ; For some reason, we have another copy of FillBoxWithByte here .row push bc @@ -928,9 +896,8 @@ Bank20_FillBoxWithByte: ; 81efc dec b jr nz, .row ret -; 81f0c -Function81f0c: ; 81f0c +Function81f0c: ld a, [wcfbe] push af set 7, a @@ -939,9 +906,8 @@ Function81f0c: ; 81f0c pop af ld [wcfbe], a ret -; 81f1d -Function81f1d: ; 81f1d +Function81f1d: ld a, [hl] and $7 ret z @@ -989,9 +955,8 @@ Function81f1d: ; 81f1d dec b jr nz, .asm_81f22 ret -; 81f5e -Function81f5e: ; 81f5e +Function81f5e: ld a, DEBUGTEST_BLACK hlcoord 10, 0 ld [hl], a @@ -1059,14 +1024,12 @@ Function81f5e: ; 81f5e .asm_81fc9 call ClearSprites ret -; 81fcd -String_81fcd: ; 81fcd +String_81fcd: db "おわりますか?" ; Are you finished? next "はい", DEBUGTEST_A ; YES...(A) next "いいえ", DEBUGTEST_B ; NO..(B) db "@" -; 81fe3 DebugColorTestGFX: INCBIN "gfx/debug/color_test.2bpp" @@ -1122,17 +1085,16 @@ TilesetColorTest: ld a, $40 ld [hWY], a ret -; 821d2 -Function821d2: ; 821d2 +Function821d2: hlcoord 0, 0 call Function821de -Function821d8: ; 821d8 +Function821d8: ld a, [wcf64] hlcoord 0, 0, wAttrMap -Function821de: ; 821de +Function821de: add hl, de rept 4 ld [hli], a @@ -1148,25 +1110,23 @@ rept 4 ld [hli], a endr ret -; 821f4 -Function821f4: ; 821f4 +Function821f4: hlcoord 2, 4 call Function82203 hlcoord 2, 6 call Function82203 hlcoord 2, 8 -Function82203: ; 82203 +Function82203: ld a, DEBUGTEST_UP_ARROW ld [hli], a ld bc, $10 - 1 ld a, DEBUGTEST_TICKS call ByteFill ret -; 8220f -Function8220f: ; 8220f +Function8220f: ld a, [rSVBK] push af ld a, BANK(wBGPals1) @@ -1187,10 +1147,9 @@ Function8220f: ; 8220f pop af ld [rSVBK], a ret -; 82236 -Function82236: ; 82236 +Function82236: ld hl, hJoyLast ld a, [hl] and SELECT @@ -1247,9 +1206,8 @@ Function82236: ; 82236 xor $d0 ld [hWY], a ret -; 822a3 -Function822a3: ; 822a3 +Function822a3: ld a, [rSVBK] push af ld a, BANK(wBGPals2) @@ -1281,9 +1239,8 @@ Function822a3: ; 822a3 ld [hCGBPalUpdate], a call DelayFrame ret -; 822f0 -Function822f0: ; 822f0 +Function822f0: ld a, [wcf65] and 3 ld e, a @@ -1295,16 +1252,14 @@ Function822f0: ; 822f0 ld h, [hl] ld l, a jp hl -; 82301 -.dw ; 82301 +.dw dw Function82309 dw Function82339 dw Function8234b dw Function8235d -; 82309 -Function82309: ; 82309 +Function82309: ld hl, hJoyLast ld a, [hl] and D_DOWN @@ -1339,7 +1294,7 @@ Function82309: ; 82309 call Function81ea5 ret -Function82339: ; 82338 +Function82339: ld hl, hJoyLast ld a, [hl] and D_DOWN @@ -1350,7 +1305,7 @@ Function82339: ; 82338 ld hl, wc608 + 10 jr Function82368 -Function8234b: ; 8234b +Function8234b: ld hl, hJoyLast ld a, [hl] and D_DOWN @@ -1361,14 +1316,14 @@ Function8234b: ; 8234b ld hl, wc608 + 11 jr Function82368 -Function8235d: ; 8235d +Function8235d: ld hl, hJoyLast ld a, [hl] and D_UP jr nz, Function82387 ld hl, wc608 + 12 -Function82368: ; 82368 +Function82368: ld a, [hJoyLast] and D_RIGHT jr nz, .asm_82375 @@ -1395,18 +1350,17 @@ Function82368: ; 82368 call Function822a3 ret -Function82387: ; 82387 +Function82387: ld hl, wcf65 dec [hl] ret -Function8238c: ; 8238c +Function8238c: ld hl, wcf65 inc [hl] ret -; 82391 -Function82391: ; 82391 +Function82391: ld a, [wc608 + 10] and $1f ld e, a @@ -1437,11 +1391,9 @@ Function82391: ; 82391 ld [hli], a ld [hl], d ret -; 823c6 -Function823c6: ; 823c6 +Function823c6: ret -Function823c7: ; 823c7 +Function823c7: ret -; 823c8 diff --git a/engine/menus/delete_save.asm b/engine/menus/delete_save.asm index a86faf06a3f..ecfb9761de3 100644 --- a/engine/menus/delete_save.asm +++ b/engine/menus/delete_save.asm @@ -1,4 +1,4 @@ -_DeleteSaveData: ; 4d54c +_DeleteSaveData: farcall BlankScreen ld b, SCGB_DIPLOMA call GetSGBLayout diff --git a/engine/menus/empty_sram.asm b/engine/menus/empty_sram.asm index 8b060f3eff1..45a4a888451 100644 --- a/engine/menus/empty_sram.asm +++ b/engine/menus/empty_sram.asm @@ -1,4 +1,4 @@ -EmptyAllSRAMBanks: ; 4cf1f +EmptyAllSRAMBanks: ld a, 0 call .EmptyBank ld a, 1 @@ -9,7 +9,7 @@ EmptyAllSRAMBanks: ; 4cf1f call .EmptyBank ret -.EmptyBank: ; 4cf34 +.EmptyBank: call GetSRAMBank ld hl, SRAM_Begin ld bc, SRAM_End - SRAM_Begin diff --git a/engine/menus/init_gender.asm b/engine/menus/init_gender.asm index 8fd95bc858f..cf942cf384f 100644 --- a/engine/menus/init_gender.asm +++ b/engine/menus/init_gender.asm @@ -1,4 +1,4 @@ -InitCrystalData: ; 48000 +InitCrystalData: ld a, $1 ld [wd474], a xor a @@ -18,11 +18,10 @@ InitCrystalData: ; 48000 res 1, a ld [wd479], a ret -; 4802f INCLUDE "mobile/mobile_12.asm" -InitGender: ; 48dcb (12:4dcb) +InitGender: call InitGenderScreen call LoadGenderScreenPal call LoadGenderScreenLightBlueTile @@ -41,7 +40,6 @@ InitGender: ; 48dcb (12:4dcb) ld c, 10 call DelayFrames ret -; 48dfc (12:4dfc) .MenuHeader: ; 0x48dfc db MENU_BACKUP_TILES ; flags @@ -63,7 +61,7 @@ TextJump_AreYouABoyOrAreYouAGirl: ; 0x48e0f db "@" ; 0x48e14 -InitGenderScreen: ; 48e14 (12:4e14) +InitGenderScreen: ld a, $10 ld [wMusicFade], a ld a, MUSIC_NONE @@ -85,7 +83,7 @@ InitGenderScreen: ; 48e14 (12:4e14) call ByteFill ret -LoadGenderScreenPal: ; 48e47 (12:4e47) +LoadGenderScreenPal: ld hl, .Palette ld de, wBGPals1 ld bc, 1 palettes @@ -93,19 +91,16 @@ LoadGenderScreenPal: ; 48e47 (12:4e47) call FarCopyWRAM farcall ApplyPals ret -; 48e5c (12:4e5c) -.Palette: ; 48e5c +.Palette: INCLUDE "gfx/new_game/gender_screen.pal" -; 48e64 -LoadGenderScreenLightBlueTile: ; 48e64 (12:4e64) +LoadGenderScreenLightBlueTile: ld de, .LightBlueTile ld hl, vTiles2 tile $00 lb bc, BANK(.LightBlueTile), 1 call Get2bpp ret -; 48e71 (12:4e71) -.LightBlueTile: ; 48e71 +.LightBlueTile: INCBIN "gfx/new_game/gender_screen.2bpp" diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm index af6e0c09e37..87334b25e7f 100644 --- a/engine/menus/intro_menu.asm +++ b/engine/menus/intro_menu.asm @@ -1,4 +1,4 @@ -_MainMenu: ; 5ae8 +_MainMenu: ld de, MUSIC_NONE call PlayMusic call DelayFrame @@ -8,13 +8,11 @@ _MainMenu: ; 5ae8 call PlayMusic farcall MainMenu jp StartTitleScreen -; 5b04 ; unused ret -; 5b05 -PrintDayOfWeek: ; 5b05 +PrintDayOfWeek: push de ld hl, .Days ld a, b @@ -28,9 +26,8 @@ PrintDayOfWeek: ; 5b05 ld de, .Day call PlaceString ret -; 5b1c -.Days: ; 5b1c +.Days: db "SUN@" db "MON@" db "TUES@" @@ -38,13 +35,11 @@ PrintDayOfWeek: ; 5b05 db "THURS@" db "FRI@" db "SATUR@" -; 5b40 -.Day: ; 5b40 +.Day: db "DAY@" -; 5b44 -NewGame_ClearTileMapEtc: ; 5b44 +NewGame_ClearTileMapEtc: xor a ld [hMapAnims], a call ClearTileMap @@ -52,21 +47,18 @@ NewGame_ClearTileMapEtc: ; 5b44 call LoadStandardFont call ClearWindowData ret -; 5b54 -MysteryGift: ; 5b54 +MysteryGift: call UpdateTime farcall DoMysteryGiftIfDayHasPassed farcall DoMysteryGift ret -; 5b64 -OptionsMenu: ; 5b64 +OptionsMenu: farcall _OptionsMenu ret -; 5b6b -NewGame: ; 5b6b +NewGame: xor a ld [wMonStatusFlags], a call ResetWRAM @@ -83,9 +75,8 @@ NewGame: ; 5b6b ld a, MAPSETUP_WARP ld [hMapEntryMethod], a jp FinishContinueFunction -; 5b8f -AreYouABoyOrAreYouAGirl: ; 5b8f +AreYouABoyOrAreYouAGirl: farcall Mobile_AlwaysReturnNotCarry ; some mobile stuff jr c, .ok farcall InitGender @@ -95,16 +86,14 @@ AreYouABoyOrAreYouAGirl: ; 5b8f ld c, 0 farcall InitMobileProfile ; mobile ret -; 5ba7 -ResetWRAM: ; 5ba7 +ResetWRAM: xor a ld [hBGMapMode], a call _ResetWRAM ret -; 5bae -_ResetWRAM: ; 5bae +_ResetWRAM: ld hl, wVirtualOAM ld bc, wOptions - wVirtualOAM @@ -228,18 +217,16 @@ endc call ResetGameTime ret -; 5ca1 -.InitList: ; 5ca1 +.InitList: ; Loads 0 in the count and -1 in the first item or mon slot. xor a ld [hli], a dec a ld [hl], a ret -; 5ca6 -SetDefaultBoxNames: ; 5ca6 +SetDefaultBoxNames: ld hl, wBoxNames ld c, 0 .loop @@ -270,9 +257,8 @@ SetDefaultBoxNames: ; 5ca6 .Box: db "BOX@" -; 5cd3 -InitializeMagikarpHouse: ; 5cd3 +InitializeMagikarpHouse: ld hl, wBestMagikarpLengthFeet ld a, $3 ld [hli], a @@ -281,13 +267,11 @@ InitializeMagikarpHouse: ; 5cd3 ld de, .Ralph call CopyName2 ret -; 5ce3 -.Ralph: ; 5ce3 +.Ralph: db "RALPH@" -; 5ce9 -InitializeNPCNames: ; 5ce9 +InitializeNPCNames: ld hl, .Rival ld de, wRivalName call .Copy @@ -312,16 +296,14 @@ InitializeNPCNames: ; 5ce9 .Red: db "RED@" .Green: db "GREEN@" .Mom: db "MOM@" -; 5d23 -InitializeWorld: ; 5d23 +InitializeWorld: call ShrinkPlayer farcall SpawnPlayer farcall _InitializeStartDay ret -; 5d33 -LoadOrRegenerateLuckyIDNumber: ; 5d33 +LoadOrRegenerateLuckyIDNumber: ld a, BANK(sLuckyIDNumber) call GetSRAMBank ld a, [wCurDay] @@ -346,9 +328,8 @@ LoadOrRegenerateLuckyIDNumber: ; 5d33 ld [wLuckyIDNumber + 1], a ld [sLuckyIDNumber + 1], a jp CloseSRAM -; 5d65 -Continue: ; 5d65 +Continue: farcall TryLoadSaveFile jr c, .FailToLoad farcall _LoadData @@ -400,22 +381,19 @@ Continue: ; 5d65 ld [wDefaultSpawnpoint], a call PostCreditsSpawn jp FinishContinueFunction -; 5de2 -SpawnAfterRed: ; 5de2 +SpawnAfterRed: ld a, SPAWN_MT_SILVER ld [wDefaultSpawnpoint], a -; 5de7 -PostCreditsSpawn: ; 5de7 +PostCreditsSpawn: xor a ld [wSpawnAfterChampion], a ld a, MAPSETUP_WARP ld [hMapEntryMethod], a ret -; 5df0 -Continue_MobileAdapterMenu: ; 5df0 +Continue_MobileAdapterMenu: farcall Mobile_AlwaysReturnNotCarry ; mobile check ret nc @@ -444,9 +422,8 @@ Continue_MobileAdapterMenu: ; 5df0 ld c, 35 call DelayFrames ret -; 5e34 -ConfirmContinue: ; 5e34 +ConfirmContinue: .loop call DelayFrame call GetJoypad @@ -460,9 +437,8 @@ ConfirmContinue: ; 5e34 .PressA: ret -; 5e48 -Continue_CheckRTC_RestartClock: ; 5e48 +Continue_CheckRTC_RestartClock: call CheckRTCStatus and %10000000 ; Day count exceeded 16383 jr z, .pass @@ -476,9 +452,8 @@ Continue_CheckRTC_RestartClock: ; 5e48 .pass xor a ret -; 5e5d -FinishContinueFunction: ; 5e5d +FinishContinueFunction: .loop xor a ld [wDontPlayMapMusicOnReload], a @@ -497,9 +472,8 @@ FinishContinueFunction: ; 5e5d .AfterRed: call SpawnAfterRed jr .loop -; 5e85 -DisplaySaveInfoOnContinue: ; 5e85 +DisplaySaveInfoOnContinue: call CheckRTCStatus and %10000000 jr z, .clock_ok @@ -511,32 +485,28 @@ DisplaySaveInfoOnContinue: ; 5e85 lb de, 4, 8 call DisplayNormalContinueData ret -; 5e9a -DisplaySaveInfoOnSave: ; 5e9a +DisplaySaveInfoOnSave: lb de, 4, 0 jr DisplayNormalContinueData -; 5e9f -DisplayNormalContinueData: ; 5e9f +DisplayNormalContinueData: call Continue_LoadMenuHeader call Continue_DisplayBadgesDexPlayerName call Continue_PrintGameTime call LoadFontsExtra call UpdateSprites ret -; 5eaf -DisplayContinueDataWithRTCError: ; 5eaf +DisplayContinueDataWithRTCError: call Continue_LoadMenuHeader call Continue_DisplayBadgesDexPlayerName call Continue_UnknownGameTime call LoadFontsExtra call UpdateSprites ret -; 5ebf -Continue_LoadMenuHeader: ; 5ebf +Continue_LoadMenuHeader: xor a ld [hBGMapMode], a ld hl, .MenuHeader_Dex @@ -550,42 +520,37 @@ Continue_LoadMenuHeader: ; 5ebf call MenuBox call PlaceVerticalMenuItems ret -; 5ed9 -.MenuHeader_Dex: ; 5ed9 +.MenuHeader_Dex: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 15, 9 dw .MenuData_Dex db 1 ; default option -; 5ee1 -.MenuData_Dex: ; 5ee1 +.MenuData_Dex: db 0 ; flags db 4 ; items db "PLAYER@" db "BADGES@" db "#DEX@" db "TIME@" -; 5efb -.MenuHeader_NoDex: ; 5efb +.MenuHeader_NoDex: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 15, 9 dw .MenuData_NoDex db 1 ; default option -; 5f03 -.MenuData_NoDex: ; 5f03 +.MenuData_NoDex: db 0 ; flags db 4 ; items db "PLAYER @" db "BADGES@" db " @" db "TIME@" -; 5f1c -Continue_DisplayBadgesDexPlayerName: ; 5f1c +Continue_DisplayBadgesDexPlayerName: call MenuBoxCoord2Tile push hl decoord 13, 4, 0 @@ -607,16 +572,14 @@ Continue_DisplayBadgesDexPlayerName: ; 5f1c .Player: db "@" -; 5f40 -Continue_PrintGameTime: ; 5f40 +Continue_PrintGameTime: decoord 9, 8, 0 add hl, de call Continue_DisplayGameTime ret -; 5f48 -Continue_UnknownGameTime: ; 5f48 +Continue_UnknownGameTime: decoord 9, 8, 0 add hl, de ld de, .three_question_marks @@ -625,9 +588,8 @@ Continue_UnknownGameTime: ; 5f48 .three_question_marks db " ???@" -; 5f58 -Continue_DisplayBadgeCount: ; 5f58 +Continue_DisplayBadgeCount: push hl ld hl, wJohtoBadges ld b, 2 @@ -636,9 +598,8 @@ Continue_DisplayBadgeCount: ; 5f58 ld de, wd265 lb bc, 1, 2 jp PrintNum -; 5f6b -Continue_DisplayPokedexNumCaught: ; 5f6b +Continue_DisplayPokedexNumCaught: ld a, [wStatusFlags] bit STATUSFLAGS_POKEDEX_F, a ret z @@ -654,9 +615,8 @@ endc ld de, wd265 lb bc, 1, 3 jp PrintNum -; 5f84 -Continue_DisplayGameTime: ; 5f84 +Continue_DisplayGameTime: ld de, wGameTimeHours lb bc, 2, 3 call PrintNum @@ -665,7 +625,6 @@ Continue_DisplayGameTime: ; 5f84 ld de, wGameTimeMinutes lb bc, PRINTNUM_LEADINGZEROS | 1, 2 jp PrintNum -; 5f99 OakSpeech: ; 0x5f99 @@ -823,7 +782,6 @@ NamePlayer: ; 0x6074 db "CHRIS@@@@@@" .Kris: db "KRIS@@@@@@@" -; 60e9 Unreferenced_Function60e9: call LoadMenuHeader @@ -833,9 +791,8 @@ Unreferenced_Function60e9: call CopyNameFromMenu call CloseWindow ret -; 60fa -StorePlayerName: ; 60fa +StorePlayerName: ld a, "@" ld bc, NAME_LENGTH ld hl, wPlayerName @@ -844,9 +801,8 @@ StorePlayerName: ; 60fa ld de, wStringBuffer2 call CopyName2 ret -; 610f -ShrinkPlayer: ; 610f +ShrinkPlayer: ld a, [hROMBank] push af @@ -898,9 +854,8 @@ ShrinkPlayer: ; 610f call RotateThreePalettesRight call ClearTileMap ret -; 616a -Intro_RotatePalettesLeftFrontpic: ; 616a +Intro_RotatePalettesLeftFrontpic: ld hl, IntroFadePalettes ld b, IntroFadePalettes.End - IntroFadePalettes .loop @@ -911,7 +866,6 @@ Intro_RotatePalettesLeftFrontpic: ; 616a dec b jr nz, .loop ret -; 617c IntroFadePalettes: ; 0x617c db %01010100 @@ -921,9 +875,8 @@ IntroFadePalettes: ; 0x617c db %11110100 db %11100100 .End -; 6182 -Intro_WipeInFrontpic: ; 6182 +Intro_WipeInFrontpic: ld a, $77 ld [hWX], a call DelayFrame @@ -937,9 +890,8 @@ Intro_WipeInFrontpic: ; 6182 ret z ld [hWX], a jr .loop -; 619c -Intro_PrepTrainerPic: ; 619c +Intro_PrepTrainerPic: ld de, vTiles2 farcall GetTrainerPic xor a @@ -948,9 +900,8 @@ Intro_PrepTrainerPic: ; 619c lb bc, 7, 7 predef PlaceGraphic ret -; 61b4 -ShrinkFrame: ; 61b4 +ShrinkFrame: ld de, vTiles2 ld c, 7 * 7 predef DecompressGet2bpp @@ -960,9 +911,8 @@ ShrinkFrame: ; 61b4 lb bc, 7, 7 predef PlaceGraphic ret -; 61cd -Intro_PlacePlayerSprite: ; 61cd +Intro_PlacePlayerSprite: farcall GetPlayerIcon ld c, $c @@ -998,24 +948,22 @@ Intro_PlacePlayerSprite: ; 61cd dec c jr nz, .loop ret -; 61fe -.sprites ; 61fe +.sprites db 4 ; y pxl, x pxl, tile offset db 9 * 8 + 4, 9 * 8, 0 db 9 * 8 + 4, 10 * 8, 1 db 10 * 8 + 4, 9 * 8, 2 db 10 * 8 + 4, 10 * 8, 3 -; 620b -CrystalIntroSequence: ; 620b +CrystalIntroSequence: callfar Copyright_GFPresents jr c, StartTitleScreen farcall CrystalIntro -StartTitleScreen: ; 6219 +StartTitleScreen: ld a, [rSVBK] push af ld a, BANK(wBGPals1) @@ -1062,7 +1010,6 @@ StartTitleScreen: ; 6219 ld h, [hl] ld l, a jp hl -; 626a .dw dw _MainMenu @@ -1070,15 +1017,13 @@ StartTitleScreen: ; 6219 dw CrystalIntroSequence dw CrystalIntroSequence dw ResetClock -; 6274 -.TitleScreen: ; 6274 +.TitleScreen: farcall _TitleScreen ret -; 627b -RunTitleScreen: ; 627b +RunTitleScreen: ld a, [wJumptableIndex] bit 7, a jr nz, .done_title @@ -1091,9 +1036,8 @@ RunTitleScreen: ; 627b .done_title scf ret -; 6292 -Unreferenced_Function6292: ; 6292 +Unreferenced_Function6292: ld a, [hVBlankCounter] and $7 ret nz @@ -1103,9 +1047,8 @@ Unreferenced_Function6292: ; 6292 ld bc, 2 * SCREEN_WIDTH call ByteFill ret -; 62a3 -TitleScreenScene: ; 62a3 +TitleScreenScene: ld e, a ld d, 0 ld hl, .scenes @@ -1115,23 +1058,20 @@ TitleScreenScene: ; 62a3 ld h, [hl] ld l, a jp hl -; 62af .scenes dw TitleScreenEntrance dw TitleScreenTimer dw TitleScreenMain dw TitleScreenEnd -; 62b7 .Unreferenced_NextScene: ld hl, wJumptableIndex inc [hl] ret -; 62bc -TitleScreenEntrance: ; 62bc +TitleScreenEntrance: ; Animate the logo: ; Move each line by 4 pixels until our count hits 0. @@ -1178,10 +1118,9 @@ TitleScreenEntrance: ; 62bc ld a, $88 ld [hWY], a ret -; 62f6 -TitleScreenTimer: ; 62f6 +TitleScreenTimer: ; Next scene ld hl, wJumptableIndex @@ -1194,9 +1133,8 @@ TitleScreenTimer: ; 62f6 inc hl ld [hl], d ret -; 6304 -TitleScreenMain: ; 6304 +TitleScreenMain: ; Run the timer down. ld hl, wTitleScreenTimer @@ -1296,9 +1234,8 @@ TitleScreenMain: ; 6304 ld hl, wJumptableIndex set 7, [hl] ret -; 6375 -TitleScreenEnd: ; 6375 +TitleScreenEnd: ; Wait until the music is done fading. @@ -1316,17 +1253,14 @@ TitleScreenEnd: ; 6375 ld hl, wJumptableIndex set 7, [hl] ret -; 6389 -DeleteSaveData: ; 6389 +DeleteSaveData: farcall _DeleteSaveData jp Init -; 6392 -ResetClock: ; 6392 +ResetClock: farcall _ResetClock jp Init -; 639b Unreferenced_Function639b: ; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here. @@ -1359,9 +1293,8 @@ Unreferenced_Function639b: ld a, SPRITE_ANIM_INDEX_GS_TITLE_TRAIL call _InitSpriteAnimStruct ret -; 63ca -.Data63ca: ; 63ca +.Data63ca: ; frame 0 y, x; frame 1 y, x db 11 * 8 + 4, 10 * 8, 0 * 8, 0 * 8 db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 11 * 8 @@ -1369,9 +1302,8 @@ Unreferenced_Function639b: db 11 * 8 + 4, 17 * 8, 11 * 8 + 4, 15 * 8 db 0 * 8, 0 * 8, 11 * 8 + 4, 15 * 8 db 0 * 8, 0 * 8, 11 * 8 + 4, 11 * 8 -; 63e2 -Copyright: ; 63e2 +Copyright: call ClearTileMap call LoadFontsExtra ld de, CopyrightGFX @@ -1381,9 +1313,8 @@ Copyright: ; 63e2 hlcoord 2, 7 ld de, CopyrightString jp PlaceString -; 63fd -CopyrightString: ; 63fd +CopyrightString: ; ©1995-2001 Nintendo db $60, $61, $62, $63, $64, $65, $66 db $67, $68, $69, $6a, $6b, $6c @@ -1397,9 +1328,8 @@ CopyrightString: ; 63fd db $73, $74, $75, $76, $77, $78, $79, $7a, $7b, $7c db "@" -; 642e -GameInit:: ; 642e +GameInit:: farcall TryLoadSaveData call ClearWindowData call ClearBGPalettes @@ -1415,4 +1345,3 @@ GameInit:: ; 642e ld [hWY], a call WaitBGMap jp CrystalIntroSequence -; 6454 diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm index d83ce873bb3..dc57fe9719e 100644 --- a/engine/menus/main_menu.asm +++ b/engine/menus/main_menu.asm @@ -1,8 +1,7 @@ -GFX_49c0c: ; 49c0c +GFX_49c0c: INCBIN "gfx/unknown/049c0c.2bpp" -; 49cdc -MainMenu: ; 49cdc +MainMenu: xor a ld [wDisableTextAcceleration], a call Function49ed0 @@ -27,24 +26,21 @@ MainMenu: ; 49cdc .quit ret -; 49d14 -.MenuHeader: ; 49d14 +.MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 16, 7 dw .MenuData db 1 ; default option -; 49d1c -.MenuData: ; 49d1c +.MenuData: db STATICMENU_CURSOR ; flags db 0 ; items dw MainMenuItems dw PlaceMenuStrings dw .Strings -; 49d20 -.Strings: ; 49d24 +.Strings: db "CONTINUE@" db "NEW GAME@" db "OPTION@" @@ -145,7 +141,7 @@ StudiumMenu: ; 0x49d9e db -1 -MainMenu_GetWhichMenu: ; 49da4 +MainMenu_GetWhichMenu: nop nop nop @@ -193,9 +189,8 @@ MainMenu_GetWhichMenu: ; 49da4 .ok4 ld a, $6 ; Mystery Gift ret -; 49de4 -MainMenuJoypadLoop: ; 49de4 +MainMenuJoypadLoop: call SetUpMenu .loop call MainMenu_PrintCurrentTimeAndDay @@ -218,9 +213,8 @@ MainMenuJoypadLoop: ; 49de4 .b_button scf ret -; 49e09 -MainMenu_PrintCurrentTimeAndDay: ; 49e09 +MainMenu_PrintCurrentTimeAndDay: ld a, [wSaveFileExists] and a ret z @@ -237,10 +231,9 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09 ld a, $1 ld [hBGMapMode], a ret -; 49e27 -.PlaceBox: ; 49e27 +.PlaceBox: call CheckRTCStatus and $80 jr nz, .TimeFail @@ -253,10 +246,9 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09 .TimeFail: call SpeechTextBox ret -; 49e3d -.PlaceTime: ; 49e3d +.PlaceTime: ld a, [wSaveFileExists] and a ret z @@ -282,26 +274,22 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09 .min ; unused db "min.@" -; 49e75 -.PrintTimeNotSet: ; 49e75 +.PrintTimeNotSet: hlcoord 1, 14 ld de, .TimeNotSet call PlaceString ret -; 49e7f -.TimeNotSet: ; 49e7f +.TimeNotSet: db "TIME NOT SET@" -; 49e8c -.UnusedText: ; 49e8c +.UnusedText: ; Clock time unknown text_jump UnknownText_0x1c5182 db "@" -; 49e91 -.PlaceCurrentDay: ; 49e91 +.PlaceCurrentDay: push de ld hl, .Days ld a, b @@ -315,7 +303,6 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09 ld de, .Day call PlaceString ret -; 49ea8 .Days: db "SUN@" @@ -327,9 +314,8 @@ MainMenu_PrintCurrentTimeAndDay: ; 49e09 db "SATUR@" .Day: db "DAY@" -; 49ed0 -Function49ed0: ; 49ed0 +Function49ed0: xor a ld [hMapAnims], a call ClearTileMap @@ -337,25 +323,20 @@ Function49ed0: ; 49ed0 call LoadStandardFont call ClearWindowData ret -; 49ee0 -MainMenu_NewGame: ; 49ee0 +MainMenu_NewGame: farcall NewGame ret -; 49ee7 -MainMenu_Options: ; 49ee7 +MainMenu_Options: farcall OptionsMenu ret -; 49eee -MainMenu_Continue: ; 49eee +MainMenu_Continue: farcall Continue ret -; 49ef5 -MainMenu_MysteryGift: ; 49ef5 +MainMenu_MysteryGift: farcall MysteryGift ret -; 49efc diff --git a/engine/menus/menu.asm b/engine/menus/menu.asm index 51de2e1a4d6..5f2864ea358 100644 --- a/engine/menus/menu.asm +++ b/engine/menus/menu.asm @@ -1,4 +1,4 @@ -_2DMenu_:: ; 2400e +_2DMenu_:: ld hl, CopyMenuData ld a, [wMenuData_2DMenuItemStringsBank] rst FarCall @@ -8,9 +8,8 @@ _2DMenu_:: ; 2400e call ApplyTilemap call Get2DMenuSelection ret -; 24022 -_InterpretBattleMenu:: ; 24022 +_InterpretBattleMenu:: ld hl, CopyMenuData ld a, [wMenuData_2DMenuItemStringsBank] rst FarCall @@ -21,9 +20,8 @@ _InterpretBattleMenu:: ; 24022 call ApplyTilemap call Get2DMenuSelection ret -; 2403c -_InterpretMobileMenu:: ; 2403c +_InterpretMobileMenu:: ld hl, CopyMenuData ld a, [wMenuData_2DMenuItemStringsBank] rst FarCall @@ -56,23 +54,21 @@ _InterpretMobileMenu:: ; 2403c ld [wMenuCursorBuffer], a and a ret -; 24085 -Draw2DMenu: ; 24085 +Draw2DMenu: xor a ld [hBGMapMode], a call MenuBox call Place2DMenuItemStrings ret -; 2408f -Get2DMenuSelection: ; 2408f +Get2DMenuSelection: call Init2DMenuCursorPosition call StaticMenuJoypad call MenuClickSound -Mobile_GetMenuSelection: ; 24098 +Mobile_GetMenuSelection: ld a, [wMenuDataFlags] bit 1, a jr z, .skip @@ -108,22 +104,19 @@ Mobile_GetMenuSelection: ; 24098 .quit2 scf ret -; 240cd -Get2DMenuNumberOfColumns: ; 240cd +Get2DMenuNumberOfColumns: ld a, [wMenuData_2DMenuDimensions] and $f ret -; 240d3 -Get2DMenuNumberOfRows: ; 240d3 +Get2DMenuNumberOfRows: ld a, [wMenuData_2DMenuDimensions] swap a and $f ret -; 240db -Place2DMenuItemStrings: ; 240db +Place2DMenuItemStrings: ld hl, wMenuData_2DMenuItemStringsAddr ld e, [hl] inc hl @@ -164,10 +157,9 @@ Place2DMenuItemStrings: ; 240db ld a, [wMenuData_2DMenuFunctionBank] rst FarCall ret -; 2411a -Init2DMenuCursorPosition: ; 2411a (9:411a) +Init2DMenuCursorPosition: call GetMenuTextStartCoord ld a, b ld [w2DMenuCursorInitY], a @@ -222,9 +214,8 @@ Init2DMenuCursorPosition: ; 2411a (9:411a) ld [wCursorCurrentTile], a ld [wCursorCurrentTile + 1], a ret -; 24179 -.InitFlags_a: ; 24179 +.InitFlags_a: xor a ld hl, w2DMenuFlags1 ld [hli], a @@ -235,16 +226,14 @@ Init2DMenuCursorPosition: ; 2411a (9:411a) set 5, [hl] set 4, [hl] ret -; 2418a -.InitFlags_b: ; 2418a +.InitFlags_b: ld a, [wMenuData_2DMenuSpacing] or $20 ld [w2DMenuCursorOffsets], a ret -; 24193 -.InitFlags_c: ; 24193 +.InitFlags_c: ld hl, wMenuDataFlags ld a, A_BUTTON bit 0, [hl] @@ -257,12 +246,11 @@ Init2DMenuCursorPosition: ; 2411a (9:411a) .skip2 ld [wMenuJoypadFilter], a ret -; 241a8 -_StaticMenuJoypad:: ; 241a8 +_StaticMenuJoypad:: call Place2DMenuCursor -_ScrollingMenuJoypad:: ; 241ab +_ScrollingMenuJoypad:: ld hl, w2DMenuFlags2 res 7, [hl] ld a, [hBGMapMode] @@ -271,9 +259,8 @@ _ScrollingMenuJoypad:: ; 241ab pop af ld [hBGMapMode], a ret -; 241ba -MobileMenuJoypad: ; 241ba +MobileMenuJoypad: ld hl, w2DMenuFlags2 res 7, [hl] ld a, [hBGMapMode] @@ -288,10 +275,9 @@ MobileMenuJoypad: ; 241ba call GetMenuJoypad ld c, a ret -; 241d5 -Unreferenced_Function241d5: ; 241d5 +Unreferenced_Function241d5: call Place2DMenuCursor .loop call Move2DMenuCursor @@ -328,10 +314,9 @@ Unreferenced_Function241d5: ; 241d5 jr z, .loop2 and a ret -; 24216 -MenuJoypadLoop: ; 24216 +MenuJoypadLoop: .loop call Move2DMenuCursor call .BGMap_OAM @@ -350,9 +335,8 @@ MenuJoypadLoop: ; 24216 .done ret -; 24238 -.BGMap_OAM: ; 24238 +.BGMap_OAM: ld a, [hOAMUpdate] push af ld a, $1 @@ -363,9 +347,8 @@ MenuJoypadLoop: ; 24216 xor a ld [hBGMapMode], a ret -; 24249 -Do2DMenuRTCJoypad: ; 24249 +Do2DMenuRTCJoypad: .loopRTC call RTC call Menu_WasButtonPressed @@ -375,9 +358,8 @@ Do2DMenuRTCJoypad: ; 24249 jr z, .loopRTC and a ret -; 24259 -Menu_WasButtonPressed: ; 24259 +Menu_WasButtonPressed: ld a, [w2DMenuFlags1] bit 6, a jr z, .skip_to_joypad @@ -390,9 +372,8 @@ Menu_WasButtonPressed: ; 24259 ret z scf ret -; 24270 -_2DMenuInterpretJoypad: ; 24270 +_2DMenuInterpretJoypad: call GetMenuJoypad bit A_BUTTON_F, a jp nz, .a_b_start_select @@ -413,7 +394,7 @@ _2DMenuInterpretJoypad: ; 24270 and a ret -.set_bit_7 ; 24299 +.set_bit_7 ld hl, w2DMenuFlags2 set 7, [hl] scf @@ -512,14 +493,12 @@ _2DMenuInterpretJoypad: ; 24270 ld [hl], $1 xor a ret -; 24318 -.a_b_start_select ; 24318 +.a_b_start_select xor a ret -; 2431a -Move2DMenuCursor: ; 2431a +Move2DMenuCursor: ld hl, wCursorCurrentTile ld a, [hli] ld h, [hl] @@ -529,7 +508,7 @@ Move2DMenuCursor: ; 2431a jr nz, Place2DMenuCursor ld a, [wCursorOffCharacter] ld [hl], a -Place2DMenuCursor: ; 24329 +Place2DMenuCursor: ld a, [w2DMenuCursorInitY] ld b, a ld a, [w2DMenuCursorInitX] @@ -580,9 +559,8 @@ Place2DMenuCursor: ; 24329 ld a, h ld [wCursorCurrentTile + 1], a ret -; 24374 -_PushWindow:: ; 24374 +_PushWindow:: ld a, [rSVBK] push af ld a, BANK(wWindowStack) @@ -651,9 +629,8 @@ _PushWindow:: ; 24374 ld hl, wWindowStackSize inc [hl] ret -; 243cd -.copy ; 243cd +.copy call GetMenuBoxDims inc b inc c @@ -678,13 +655,11 @@ _PushWindow:: ; 24374 jr nz, .row ret -; 243e7 -.ret ; 243e7 +.ret ret -; 243e8 -_ExitMenu:: ; 243e8 +_ExitMenu:: xor a ld [hBGMapMode], a @@ -722,9 +697,8 @@ _ExitMenu:: ; 243e8 ld hl, wWindowStackSize dec [hl] ret -; 24423 -Unreferenced_Function24423: ; 24423 +Unreferenced_Function24423: ld a, [wVramState] bit 0, a ret z @@ -755,22 +729,19 @@ Unreferenced_Function24423: ; 24423 jr nz, .loop call CloseSRAM ret -; 2445d -Error_Cant_ExitMenu: ; 2445d +Error_Cant_ExitMenu: ld hl, .Text_NoWindowsAvailableForPopping call PrintText call WaitBGMap .InfiniteLoop: jr .InfiniteLoop -; 24468 -.Text_NoWindowsAvailableForPopping: ; 24468 +.Text_NoWindowsAvailableForPopping: text_jump UnknownText_0x1c46b7 db "@" -; 2446d -_InitVerticalMenuCursor:: ; 2446d +_InitVerticalMenuCursor:: ld a, [wMenuDataFlags] ld b, a ld hl, w2DMenuCursorInitY @@ -838,4 +809,3 @@ _InitVerticalMenuCursor:: ; 2446d ld [hli], a ld [hli], a ret -; 244c3 diff --git a/engine/menus/menu_2.asm b/engine/menus/menu_2.asm index 16cce5348aa..b4a9ef95a4d 100644 --- a/engine/menus/menu_2.asm +++ b/engine/menus/menu_2.asm @@ -27,22 +27,22 @@ PlaceMenuItemQuantity: ; 0x24ac3 .done ret -PlaceMoneyTopRight: ; 24ae8 +PlaceMoneyTopRight: ld hl, MenuHeader_0x24b15 call CopyMenuHeader jr PlaceMoneyTextBox -PlaceMoneyBottomLeft: ; 24af0 +PlaceMoneyBottomLeft: ld hl, MenuHeader_0x24b1d call CopyMenuHeader jr PlaceMoneyTextBox -PlaceMoneyAtTopLeftOfTextbox: ; 24af8 +PlaceMoneyAtTopLeftOfTextbox: ld hl, MenuHeader_0x24b15 lb de, 0, 11 call OffsetMenuHeader -PlaceMoneyTextBox: ; 24b01 +PlaceMoneyTextBox: call MenuBox call MenuBoxCoord2Tile ld de, SCREEN_WIDTH + 1 @@ -64,7 +64,7 @@ MenuHeader_0x24b1d: ; 0x24b1d dw NULL db 1 ; default option -DisplayCoinCaseBalance: ; 24b25 +DisplayCoinCaseBalance: ; Place a text box of size 1x7 at 11, 0. hlcoord 11, 0 ld b, 1 @@ -82,7 +82,7 @@ DisplayCoinCaseBalance: ; 24b25 call PrintNum ret -DisplayMoneyAndCoinBalance: ; 24b4e +DisplayMoneyAndCoinBalance: hlcoord 5, 0 ld b, 3 ld c, 13 @@ -103,14 +103,14 @@ DisplayMoneyAndCoinBalance: ; 24b4e call PrintNum ret -MoneyString: ; 24b83 +MoneyString: db "MONEY@" -CoinString: ; 24b89 +CoinString: db "COIN@" -ShowMoney_TerminatorString: ; 24b8e +ShowMoney_TerminatorString: db "@" -Unreferenced_Function24b8f: ; 24b8f +Unreferenced_Function24b8f: ; related to safari? ld hl, wOptions ld a, [hl] @@ -138,19 +138,19 @@ Unreferenced_Function24b8f: ; 24b8f ld [wOptions], a ret -.slash_500 ; 24bcf +.slash_500 db "/500@" -.booru_ko ; 24bd4 +.booru_ko db "ボール   こ@" -StartMenu_DrawBugContestStatusBox: ; 24bdc +StartMenu_DrawBugContestStatusBox: hlcoord 0, 0 ld b, 5 ld c, 17 call TextBox ret -StartMenu_PrintBugContestStatus: ; 24be7 +StartMenu_PrintBugContestStatus: ld hl, wOptions ld a, [hl] push af @@ -194,18 +194,18 @@ StartMenu_PrintBugContestStatus: ; 24be7 ld [wOptions], a ret -.Balls_JP: ; 24c43 +.Balls_JP: db "ボール   こ@" -.CAUGHT: ; 24c4b +.CAUGHT: db "CAUGHT@" -.Balls_EN: ; 24c52 +.Balls_EN: db "BALLS:@" -.None: ; 24c59 +.None: db "None@" -.LEVEL: ; 24c5e +.LEVEL: db "LEVEL@" -FindApricornsInBag: ; 24c64 +FindApricornsInBag: ; Checks the bag for Apricorns. ld hl, wBuffer1 xor a @@ -239,7 +239,7 @@ FindApricornsInBag: ; 24c64 scf ret -.addtobuffer ; 24c94 +.addtobuffer push hl ld hl, wBuffer1 inc [hl] diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm index a958e10eb2d..fb42b1350ed 100644 --- a/engine/menus/naming_screen.asm +++ b/engine/menus/naming_screen.asm @@ -12,7 +12,7 @@ _NamingScreen: ; 0x116b7 ; 0x116c1 -NamingScreen: ; 116c1 +NamingScreen: ld hl, wNamingScreenDestinationPointer ld [hl], e inc hl @@ -45,9 +45,8 @@ NamingScreen: ; 116c1 call ClearJoypad ret -; 116f8 -.SetUpNamingScreen: ; 116f8 +.SetUpNamingScreen: call ClearBGPalettes ld b, SCGB_DIPLOMA call GetSGBLayout @@ -63,9 +62,8 @@ NamingScreen: ; 116c1 call NamingScreen_InitNameEntry ret -; 1171d -.GetNamingScreenSetup: ; 1171d +.GetNamingScreenSetup: ld a, [wNamingScreenType] and 7 ld e, a @@ -78,9 +76,8 @@ NamingScreen: ; 116c1 ld l, a jp hl -; 1172e -.Jumptable: ; 1172e (4:572e) +.Jumptable: dw .Pokemon dw .Player dw .Rival @@ -90,7 +87,7 @@ NamingScreen: ; 116c1 dw .Pokemon dw .Pokemon -.Pokemon: ; 1173e (4:573e) +.Pokemon: ld a, [wCurPartySpecies] ld [wd265], a ld hl, LoadMenuMonIcon @@ -121,15 +118,13 @@ NamingScreen: ; 116c1 call .StoreMonIconParams ret -; 11780 (4:5780) -.NicknameStrings: ; 11780 +.NicknameStrings: db "'S@" db "NICKNAME?@" -; 1178d -.Player: ; 1178d (4:578d) +.Player: farcall GetPlayerIcon call .LoadSprite hlcoord 5, 2 @@ -138,14 +133,12 @@ NamingScreen: ; 116c1 call .StoreSpriteIconParams ret -; 117a3 (4:57a3) -.PlayerNameString: ; 117a3 +.PlayerNameString: db "YOUR NAME?@" -; 117ae -.Rival: ; 117ae (4:57ae) +.Rival: ld de, SilverSpriteGFX ld b, BANK(SilverSpriteGFX) call .LoadSprite @@ -155,14 +148,12 @@ NamingScreen: ; 116c1 call .StoreSpriteIconParams ret -; 117c3 (4:57c3) -.RivalNameString: ; 117c3 +.RivalNameString: db "RIVAL'S NAME?@" -; 117d1 -.Mom: ; 117d1 (4:57d1) +.Mom: ld de, MomSpriteGFX ld b, BANK(MomSpriteGFX) call .LoadSprite @@ -172,14 +163,12 @@ NamingScreen: ; 116c1 call .StoreSpriteIconParams ret -; 117e6 (4:57e6) -.MomNameString: ; 117e6 +.MomNameString: db "MOTHER'S NAME?@" -; 117f5 -.Box: ; 117f5 (4:57f5) +.Box: ld de, PokeBallSpriteGFX ld hl, vTiles0 tile $00 lb bc, BANK(PokeBallSpriteGFX), 4 @@ -200,28 +189,24 @@ NamingScreen: ; 116c1 call .StoreBoxIconParams ret -; 11822 (4:5822) -.BoxNameString: ; 11822 +.BoxNameString: db "BOX NAME?@" -; 1182c -.Tomodachi: ; 1182c (4:582c) +.Tomodachi: hlcoord 3, 2 ld de, .oTomodachi_no_namae_sutoringu call PlaceString call .StoreSpriteIconParams ret -; 11839 (4:5839) -.oTomodachi_no_namae_sutoringu ; 11839 +.oTomodachi_no_namae_sutoringu db "おともだち の なまえは?@" -; 11847 -.LoadSprite: ; 11847 (4:5847) +.LoadSprite: push de ld hl, vTiles0 tile $00 ld c, $4 @@ -253,22 +238,22 @@ NamingScreen: ; 116c1 call _InitSpriteAnimStruct ret -.StoreMonIconParams: ; 1187b (4:587b) +.StoreMonIconParams: ld a, MON_NAME_LENGTH - 1 hlcoord 5, 6 jr .StoreParams -.StoreSpriteIconParams: ; 11882 (4:5882) +.StoreSpriteIconParams: ld a, PLAYER_NAME_LENGTH - 1 hlcoord 5, 6 jr .StoreParams -.StoreBoxIconParams: ; 11889 (4:5889) +.StoreBoxIconParams: ld a, BOX_NAME_LENGTH - 1 hlcoord 5, 4 jr .StoreParams -.StoreParams: ; 11890 (4:5890) +.StoreParams: ld [wNamingScreenMaxNameLength], a ld a, l ld [wNamingScreenStringEntryCoord], a @@ -276,7 +261,7 @@ NamingScreen: ; 116c1 ld [wNamingScreenStringEntryCoord + 1], a ret -NamingScreen_IsTargetBox: ; 1189c +NamingScreen_IsTargetBox: push bc push af ld a, [wNamingScreenType] @@ -287,9 +272,8 @@ NamingScreen_IsTargetBox: ; 1189c pop bc ret -; 118a8 -NamingScreen_InitText: ; 118a8 +NamingScreen_InitText: call WaitTop hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT @@ -304,7 +288,7 @@ NamingScreen_InitText: ; 118a8 .not_box call ClearBox ld de, NameInputUpper -NamingScreen_ApplyTextInputMode: ; 118ca +NamingScreen_ApplyTextInputMode: call NamingScreen_IsTargetBox jr nz, .not_box ld hl, BoxNameInputLower - NameInputLower @@ -350,9 +334,8 @@ NamingScreen_ApplyTextInputMode: ; 118ca jr nz, .row ret -; 11915 -NamingScreenJoypadLoop: ; 11915 +NamingScreenJoypadLoop: call JoyTextDelay ld a, [wJumptableIndex] bit 7, a @@ -373,9 +356,8 @@ NamingScreenJoypadLoop: ; 11915 scf ret -; 11940 -.UpdateStringEntry: ; 11940 +.UpdateStringEntry: xor a ld [hBGMapMode], a hlcoord 1, 5 @@ -399,9 +381,8 @@ NamingScreenJoypadLoop: ; 11915 ld [hBGMapMode], a ret -; 11968 -.RunJumptable: ; 11968 +.RunJumptable: ld a, [wJumptableIndex] ld e, a ld d, $0 @@ -413,13 +394,12 @@ NamingScreenJoypadLoop: ; 11915 ld l, a jp hl -; 11977 -.Jumptable: ; 11977 (4:5977) +.Jumptable: dw .InitCursor dw .ReadButtons -.InitCursor: ; 1197b (4:597b) +.InitCursor: depixel 10, 3 call NamingScreen_IsTargetBox jr nz, .got_cursor_position @@ -441,7 +421,7 @@ NamingScreenJoypadLoop: ; 11915 inc [hl] ret -.ReadButtons: ; 119a1 (4:59a1) +.ReadButtons: ld hl, hJoyPressed ; $ffa7 ld a, [hl] and A_BUTTON @@ -510,13 +490,13 @@ NamingScreenJoypadLoop: ; 11915 call NamingScreen_ApplyTextInputMode ret -.GetCursorPosition: ; 11a0b (4:5a0b) +.GetCursorPosition: ld hl, wNamingScreenCursorObjectPointer ld c, [hl] inc hl ld b, [hl] -NamingScreen_GetCursorPosition: ; 11a11 (4:5a11) +NamingScreen_GetCursorPosition: ld hl, SPRITEANIMSTRUCT_0D add hl, bc ld a, [hl] @@ -551,7 +531,7 @@ NamingScreen_GetCursorPosition: ; 11a11 (4:5a11) xor a ret -NamingScreen_AnimateCursor: ; 11a3b (4:5a3b) +NamingScreen_AnimateCursor: call .GetDPad ld hl, SPRITEANIMSTRUCT_0D add hl, bc @@ -590,17 +570,15 @@ NamingScreen_AnimateCursor: ; 11a3b (4:5a3b) ld [hl], a ret -; 11a79 (4:5a79) -.LetterEntries: ; 11a79 +.LetterEntries: db $00, $10, $20, $30, $40, $50, $60, $70, $80 -.CaseDelEnd: ; 11a82 +.CaseDelEnd: db $00, $00, $00, $30, $30, $30, $60, $60, $60 -; 11a8b -.GetDPad: ; 11a8b (4:5a8b) +.GetDPad: ld hl, hJoyLast ld a, [hl] and D_UP @@ -713,9 +691,9 @@ NamingScreen_AnimateCursor: ; 11a3b (4:5a3b) inc [hl] ret -NamingScreen_TryAddCharacter: ; 11b14 (4:5b14) +NamingScreen_TryAddCharacter: ld a, [wNamingScreenLastCharacter] ; lost -MailComposition_TryAddCharacter: ; 11b17 (4:5b17) +MailComposition_TryAddCharacter: ld a, [wNamingScreenMaxNameLength] ld c, a ld a, [wNamingScreenCurrNameLength] @@ -724,11 +702,11 @@ MailComposition_TryAddCharacter: ; 11b17 (4:5b17) ld a, [wNamingScreenLastCharacter] -NamingScreen_LoadNextCharacter: ; 11b23 +NamingScreen_LoadNextCharacter: call NamingScreen_GetTextCursorPosition ld [hl], a -NamingScreen_AdvanceCursor_CheckEndOfString: ; 11b27 +NamingScreen_AdvanceCursor_CheckEndOfString: ld hl, wNamingScreenCurrNameLength inc [hl] call NamingScreen_GetTextCursorPosition @@ -743,7 +721,6 @@ NamingScreen_AdvanceCursor_CheckEndOfString: ; 11b27 scf ret -; 11b39 (4:5b39) ; unused ld a, [wNamingScreenCurrNameLength] @@ -769,13 +746,11 @@ NamingScreen_AdvanceCursor_CheckEndOfString: ; 11b27 ld a, [hl] jr NamingScreen_LoadNextCharacter -; 11b56 INCLUDE "data/text/unused_dakutens.asm" -; 11bbc -NamingScreen_DeleteCharacter: ; 11bbc (4:5bbc) +NamingScreen_DeleteCharacter: ld hl, wNamingScreenCurrNameLength ld a, [hl] and a @@ -790,7 +765,7 @@ NamingScreen_DeleteCharacter: ; 11bbc (4:5bbc) ld [hl], NAMINGSCREEN_MIDDLELINE ret -NamingScreen_GetTextCursorPosition: ; 11bd0 (4:5bd0) +NamingScreen_GetTextCursorPosition: push af ld hl, wNamingScreenDestinationPointer ld a, [hli] @@ -803,9 +778,8 @@ NamingScreen_GetTextCursorPosition: ; 11bd0 (4:5bd0) pop af ret -; 11be0 -NamingScreen_InitNameEntry: ; 11be0 +NamingScreen_InitNameEntry: ; load NAMINGSCREEN_UNDERLINE, (NAMINGSCREEN_MIDDLELINE * [wNamingScreenMaxNameLength]), "@" into the dw address at wNamingScreenDestinationPointer ld hl, wNamingScreenDestinationPointer ld a, [hli] @@ -824,9 +798,8 @@ NamingScreen_InitNameEntry: ; 11be0 ld [hl], "@" ret -; 11bf7 -NamingScreen_StoreEntry: ; 11bf7 (4:5bf7) +NamingScreen_StoreEntry: ld hl, wNamingScreenDestinationPointer ld a, [hli] ld h, [hl] @@ -847,7 +820,7 @@ NamingScreen_StoreEntry: ; 11bf7 (4:5bf7) jr nz, .loop ret -NamingScreen_GetLastCharacter: ; 11c11 (4:5c11) +NamingScreen_GetLastCharacter: ld hl, wNamingScreenCursorObjectPointer ld c, [hl] inc hl @@ -890,7 +863,7 @@ NamingScreen_GetLastCharacter: ; 11c11 (4:5c11) ld [wNamingScreenLastCharacter], a ret -LoadNamingScreenGFX: ; 11c51 +LoadNamingScreenGFX: call ClearSprites callfar ClearSpriteAnims call LoadStandardFont @@ -935,30 +908,23 @@ LoadNamingScreenGFX: ; 11c51 ld [hWX], a ret -; 11cb7 -NamingScreenGFX_Border: ; 11cb7 +NamingScreenGFX_Border: INCBIN "gfx/naming_screen/border.2bpp" -; 11cc7 -NamingScreenGFX_Cursor: ; 11cc7 +NamingScreenGFX_Cursor: INCBIN "gfx/naming_screen/cursor.2bpp" -; 11ce7 INCLUDE "data/text/name_input_chars.asm" -; 11e5d NamingScreenGFX_End: ; unused INCBIN "gfx/naming_screen/end.1bpp" -; 11e6d NamingScreenGFX_MiddleLine: INCBIN "gfx/naming_screen/middle_line.1bpp" -; 11e6d -NamingScreenGFX_UnderLine: ; 11e6d +NamingScreenGFX_UnderLine: INCBIN "gfx/naming_screen/underline.1bpp" -; 11e75 _ComposeMailMessage: ; 11e75 (mail?) ld hl, wNamingScreenDestinationPointer @@ -986,7 +952,7 @@ _ComposeMailMessage: ; 11e75 (mail?) ld [hMapAnims], a ret -.InitBlankMail: ; 11e9a (4:5e9a) +.InitBlankMail: call ClearBGPalettes call DisableLCD call LoadNamingScreenGFX @@ -1030,25 +996,21 @@ _ComposeMailMessage: ; 11e75 (mail?) ld [hl], "" ret -; 11ef4 (4:5ef4) -.MailIcon: ; 11ef4 +.MailIcon: INCBIN "gfx/icons/mail_big.2bpp" -; 11f74 -.initwNamingScreenMaxNameLength ; 11f74 (4:5f74) +.initwNamingScreenMaxNameLength ld a, MAIL_MSG_LENGTH + 1 ld [wNamingScreenMaxNameLength], a ret -; 11f7a (4:5f7a) .UnusedString11f7a: db "メールを かいてね@" -; 11f84 -.InitCharset: ; 11f84 (4:5f84) +.InitCharset: call WaitTop hlcoord 0, 0 ld bc, 6 * SCREEN_WIDTH @@ -1063,7 +1025,7 @@ INCBIN "gfx/icons/mail_big.2bpp" call ClearBox ld de, MailEntry_Uppercase -.PlaceMailCharset: ; 11fa9 (4:5fa9) +.PlaceMailCharset: hlcoord 1, 7 ld b, 6 .next @@ -1082,7 +1044,7 @@ INCBIN "gfx/icons/mail_big.2bpp" jr nz, .next ret -.DoMailEntry: ; 11fc0 (4:5fc0) +.DoMailEntry: call JoyTextDelay ld a, [wJumptableIndex] bit 7, a @@ -1103,7 +1065,7 @@ INCBIN "gfx/icons/mail_big.2bpp" scf ret -.Update: ; 11feb (4:5feb) +.Update: xor a ld [hBGMapMode], a hlcoord 1, 1 @@ -1119,7 +1081,7 @@ INCBIN "gfx/icons/mail_big.2bpp" ld [hBGMapMode], a ret -.DoJumptable: ; 12008 (4:6008) +.DoJumptable: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -1131,11 +1093,11 @@ INCBIN "gfx/icons/mail_big.2bpp" ld l, a jp hl -.Jumptable: ; 12017 (4:6017) +.Jumptable: dw .init_blinking_cursor dw .process_joypad -.init_blinking_cursor ; 1201b (4:601b) +.init_blinking_cursor depixel 9, 2 ld a, SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR call _InitSpriteAnimStruct @@ -1153,7 +1115,7 @@ INCBIN "gfx/icons/mail_big.2bpp" inc [hl] ret -.process_joypad ; 1203a (4:603a) +.process_joypad ld hl, hJoyPressed ; $ffa7 ld a, [hl] and A_BUTTON @@ -1240,7 +1202,7 @@ INCBIN "gfx/icons/mail_big.2bpp" ; called from engine/sprite_anims.asm -ComposeMail_AnimateCursor: ; 120c1 (4:60c1) +ComposeMail_AnimateCursor: call .GetDPad ld hl, SPRITEANIMSTRUCT_0D add hl, bc @@ -1274,17 +1236,15 @@ ComposeMail_AnimateCursor: ; 120c1 (4:60c1) ld [hl], a ret -; 120f8 (4:60f8) -.LetterEntries: ; 120f8 +.LetterEntries: db $00, $10, $20, $30, $40, $50, $60, $70, $80, $90 -.CaseDelEnd: ; 12102 +.CaseDelEnd: db $00, $00, $00, $30, $30, $30, $60, $60, $60, $60 -; 1210c -.GetDPad: ; 1210c (4:610c) +.GetDPad: ld hl, hJoyLast ld a, [hl] and D_UP @@ -1386,13 +1346,13 @@ ComposeMail_AnimateCursor: ; 120c1 (4:60c1) ld [hl], $5 ret -NamingScreen_PressedA_GetCursorCommand: ; 12185 (4:6185) +NamingScreen_PressedA_GetCursorCommand: ld hl, wNamingScreenCursorObjectPointer ld c, [hl] inc hl ld b, [hl] -ComposeMail_GetCursorPosition: ; 1218b (4:618b) +ComposeMail_GetCursorPosition: ld hl, SPRITEANIMSTRUCT_0D add hl, bc ld a, [hl] @@ -1420,11 +1380,10 @@ ComposeMail_GetCursorPosition: ; 1218b (4:618b) xor a ret -MailComposition_TryAddLastCharacter: ; 121ac (4:61ac) +MailComposition_TryAddLastCharacter: ld a, [wNamingScreenLastCharacter] jp MailComposition_TryAddCharacter -; 121b2 (4:61b2) ; unused ld a, [wNamingScreenCurrNameLength] @@ -1460,8 +1419,6 @@ MailComposition_TryAddLastCharacter: ; 121ac (4:61ac) ld a, [hl] jp NamingScreen_LoadNextCharacter -; 121dd INCLUDE "data/text/mail_input_chars.asm" -; 122c1 diff --git a/engine/menus/options_menu.asm b/engine/menus/options_menu.asm index c0a255cb01d..071872068fe 100644 --- a/engine/menus/options_menu.asm +++ b/engine/menus/options_menu.asm @@ -1,4 +1,4 @@ -_OptionsMenu: ; e41d0 +_OptionsMenu: ld hl, hInMenu ld a, [hl] push af @@ -59,9 +59,8 @@ _OptionsMenu: ; e41d0 pop af ld [hInMenu], a ret -; e4241 -StringOptions: ; e4241 +StringOptions: db "TEXT SPEED" db " :" db "BATTLE SCENE" @@ -77,10 +76,9 @@ StringOptions: ; e4241 db "FRAME" db " :TYPE" db "CANCEL@" -; e42d6 -GetOptionPointer: ; e42d6 +GetOptionPointer: ld a, [wJumptableIndex] ; load the cursor position to a ld e, a ; copy it to de ld d, 0 @@ -91,7 +89,6 @@ GetOptionPointer: ; e42d6 ld h, [hl] ld l, a jp hl ; jump to the code of the current highlighted item -; e42e5 .Pointers: dw Options_TextSpeed @@ -102,7 +99,6 @@ GetOptionPointer: ; e42d6 dw Options_MenuAccount dw Options_Frame dw Options_Cancel -; e42f5 const_def @@ -110,7 +106,7 @@ GetOptionPointer: ; e42d6 const OPT_TEXT_SPEED_MED ; 1 const OPT_TEXT_SPEED_SLOW ; 2 -Options_TextSpeed: ; e42f5 +Options_TextSpeed: call GetTextSpeed ld a, [hJoyPressed] bit D_LEFT_F, a @@ -156,7 +152,6 @@ Options_TextSpeed: ; e42f5 call PlaceString and a ret -; e4331 .Strings: ; entries correspond to OPT_TEXT_SPEED_* constants @@ -167,10 +162,9 @@ Options_TextSpeed: ; e42f5 .Fast: db "FAST@" .Mid: db "MID @" .Slow: db "SLOW@" -; e4346 -GetTextSpeed: ; e4346 +GetTextSpeed: ; converts TEXT_DELAY_* value in a to OPT_TEXT_SPEED_* value in c, ; with previous/next TEXT_DELAY_* values in d/e ld a, [wOptions] @@ -193,10 +187,9 @@ GetTextSpeed: ; e4346 ld c, OPT_TEXT_SPEED_FAST lb de, TEXT_DELAY_SLOW, TEXT_DELAY_MED ret -; e4365 -Options_BattleScene: ; e4365 +Options_BattleScene: ld hl, wOptions ld a, [hJoyPressed] bit D_LEFT_F, a @@ -231,14 +224,12 @@ Options_BattleScene: ; e4365 call PlaceString and a ret -; e4398 .On: db "ON @" .Off: db "OFF@" -; e43a0 -Options_BattleStyle: ; e43a0 +Options_BattleStyle: ld hl, wOptions ld a, [hJoyPressed] bit D_LEFT_F, a @@ -272,14 +263,12 @@ Options_BattleStyle: ; e43a0 call PlaceString and a ret -; e43d1 .Shift: db "SHIFT@" .Set: db "SET @" -; e43dd -Options_Sound: ; e43dd +Options_Sound: ld hl, wOptions ld a, [hJoyPressed] bit D_LEFT_F, a @@ -320,11 +309,9 @@ Options_Sound: ; e43dd call PlaceString and a ret -; e4416 .Mono: db "MONO @" .Stereo: db "STEREO@" -; e4424 const_def @@ -334,7 +321,7 @@ Options_Sound: ; e43dd const OPT_PRINT_DARKER ; 3 const OPT_PRINT_DARKEST ; 4 -Options_Print: ; e4424 +Options_Print: call GetPrinterSetting ld a, [hJoyPressed] bit D_LEFT_F, a @@ -377,7 +364,6 @@ Options_Print: ; e4424 call PlaceString and a ret -; e445a .Strings: ; entries correspond to OPT_PRINT_* constants @@ -392,10 +378,9 @@ Options_Print: ; e4424 .Normal: db "NORMAL @" .Darker: db "DARKER @" .Darkest: db "DARKEST @" -; e4491 -GetPrinterSetting: ; e4491 +GetPrinterSetting: ; converts GBPRINTER_* value in a to OPT_PRINT_* value in c, ; with previous/next GBPRINTER_* values in d/e ld a, [wGBPrinter] @@ -431,9 +416,8 @@ GetPrinterSetting: ; e4491 ld c, OPT_PRINT_DARKEST lb de, GBPRINTER_DARKER, GBPRINTER_LIGHTEST ret -; e44c1 -Options_MenuAccount: ; e44c1 +Options_MenuAccount: ld hl, wOptions2 ld a, [hJoyPressed] bit D_LEFT_F, a @@ -467,14 +451,12 @@ Options_MenuAccount: ; e44c1 call PlaceString and a ret -; e44f2 .Off: db "OFF@" .On: db "ON @" -; e44fa -Options_Frame: ; e44fa +Options_Frame: ld hl, wTextBoxFrame ld a, [hJoyPressed] bit D_LEFT_F, a @@ -496,7 +478,7 @@ Options_Frame: ; e44fa .Save: and $7 ld [hl], a -UpdateFrame: ; e4512 +UpdateFrame: ld a, [wTextBoxFrame] hlcoord 16, 15 ; where on the screen the number is drawn add "1" @@ -504,9 +486,8 @@ UpdateFrame: ; e4512 call LoadFontsExtra and a ret -; e4520 -Options_Cancel: ; e4520 +Options_Cancel: ld a, [hJoyPressed] and A_BUTTON jr nz, .Exit @@ -516,9 +497,8 @@ Options_Cancel: ; e4520 .Exit: scf ret -; e452a -OptionsControl: ; e452a +OptionsControl: ld hl, wJumptableIndex ld a, [hJoyLast] cp D_DOWN @@ -563,9 +543,8 @@ OptionsControl: ; e452a dec [hl] scf ret -; e455c -Options_UpdateCursorPosition: ; e455c +Options_UpdateCursorPosition: hlcoord 1, 1 ld de, SCREEN_WIDTH ld c, $10 @@ -580,4 +559,3 @@ Options_UpdateCursorPosition: ; e455c call AddNTimes ld [hl], "▶" ret -; e4579 diff --git a/engine/menus/save.asm b/engine/menus/save.asm index efde37ffe63..a0db01a9571 100644 --- a/engine/menus/save.asm +++ b/engine/menus/save.asm @@ -1,4 +1,4 @@ -SaveMenu: ; 14a1a +SaveMenu: call LoadStandardMenuHeader farcall DisplaySaveInfoOnSave call SpeechTextBox @@ -23,7 +23,7 @@ SaveMenu: ; 14a1a scf ret -SaveAfterLinkTrade: ; 14a58 +SaveAfterLinkTrade: call PauseGameLogic farcall StageRTCTimeForSave farcall BackupMysteryGift @@ -35,10 +35,9 @@ SaveAfterLinkTrade: ; 14a58 farcall SaveRTC call ResumeGameLogic ret -; 14a83 -ChangeBoxSaveGame: ; 14a83 (5:4a83) +ChangeBoxSaveGame: push de ld hl, Text_SaveOnBoxSwitch call MenuTextBox @@ -62,7 +61,7 @@ ChangeBoxSaveGame: ; 14a83 (5:4a83) pop de ret -Link_SaveGame: ; 14ab2 +Link_SaveGame: call AskOverwriteSaveFile jr c, .refused call PauseGameLogic @@ -72,9 +71,8 @@ Link_SaveGame: ; 14ab2 .refused ret -; 14ac2 -MoveMonWOMail_SaveGame: ; 14ac2 +MoveMonWOMail_SaveGame: call PauseGameLogic push de call SaveBox @@ -84,9 +82,8 @@ MoveMonWOMail_SaveGame: ; 14ac2 call LoadBox call ResumeGameLogic ret -; 14ad5 -MoveMonWOMail_InsertMon_SaveGame: ; 14ad5 +MoveMonWOMail_InsertMon_SaveGame: call PauseGameLogic push de call SaveBox @@ -117,9 +114,8 @@ MoveMonWOMail_InsertMon_SaveGame: ; 14ad5 ld c, 24 call DelayFrames ret -; 14b34 -StartMoveMonWOMail_SaveGame: ; 14b34 +StartMoveMonWOMail_SaveGame: ld hl, Text_SaveOnMoveMonWOMail call MenuTextBox call YesNoBox @@ -136,22 +132,19 @@ StartMoveMonWOMail_SaveGame: ; 14b34 .refused scf ret -; 14b54 -PauseGameLogic: ; 14b54 +PauseGameLogic: ld a, $1 ld [wGameLogicPaused], a ret -; 14b5a -ResumeGameLogic: ; 14b5a +ResumeGameLogic: xor a ld [wGameLogicPaused], a ret -; 14b5f -AddHallOfFameEntry: ; 14b5f +AddHallOfFameEntry: ld a, BANK(sHallOfFame) call GetSRAMBank ld hl, sHallOfFame + HOF_LENGTH * (NUM_HOF_TEAMS - 1) - 1 @@ -171,14 +164,12 @@ AddHallOfFameEntry: ; 14b5f call CopyBytes call CloseSRAM ret -; 14b85 -SaveGameData: ; 14b85 +SaveGameData: call SaveGameData_ ret -; 14b89 -AskOverwriteSaveFile: ; 14b89 +AskOverwriteSaveFile: ld a, [wSaveFileExists] and a jr z, .erase @@ -205,9 +196,8 @@ AskOverwriteSaveFile: ; 14b89 .refused scf ret -; 14baf -SaveTheGame_yesorno: ; 14baf +SaveTheGame_yesorno: ld b, BANK(Text_WouldYouLikeToSaveTheGame) call MapTextbox call LoadMenuTextBox @@ -221,9 +211,8 @@ SaveTheGame_yesorno: ; 14baf pop af and a ret -; 14bcb -CompareLoadedAndSavedPlayerID: ; 14bcb +CompareLoadedAndSavedPlayerID: ld a, BANK(sPlayerData) call GetSRAMBank ld hl, sPlayerData + (wPlayerID - wPlayerData) @@ -237,11 +226,10 @@ CompareLoadedAndSavedPlayerID: ; 14bcb ld a, [wPlayerID + 1] cp c ret -; 14be3 -_SavingDontTurnOffThePower: ; 14be3 +_SavingDontTurnOffThePower: call SavingDontTurnOffThePower -SavedTheGame: ; 14be6 +SavedTheGame: call SaveGameData_ ; wait 32 frames ld c, $20 @@ -265,10 +253,9 @@ SavedTheGame: ; 14be6 ld c, $1e call DelayFrames ret -; 14c10 -SaveGameData_: ; 14c10 +SaveGameData_: ld a, 1 ld [wSaveFileExists], a farcall StageRTCTimeForSave @@ -298,9 +285,8 @@ SaveGameData_: ; 14c10 .ok call CloseSRAM ret -; 14c6b -UpdateStackTop: ; 14c6b +UpdateStackTop: ; sStackTop appears to be unused. ; It could have been used to debug stack overflow during saving. call FindStackTop @@ -327,9 +313,8 @@ UpdateStackTop: ; 14c6b .done call CloseSRAM ret -; 14c90 -FindStackTop: ; 14c90 +FindStackTop: ; Find the furthest point that sp has traversed to. ; This is distinct from the current value of sp. ld hl, wStack - $ff @@ -339,9 +324,8 @@ FindStackTop: ; 14c90 ret nz inc hl jr .loop -; 14c99 -SavingDontTurnOffThePower: ; 14c99 +SavingDontTurnOffThePower: ; Prevent joypad interrupts xor a ld [hJoypadReleased], a @@ -364,10 +348,9 @@ SavingDontTurnOffThePower: ; 14c99 ld c, $10 call DelayFrames ret -; 14cbb -ErasePreviousSave: ; 14cbb +ErasePreviousSave: call EraseBoxes call EraseHallOfFame call EraseLinkBattleStats @@ -383,9 +366,8 @@ ErasePreviousSave: ; 14cbb ld a, $1 ld [wSavedAtLeastOnce], a ret -; 14ce2 -EraseLinkBattleStats: ; 14ce2 +EraseLinkBattleStats: ld a, BANK(sLinkBattleStats) call GetSRAMBank ld hl, sLinkBattleStats @@ -393,9 +375,8 @@ EraseLinkBattleStats: ; 14ce2 xor a call ByteFill jp CloseSRAM -; 14cf4 -EraseMysteryGift: ; 14cf4 +EraseMysteryGift: ld a, BANK(sBackupMysteryGiftItem) call GetSRAMBank ld hl, sBackupMysteryGiftItem @@ -403,9 +384,8 @@ EraseMysteryGift: ; 14cf4 xor a call ByteFill jp CloseSRAM -; 14d06 -EraseHallOfFame: ; 14d06 +EraseHallOfFame: ld a, BANK(sHallOfFame) call GetSRAMBank ld hl, sHallOfFame @@ -413,9 +393,8 @@ EraseHallOfFame: ; 14d06 xor a call ByteFill jp CloseSRAM -; 14d18 -Unreferenced_Function14d18: ; 14d18 +Unreferenced_Function14d18: ; copy .Data to SRA4:a007 ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank @@ -424,9 +403,8 @@ Unreferenced_Function14d18: ; 14d18 ld bc, .DataEnd - .Data call CopyBytes jp CloseSRAM -; 14d2c -.Data: ; 14d2c +.Data: db $0d, $02, $00, $05, $00, $00 db $22, $02, $01, $05, $00, $00 db $03, $04, $05, $08, $03, $05 @@ -435,23 +413,20 @@ Unreferenced_Function14d18: ; 14d18 db $04, $07, $01, $05, $00, $00 db $0f, $05, $14, $07, $05, $05 db $11, $0c, $0c, $06, $06, $04 -; 14d5c .DataEnd -EraseBattleTowerStatus: ; 14d5c +EraseBattleTowerStatus: ld a, BANK(sBattleTowerChallengeState) call GetSRAMBank xor a ld [sBattleTowerChallengeState], a jp CloseSRAM -; 14d68 -SaveData: ; 14d68 +SaveData: call _SaveData ret -; 14d6c -Unreferenced_Function14d6c: ; 14d6c +Unreferenced_Function14d6c: ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank ld a, [$a60b] ; address of MBC30 bank @@ -465,9 +440,8 @@ Unreferenced_Function14d6c: ; 14d6c ld [$a60b], a ; address of MBC30 bank call CloseSRAM ret -; 14d83 -Unreferenced_Function14d83: ; 14d83 +Unreferenced_Function14d83: ld a, 4 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank xor a @@ -475,27 +449,24 @@ Unreferenced_Function14d83: ; 14d83 ld [$a60d], a ; address of MBC30 bank call CloseSRAM ret -; 14d93 -Unreferenced_Function14d93: ; 14d93 +Unreferenced_Function14d93: ld a, 7 ; MBC30 bank used by JP Crystal; inaccessible by MBC3 call GetSRAMBank xor a ld [$a000], a ; address of MBC30 bank call CloseSRAM ret -; 14da0 -HallOfFame_InitSaveIfNeeded: ; 14da0 +HallOfFame_InitSaveIfNeeded: ld a, [wSavedAtLeastOnce] and a ret nz call ErasePreviousSave ret -; 14da9 -ValidateSave: ; 14da9 +ValidateSave: ld a, BANK(sCheckValue1) ; BANK(sCheckValue2) call GetSRAMBank ld a, SAVE_CHECK_VALUE_1 @@ -503,9 +474,8 @@ ValidateSave: ; 14da9 ld a, SAVE_CHECK_VALUE_2 ld [sCheckValue2], a jp CloseSRAM -; 14dbb -SaveOptions: ; 14dbb +SaveOptions: ld a, BANK(sOptions) call GetSRAMBank ld hl, wOptions @@ -516,9 +486,8 @@ SaveOptions: ; 14dbb and $ff ^ (1 << NO_TEXT_SCROLL) ld [sOptions], a jp CloseSRAM -; 14dd7 -SavePlayerData: ; 14dd7 +SavePlayerData: ld a, BANK(sPlayerData) call GetSRAMBank ld hl, wPlayerData @@ -530,9 +499,8 @@ SavePlayerData: ; 14dd7 ld bc, wCurrMapDataEnd - wCurrMapData call CopyBytes jp CloseSRAM -; 14df7 -SavePokemonData: ; 14df7 +SavePokemonData: ld a, BANK(sPokemonData) call GetSRAMBank ld hl, wPokemonData @@ -541,15 +509,13 @@ SavePokemonData: ; 14df7 call CopyBytes call CloseSRAM ret -; 14e0c -SaveBox: ; 14e0c +SaveBox: call GetBoxAddress call SaveBoxAddress ret -; 14e13 -SaveChecksum: ; 14e13 +SaveChecksum: ld hl, sGameData ld bc, sGameDataEnd - sGameData ld a, BANK(sGameData) @@ -561,9 +527,8 @@ SaveChecksum: ; 14e13 ld [sChecksum + 1], a call CloseSRAM ret -; 14e2d -ValidateBackupSave: ; 14e2d +ValidateBackupSave: ld a, BANK(sBackupCheckValue1) ; BANK(sBackupCheckValue2) call GetSRAMBank ld a, SAVE_CHECK_VALUE_1 @@ -572,9 +537,8 @@ ValidateBackupSave: ; 14e2d ld [sBackupCheckValue2], a call CloseSRAM ret -; 14e40 -SaveBackupOptions: ; 14e40 +SaveBackupOptions: ld a, BANK(sBackupOptions) call GetSRAMBank ld hl, wOptions @@ -583,9 +547,8 @@ SaveBackupOptions: ; 14e40 call CopyBytes call CloseSRAM ret -; 14e55 -SaveBackupPlayerData: ; 14e55 +SaveBackupPlayerData: ld a, BANK(sBackupPlayerData) call GetSRAMBank ld hl, wPlayerData @@ -598,9 +561,8 @@ SaveBackupPlayerData: ; 14e55 call CopyBytes call CloseSRAM ret -; 14e76 -SaveBackupPokemonData: ; 14e76 +SaveBackupPokemonData: ld a, BANK(sBackupPokemonData) call GetSRAMBank ld hl, wPokemonData @@ -609,9 +571,8 @@ SaveBackupPokemonData: ; 14e76 call CopyBytes call CloseSRAM ret -; 14e8b -SaveBackupChecksum: ; 14e8b +SaveBackupChecksum: ld hl, sBackupGameData ld bc, sBackupGameDataEnd - sBackupGameData ld a, BANK(sBackupGameData) @@ -623,10 +584,9 @@ SaveBackupChecksum: ; 14e8b ld [sBackupChecksum + 1], a call CloseSRAM ret -; 14ea5 -TryLoadSaveFile: ; 14ea5 (5:4ea5) +TryLoadSaveFile: call VerifyChecksum jr nz, .backup call LoadPlayerData @@ -673,7 +633,7 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5) ret -TryLoadSaveData: ; 14f1c +TryLoadSaveData: xor a ld [wSaveFileExists], a call CheckPrimarySaveFile @@ -720,13 +680,12 @@ TryLoadSaveData: ; 14f1c call CopyBytes call PanicResetClock ret -; 14f7c INCLUDE "data/default_options.asm" -CheckPrimarySaveFile: ; 14f84 +CheckPrimarySaveFile: ld a, BANK(sCheckValue1) ; BANK(sCheckValue2) call GetSRAMBank ld a, [sCheckValue1] @@ -746,9 +705,8 @@ CheckPrimarySaveFile: ; 14f84 .nope call CloseSRAM ret -; 14faf -CheckBackupSaveFile: ; 14faf +CheckBackupSaveFile: ld a, BANK(sBackupCheckValue1) ; BANK(sBackupCheckValue2) call GetSRAMBank ld a, [sBackupCheckValue1] @@ -767,10 +725,9 @@ CheckBackupSaveFile: ; 14faf .nope call CloseSRAM ret -; 14fd7 -LoadPlayerData: ; 14fd7 (5:4fd7) +LoadPlayerData: ld a, BANK(sPlayerData) call GetSRAMBank ld hl, sPlayerData @@ -793,7 +750,7 @@ LoadPlayerData: ; 14fd7 (5:4fd7) call CloseSRAM ret -LoadPokemonData: ; 1500c +LoadPokemonData: ld a, BANK(sPokemonData) call GetSRAMBank ld hl, sPokemonData @@ -802,14 +759,13 @@ LoadPokemonData: ; 1500c call CopyBytes call CloseSRAM ret -; 15021 -LoadBox: ; 15021 (5:5021) +LoadBox: call GetBoxAddress call LoadBoxAddress ret -VerifyChecksum: ; 15028 (5:5028) +VerifyChecksum: ld hl, sGameData ld bc, sGameDataEnd - sGameData ld a, BANK(sGameData) @@ -826,7 +782,7 @@ VerifyChecksum: ; 15028 (5:5028) pop af ret -LoadBackupPlayerData: ; 15046 (5:5046) +LoadBackupPlayerData: ld a, BANK(sBackupPlayerData) call GetSRAMBank ld hl, sBackupPlayerData @@ -840,7 +796,7 @@ LoadBackupPlayerData: ; 15046 (5:5046) call CloseSRAM ret -LoadBackupPokemonData: ; 15067 (5:5067) +LoadBackupPokemonData: ld a, BANK(sBackupPokemonData) call GetSRAMBank ld hl, sBackupPokemonData @@ -850,7 +806,7 @@ LoadBackupPokemonData: ; 15067 (5:5067) call CloseSRAM ret -VerifyBackupChecksum: ; 1507c (5:507c) +VerifyBackupChecksum: ld hl, sBackupGameData ld bc, sBackupGameDataEnd - sBackupGameData ld a, BANK(sBackupGameData) @@ -868,7 +824,7 @@ VerifyBackupChecksum: ; 1507c (5:507c) ret -_SaveData: ; 1509a +_SaveData: ; This is called within two scenarios: ; a) ErasePreviousSave (the process of erasing the save from a previous game file) ; b) unused mobile functionality @@ -895,7 +851,7 @@ _SaveData: ; 1509a jp CloseSRAM -_LoadData: ; 150b9 +_LoadData: ld a, BANK(sCrystalData) call GetSRAMBank ld hl, sCrystalData @@ -915,7 +871,7 @@ _LoadData: ; 150b9 jp CloseSRAM -GetBoxAddress: ; 150d8 +GetBoxAddress: ld a, [wCurBox] cp NUM_BOXES jr c, .ok @@ -940,9 +896,8 @@ endr ld l, a pop af ret -; 150f9 -SaveBoxAddress: ; 150f9 +SaveBoxAddress: ; Save box via wBoxPartialData. ; We do this in three steps because the size of wBoxPartialData is less than ; the size of sBox. @@ -1016,10 +971,9 @@ SaveBoxAddress: ; 150f9 pop hl ret -; 1517d -LoadBoxAddress: ; 1517d (5:517d) +LoadBoxAddress: ; Load box via wBoxPartialData. ; We do this in three steps because the size of wBoxPartialData is less than ; the size of sBox. @@ -1083,7 +1037,7 @@ LoadBoxAddress: ; 1517d (5:517d) ret -EraseBoxes: ; 151fb +EraseBoxes: ld hl, BoxAddresses ld c, NUM_BOXES .next @@ -1123,9 +1077,8 @@ EraseBoxes: ; 151fb dec c jr nz, .next ret -; 1522d -BoxAddresses: ; 1522d +BoxAddresses: ; dbww bank, address, address dbww BANK(sBox1), sBox1, sBox1End dbww BANK(sBox2), sBox2, sBox2End @@ -1141,10 +1094,9 @@ BoxAddresses: ; 1522d dbww BANK(sBox12), sBox12, sBox12End dbww BANK(sBox13), sBox13, sBox13End dbww BANK(sBox14), sBox14, sBox14End -; 15273 -Checksum: ; 15273 +Checksum: ld de, 0 .loop ld a, [hli] @@ -1158,7 +1110,6 @@ Checksum: ; 15273 or c jr nz, .loop ret -; 15283 Text_WouldYouLikeToSaveTheGame: ; 0x15283 diff --git a/engine/menus/savemenu_copytilemapatonce.asm b/engine/menus/savemenu_copytilemapatonce.asm index 9b50494a4ad..8271603d9cf 100644 --- a/engine/menus/savemenu_copytilemapatonce.asm +++ b/engine/menus/savemenu_copytilemapatonce.asm @@ -1,4 +1,4 @@ -SaveMenu_CopyTilemapAtOnce: ; 4cf45 (13:4f45) +SaveMenu_CopyTilemapAtOnce: ld a, [hCGB] and a jp z, WaitBGMap @@ -38,7 +38,7 @@ SaveMenu_CopyTilemapAtOnce: ; 4cf45 (13:4f45) ld [hBGMapMode], a ret -.CopyTilemapAtOnce: ; 4cf80 (13:4f80) +.CopyTilemapAtOnce: ld [hSPBuffer], sp ; $ffd9 ld sp, hl ld a, [hBGMapAddress + 1] diff --git a/engine/menus/scrolling_menu.asm b/engine/menus/scrolling_menu.asm index 3be3d839cb2..a313c6646af 100644 --- a/engine/menus/scrolling_menu.asm +++ b/engine/menus/scrolling_menu.asm @@ -1,4 +1,4 @@ -_InitScrollingMenu:: ; 245af +_InitScrollingMenu:: xor a ld [wMenuJoypad], a ld [hBGMapMode], a @@ -12,25 +12,22 @@ _InitScrollingMenu:: ; 245af xor a ld [hBGMapMode], a ret -; 245cb -_ScrollingMenu:: ; 245cb +_ScrollingMenu:: .loop call ScrollingMenuJoyAction jp c, .exit call z, .zero jr .loop -; 245d6 -.exit ; 245d6 +.exit call MenuClickSound ld [wMenuJoypad], a ld a, 0 ld [hInMenu], a ret -; 245e1 -.zero ; 245e1 +.zero call ScrollingMenu_InitDisplay ld a, 1 ld [hBGMapMode], a @@ -39,9 +36,8 @@ _ScrollingMenu:: ; 245cb xor a ld [hBGMapMode], a ret -; 245f1 -ScrollingMenu_InitDisplay: ; 245f1 +ScrollingMenu_InitDisplay: xor a ld [hBGMapMode], a ld hl, wOptions @@ -54,9 +50,8 @@ ScrollingMenu_InitDisplay: ; 245f1 pop af ld [wOptions], a ret -; 24609 -ScrollingMenuJoyAction: ; 24609 +ScrollingMenuJoyAction: .loop call ScrollingMenuJoypad ld a, [hJoyLast] @@ -82,15 +77,13 @@ ScrollingMenuJoyAction: ; 24609 bit D_DOWN_F, a jp nz, .d_down jr .loop -; 24640 .unreferenced ; unused ld a, -1 and a ret -; 24644 -.a_button ; 24644 +.a_button call PlaceHollowCursor ld a, [wMenuCursorY] dec a @@ -109,15 +102,13 @@ ScrollingMenuJoyAction: ; 24609 ld a, A_BUTTON scf ret -; 2466f -.b_button ; 2466f +.b_button ld a, B_BUTTON scf ret -; 24673 -.select ; 24673 +.select ld a, [wMenuDataFlags] bit 7, a jp z, xor_a_dec_a @@ -133,18 +124,16 @@ ScrollingMenuJoyAction: ; 24609 ld a, SELECT scf ret -; 24695 -.start ; 24695 +.start ld a, [wMenuDataFlags] bit 6, a jp z, xor_a_dec_a ld a, START scf ret -; 246a1 -.d_left ; 246a1 +.d_left ld hl, w2DMenuFlags2 bit 7, [hl] jp z, xor_a_dec_a @@ -154,9 +143,8 @@ ScrollingMenuJoyAction: ; 24609 ld a, D_LEFT scf ret -; 246b5 -.d_right ; 246b5 +.d_right ld hl, w2DMenuFlags2 bit 7, [hl] jp z, xor_a_dec_a @@ -166,9 +154,8 @@ ScrollingMenuJoyAction: ; 24609 ld a, D_RIGHT scf ret -; 246c9 -.d_up ; 246c9 +.d_up ld hl, w2DMenuFlags2 bit 7, [hl] jp z, xor_a @@ -181,9 +168,8 @@ ScrollingMenuJoyAction: ; 24609 .xor_dec_up jp xor_a_dec_a -; 246df -.d_down ; 246df +.d_down ld hl, w2DMenuFlags2 bit 7, [hl] jp z, xor_a @@ -199,18 +185,16 @@ ScrollingMenuJoyAction: ; 24609 .xor_dec_down jp xor_a_dec_a -; 246fc -ScrollingMenu_GetCursorPosition: ; 246fc +ScrollingMenu_GetCursorPosition: ld a, [wMenuScrollPosition] ld c, a ld a, [wMenuCursorY] add c ld c, a ret -; 24706 -ScrollingMenu_ClearLeftColumn: ; 24706 (9:4706) +ScrollingMenu_ClearLeftColumn: call MenuBoxCoord2Tile ld de, SCREEN_WIDTH add hl, de @@ -223,7 +207,7 @@ ScrollingMenu_ClearLeftColumn: ; 24706 (9:4706) jr nz, .loop ret -InitScrollingMenuCursor: ; 2471a +InitScrollingMenuCursor: ld hl, wMenuData_ItemsPointerAddr ld a, [hli] ld h, [hl] @@ -271,9 +255,8 @@ InitScrollingMenuCursor: ; 2471a .asm_24763 ret -; 24764 -ScrollingMenu_InitFlags: ; 24764 +ScrollingMenu_InitFlags: ld a, [wMenuDataFlags] ld c, a ld a, [wScrollingMenuListSize] @@ -343,9 +326,8 @@ ScrollingMenu_InitFlags: ; 24764 ld [wCursorCurrentTile + 1], a ld [wCursorOffCharacter], a ret -; 247dd -ScrollingMenu_ValidateSwitchItem: ; 247dd +ScrollingMenu_ValidateSwitchItem: ld a, [wScrollingMenuListSize] ld c, a ld a, [wSwitchItem] @@ -359,9 +341,8 @@ ScrollingMenu_ValidateSwitchItem: ; 247dd .done ret -; 247f0 -ScrollingMenu_UpdateDisplay: ; 247f0 +ScrollingMenu_UpdateDisplay: call ClearWholeMenuBox ld a, [wMenuDataFlags] bit 4, a ; place arrows @@ -432,9 +413,8 @@ ScrollingMenu_UpdateDisplay: ; 247f0 ld e, l ld hl, wMenuData_ScrollingMenuFunction1 jp CallPointerAt -; 2486e -ScrollingMenu_CallFunctions1and2: ; 2486e +ScrollingMenu_CallFunctions1and2: push hl ld d, h ld e, l @@ -454,9 +434,8 @@ ScrollingMenu_CallFunctions1and2: ; 2486e .done ret -; 2488b -ScrollingMenu_PlaceCursor: ; 2488b +ScrollingMenu_PlaceCursor: ld a, [wSwitchItem] and a jr z, .done @@ -486,9 +465,8 @@ ScrollingMenu_PlaceCursor: ; 2488b .done ret -; 248b8 -ScrollingMenu_CheckCallFunction3: ; 248b8 +ScrollingMenu_CheckCallFunction3: ld a, [wMenuDataFlags] bit 5, a ; call function 3 ret z @@ -505,9 +483,8 @@ ScrollingMenu_CheckCallFunction3: ; 248b8 ld hl, wMenuData_ScrollingMenuFunction3 call CallPointerAt ret -; 248d5 -ScrollingMenu_GetListItemCoordAndFunctionArgs: ; 248d5 +ScrollingMenu_GetListItemCoordAndFunctionArgs: push de push hl ld e, a @@ -540,4 +517,3 @@ ScrollingMenu_GetListItemCoordAndFunctionArgs: ; 248d5 pop hl pop de ret -; 2490c diff --git a/engine/menus/start_menu.asm b/engine/menus/start_menu.asm index 037efd947b4..0330b00a3eb 100644 --- a/engine/menus/start_menu.asm +++ b/engine/menus/start_menu.asm @@ -11,7 +11,7 @@ const STARTMENUITEM_QUIT ; 8 -StartMenu:: ; 125cd +StartMenu:: call ClearWindowData @@ -118,23 +118,20 @@ StartMenu:: ; 125cd .b scf ret -; 12691 -.ExitMenuRunScript: ; 12691 +.ExitMenuRunScript: call ExitMenu ld a, HMENURETURN_SCRIPT ld [hMenuReturn], a ret -; 12699 -.ExitMenuRunScriptCloseText: ; 12699 +.ExitMenuRunScriptCloseText: call ExitMenu ld a, HMENURETURN_SCRIPT ld [hMenuReturn], a jr .ReturnEnd2 -; 126a2 -.ExitMenuCallFuncCloseText: ; 126a2 +.ExitMenuCallFuncCloseText: call ExitMenu ld hl, wQueuedScriptAddr ld a, [hli] @@ -143,14 +140,12 @@ StartMenu:: ; 125cd ld a, [wQueuedScriptBank] rst FarCall jr .ReturnEnd2 -; 126b1 -.ReturnRedraw: ; 126b1 +.ReturnRedraw: call .Clear jp .Reopen -; 126b7 -.Clear: ; 126b7 +.Clear: call ClearBGPalettes call Call_ExitMenu call ReloadTilesetAndPalettes @@ -161,7 +156,6 @@ StartMenu:: ; 125cd call ret_d90 call FinishExitMenu ret -; 126d3 .MenuHeader: @@ -242,16 +236,15 @@ StartMenu:: ; 125cd next "be judged.@" -.OpenMenu: ; 127e5 +.OpenMenu: ld a, [wMenuSelection] call .GetMenuAccountTextPointer ld a, [hli] ld h, [hl] ld l, a jp hl -; 127ef -.MenuString: ; 127ef +.MenuString: push de ld a, [wMenuSelection] call .GetMenuAccountTextPointer @@ -263,9 +256,8 @@ StartMenu:: ; 125cd pop hl call PlaceString ret -; 12800 -.MenuDesc: ; 12800 +.MenuDesc: push de ld a, [wMenuSelection] cp $ff @@ -283,10 +275,9 @@ endr .none pop de ret -; 12819 -.GetMenuAccountTextPointer: ; 12819 +.GetMenuAccountTextPointer: ld e, a ld d, 0 ld hl, wMenuDataPointerTableAddr @@ -297,10 +288,9 @@ rept 6 add hl, de endr ret -; 12829 -.SetUpMenuItems: ; 12829 +.SetUpMenuItems: xor a ld [wWhichIndexSet], a call .FillMenuList @@ -358,10 +348,9 @@ endr ld a, c ld [wMenuItemsList], a ret -; 1288d -.FillMenuList: ; 1288d +.FillMenuList: xor a ld hl, wMenuItemsList ld [hli], a @@ -371,28 +360,24 @@ endr ld de, wMenuItemsList + 1 ld c, 0 ret -; 128a0 -.AppendMenuList: ; 128a0 +.AppendMenuList: ld [de], a inc de inc c ret -; 128a4 -.DrawMenuAccount_: ; 128a4 +.DrawMenuAccount_: jp .DrawMenuAccount -; 128a7 -.PrintMenuAccount: ; 128a7 +.PrintMenuAccount: call .IsMenuAccountOn ret z call .DrawMenuAccount decoord 0, 14 jp .MenuDesc -; 128b4 -.DrawMenuAccount: ; 128b4 +.DrawMenuAccount: call .IsMenuAccountOn ret z hlcoord 0, 13 @@ -402,23 +387,20 @@ endr ld b, 3 ld c, 8 jp TextBoxPalette -; 128cb -.IsMenuAccountOn: ; 128cb +.IsMenuAccountOn: ld a, [wOptions2] and 1 << MENU_ACCOUNT ret -; 128d1 -.DrawBugContestStatusBox: ; 128d1 +.DrawBugContestStatusBox: ld hl, wStatusFlags2 bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] ret z farcall StartMenu_DrawBugContestStatusBox ret -; 128de -.DrawBugContestStatus: ; 128de +.DrawBugContestStatus: ld hl, wStatusFlags2 bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] jr nz, .contest @@ -426,18 +408,16 @@ endr .contest farcall StartMenu_PrintBugContestStatus ret -; 128ed -StartMenu_Exit: ; 128ed +StartMenu_Exit: ; Exit the menu. ld a, 1 ret -; 128f0 -StartMenu_Quit: ; 128f0 +StartMenu_Quit: ; Retire from the bug catching contest. ld hl, .EndTheContestText @@ -456,10 +436,9 @@ StartMenu_Quit: ; 128f0 .EndTheContestText: text_jump UnknownText_0x1c1a6c db "@" -; 1290b -StartMenu_Save: ; 1290b +StartMenu_Save: ; Save the game. call BufferScreen @@ -470,20 +449,18 @@ StartMenu_Save: ; 1290b .asm_12919 ld a, 1 ret -; 1291c -StartMenu_Option: ; 1291c +StartMenu_Option: ; Game options. call FadeToMenu farcall OptionsMenu ld a, 6 ret -; 12928 -StartMenu_Status: ; 12928 +StartMenu_Status: ; Player status. call FadeToMenu @@ -491,10 +468,9 @@ StartMenu_Status: ; 12928 call CloseSubmenu ld a, 0 ret -; 12937 -StartMenu_Pokedex: ; 12937 +StartMenu_Pokedex: ld a, [wPartyCount] and a @@ -507,20 +483,18 @@ StartMenu_Pokedex: ; 12937 .asm_12949 ld a, 0 ret -; 1294c -StartMenu_Pokegear: ; 1294c +StartMenu_Pokegear: call FadeToMenu farcall PokeGear call CloseSubmenu ld a, 0 ret -; 1295b -StartMenu_Pack: ; 1295b +StartMenu_Pack: call FadeToMenu farcall Pack @@ -535,10 +509,9 @@ StartMenu_Pack: ; 1295b call ExitAllMenus ld a, 4 ret -; 12976 -StartMenu_Pokemon: ; 12976 +StartMenu_Pokemon: ld a, [wPartyCount] and a @@ -586,9 +559,8 @@ StartMenu_Pokemon: ; 12976 call ExitAllMenus pop af ret -; 129d5 -HasNoItems: ; 129d5 +HasNoItems: ld a, [wNumItems] and a ret nz @@ -612,7 +584,7 @@ HasNoItems: ; 129d5 and a ret -TossItemFromPC: ; 129f4 +TossItemFromPC: push de call PartyMonItemName farcall _CheckTossableItem @@ -677,36 +649,32 @@ TossItemFromPC: ; 129f4 db "@" ; 0x12a60 -CantUseItem: ; 12a60 +CantUseItem: ld hl, CantUseItemText call MenuTextBoxWaitButton ret -; 12a67 -CantUseItemText: ; 12a67 +CantUseItemText: text_jump UnknownText_0x1c1b03 db "@" -; 12a6c -PartyMonItemName: ; 12a6c +PartyMonItemName: ld a, [wCurItem] ld [wd265], a call GetItemName call CopyName1 ret -; 12a79 -CancelPokemonAction: ; 12a79 +CancelPokemonAction: farcall InitPartyMenuWithCancel farcall UnfreezeMonIcons ld a, 1 ret -; 12a88 -PokemonActionSubmenu: ; 12a88 +PokemonActionSubmenu: hlcoord 1, 15 lb bc, 2, 18 call ClearBox @@ -749,10 +717,9 @@ PokemonActionSubmenu: ; 12a88 dbw MONMENUITEM_CANCEL, CancelPokemonAction dbw MONMENUITEM_MOVE, ManagePokemonMoves dbw MONMENUITEM_MAIL, MonMailAction -; 12aec -SwitchPartyMons: ; 12aec +SwitchPartyMons: ; Don't try if there's nothing to switch! ld a, [wPartyCount] @@ -802,10 +769,9 @@ SwitchPartyMons: ; 12aec ld [wPartyMenuActionText], a call CancelPokemonAction ret -; 12b60 -GiveTakePartyMonItem: ; 12b60 +GiveTakePartyMonItem: ; Eggs can't hold items! ld a, [wCurPartySpecies] @@ -844,7 +810,6 @@ GiveTakePartyMonItem: ; 12b60 .cancel ld a, 3 ret -; 12ba9 .GiveItem: @@ -877,10 +842,9 @@ GiveTakePartyMonItem: ; 12b60 .quit ret -; 12bd9 -TryGiveItemToPartymon: ; 12bd9 +TryGiveItemToPartymon: call SpeechTextBox call PartyMonItemName @@ -942,10 +906,9 @@ TryGiveItemToPartymon: ; 12bd9 .abort ret -; 12c4c -GivePartyItem: ; 12c4c +GivePartyItem: call GetPartyItemLocation ld a, [wCurItem] @@ -957,10 +920,9 @@ GivePartyItem: ; 12c4c .done ret -; 12c60 -TakePartyItem: ; 12c60 +TakePartyItem: call SpeechTextBox call GetPartyItemLocation @@ -993,10 +955,9 @@ TakePartyItem: ; 12c60 .asm_12c9a ret -; 12c9b -GiveTakeItemMenuData: ; 12c9b +GiveTakeItemMenuData: db MENU_SPRITE_ANIMS | MENU_BACKUP_TILES ; flags menu_coords 12, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .Items @@ -1007,81 +968,69 @@ GiveTakeItemMenuData: ; 12c9b db 2 ; # items db "GIVE@" db "TAKE@" -; 12caf -TookAndMadeHoldText: ; 12caf +TookAndMadeHoldText: text_jump UnknownText_0x1c1b2c db "@" -; 12cb4 -MadeHoldText: ; 12cb4 +MadeHoldText: text_jump UnknownText_0x1c1b57 db "@" -; 12cb9 -PleaseRemoveMailText: ; 12cb9 +PleaseRemoveMailText: text_jump UnknownText_0x1c1b6f db "@" -; 12cbe -IsntHoldingAnythingText: ; 12cbe +IsntHoldingAnythingText: text_jump UnknownText_0x1c1b8e db "@" -; 12cc3 -ItemStorageIsFullText: ; 12cc3 +ItemStorageIsFullText: text_jump UnknownText_0x1c1baa db "@" -; 12cc8 -TookFromText: ; 12cc8 +TookFromText: text_jump UnknownText_0x1c1bc4 db "@" -; 12ccd -SwitchAlreadyHoldingText: ; 12ccd +SwitchAlreadyHoldingText: text_jump UnknownText_0x1c1bdc db "@" -; 12cd2 -CantBeHeldText: ; 12cd2 +CantBeHeldText: text_jump UnknownText_0x1c1c09 db "@" -; 12cd7 -GetPartyItemLocation: ; 12cd7 +GetPartyItemLocation: push af ld a, MON_ITEM call GetPartyParamLocation pop af ret -; 12cdf -ReceiveItemFromPokemon: ; 12cdf +ReceiveItemFromPokemon: ld a, 1 ld [wItemQuantityChangeBuffer], a ld hl, wNumItems jp ReceiveItem -; 12cea -GiveItemToPokemon: ; 12cea (4:6cea) +GiveItemToPokemon: ld a, 1 ld [wItemQuantityChangeBuffer], a ld hl, wNumItems jp TossItem -StartMenuYesNo: ; 12cf5 +StartMenuYesNo: call MenuTextBox call YesNoBox jp ExitMenu -; 12cfe -ComposeMailMessage: ; 12cfe (4:6cfe) +ComposeMailMessage: ld de, wTempMailMessage farcall _ComposeMailMessage ld hl, wPlayerName @@ -1110,7 +1059,7 @@ ComposeMailMessage: ; 12cfe (4:6cfe) call CloseSRAM ret -MonMailAction: ; 12d45 +MonMailAction: ; If in the time capsule or trade center, ; selecting the mail only allows you to ; read the mail. @@ -1181,7 +1130,6 @@ MonMailAction: ; 12d45 .done ld a, $3 ret -; 12dc9 .MenuHeader: @@ -1237,7 +1185,7 @@ MonMailAction: ; 12d45 ; 0x12e00 -OpenPartyStats: ; 12e00 +OpenPartyStats: call LoadStandardMenuHeader call ClearSprites ; PartyMon @@ -1249,10 +1197,9 @@ OpenPartyStats: ; 12e00 call Call_ExitMenu ld a, 0 ret -; 12e1b -MonMenu_Cut: ; 12e1b +MonMenu_Cut: farcall CutFunction ld a, [wFieldMoveSucceeded] cp $1 @@ -1264,10 +1211,9 @@ MonMenu_Cut: ; 12e1b .Fail: ld a, $3 ret -; 12e30 -MonMenu_Fly: ; 12e30 +MonMenu_Fly: farcall FlyFunction ld a, [wFieldMoveSucceeded] cp $2 @@ -1290,9 +1236,8 @@ MonMenu_Fly: ; 12e30 .Unreferenced: ld a, $1 ret -; 12e55 -MonMenu_Flash: ; 12e55 +MonMenu_Flash: farcall OWFlash ld a, [wFieldMoveSucceeded] cp $1 @@ -1304,9 +1249,8 @@ MonMenu_Flash: ; 12e55 .Fail: ld a, $3 ret -; 12e6a -MonMenu_Strength: ; 12e6a +MonMenu_Strength: farcall StrengthFunction ld a, [wFieldMoveSucceeded] cp $1 @@ -1318,9 +1262,8 @@ MonMenu_Strength: ; 12e6a .Fail: ld a, $3 ret -; 12e7f -MonMenu_Whirlpool: ; 12e7f +MonMenu_Whirlpool: farcall WhirlpoolFunction ld a, [wFieldMoveSucceeded] cp $1 @@ -1332,9 +1275,8 @@ MonMenu_Whirlpool: ; 12e7f .Fail: ld a, $3 ret -; 12e94 -MonMenu_Waterfall: ; 12e94 +MonMenu_Waterfall: farcall WaterfallFunction ld a, [wFieldMoveSucceeded] cp $1 @@ -1346,9 +1288,8 @@ MonMenu_Waterfall: ; 12e94 .Fail: ld a, $3 ret -; 12ea9 -MonMenu_Teleport: ; 12ea9 +MonMenu_Teleport: farcall TeleportFunction ld a, [wFieldMoveSucceeded] and a @@ -1360,9 +1301,8 @@ MonMenu_Teleport: ; 12ea9 .Fail: ld a, $3 ret -; 12ebd -MonMenu_Surf: ; 12ebd +MonMenu_Surf: farcall SurfFunction ld a, [wFieldMoveSucceeded] and a @@ -1374,9 +1314,8 @@ MonMenu_Surf: ; 12ebd .Fail: ld a, $3 ret -; 12ed1 -MonMenu_Dig: ; 12ed1 +MonMenu_Dig: farcall DigFunction ld a, [wFieldMoveSucceeded] cp $1 @@ -1388,9 +1327,8 @@ MonMenu_Dig: ; 12ed1 .Fail: ld a, $3 ret -; 12ee6 -MonMenu_Softboiled_MilkDrink: ; 12ee6 +MonMenu_Softboiled_MilkDrink: call .CheckMonHasEnoughHP jr nc, .NotEnoughHP farcall Softboiled_MilkDrinkFunction @@ -1405,7 +1343,6 @@ MonMenu_Softboiled_MilkDrink: ; 12ee6 ld [wPartyMenuActionText], a ld a, $3 ret -; 12f00 .Text_NotEnoughHP: ; Not enough HP! @@ -1433,9 +1370,8 @@ MonMenu_Softboiled_MilkDrink: ; 12ee6 ld a, [hQuotient + 1] sbc [hl] ret -; 12f26 -MonMenu_Headbutt: ; 12f26 +MonMenu_Headbutt: farcall HeadbuttFunction ld a, [wFieldMoveSucceeded] cp $1 @@ -1447,9 +1383,8 @@ MonMenu_Headbutt: ; 12f26 .Fail: ld a, $3 ret -; 12f3b -MonMenu_RockSmash: ; 12f3b +MonMenu_RockSmash: farcall RockSmashFunction ld a, [wFieldMoveSucceeded] cp $1 @@ -1461,16 +1396,14 @@ MonMenu_RockSmash: ; 12f3b .Fail: ld a, $3 ret -; 12f50 -MonMenu_SweetScent: ; 12f50 +MonMenu_SweetScent: farcall SweetScentFromMenu ld b, $4 ld a, $2 ret -; 12f5b -ChooseMoveToDelete: ; 12f5b +ChooseMoveToDelete: ld hl, wOptions ld a, [hl] push af @@ -1484,7 +1417,6 @@ ChooseMoveToDelete: ; 12f5b call ClearBGPalettes pop af ret -; 12f73 .ChooseMoveToDelete call SetUpMoveScreenBG @@ -1506,7 +1438,6 @@ ChooseMoveToDelete: ; 12f5b call PrepareToPlaceMoveData call PlaceMoveData jp .loop -; 12f9c .a_button and a @@ -1525,17 +1456,15 @@ ChooseMoveToDelete: ; 12f5b call ClearTileMap pop af ret -; 12fb2 -DeleteMoveScreenAttrs: ; 12fb2 +DeleteMoveScreenAttrs: db 3, 1 db 3, 1 db $40, $00 dn 2, 0 db D_UP | D_DOWN | A_BUTTON | B_BUTTON -; 12fba -ManagePokemonMoves: ; 12fba +ManagePokemonMoves: ld a, [wCurPartySpecies] cp EGG jr z, .egg @@ -1551,9 +1480,8 @@ ManagePokemonMoves: ; 12fba .egg ld a, $0 ret -; 12fd5 -MoveScreenLoop: ; 12fd5 +MoveScreenLoop: ld a, [wCurPartyMon] inc a ld [wPartyMenuCursor], a @@ -1613,7 +1541,6 @@ MoveScreenLoop: ; 12fd5 lb bc, 8, SCREEN_WIDTH - 2 call ClearBox jp .loop -; 1305b .d_right ld a, [wMoveSwapBuffer] @@ -1678,7 +1605,6 @@ MoveScreenLoop: ; 12fd5 and a jr z, .cycle_right jr .cycle_left_loop -; 130c6 .a_button call PlayClickSFX @@ -1729,7 +1655,6 @@ MoveScreenLoop: ; 12fd5 lb bc, 1, 9 call ClearBox jp .loop -; 1313a .copy_move push hl @@ -1752,7 +1677,6 @@ MoveScreenLoop: ; 12fd5 ld a, b ld [de], a ret -; 13154 .exit xor a @@ -1761,21 +1685,18 @@ MoveScreenLoop: ; 12fd5 res 6, [hl] call ClearSprites jp ClearTileMap -; 13163 -MoveScreenAttributes: ; 13163 +MoveScreenAttributes: db 3, 1 db 3, 1 db $40, $00 dn 2, 0 db D_UP | D_DOWN | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON -; 1316b -String_MoveWhere: ; 1316b +String_MoveWhere: db "Where?@" -; 13172 -SetUpMoveScreenBG: ; 13172 +SetUpMoveScreenBG: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -1821,9 +1742,8 @@ SetUpMoveScreenBG: ; 13172 hlcoord 16, 0 lb bc, 1, 3 jp ClearBox -; 131ef -SetUpMoveList: ; 131ef +SetUpMoveList: xor a ld [hBGMapMode], a ld [wMoveSwapBuffer], a @@ -1848,9 +1768,8 @@ SetUpMoveList: ; 131ef ld b, 5 ld c, 18 jp TextBox -; 13235 -PrepareToPlaceMoveData: ; 13235 +PrepareToPlaceMoveData: ld hl, wPartyMon1Moves ld bc, PARTYMON_STRUCT_LENGTH ld a, [wCurPartyMon] @@ -1865,9 +1784,8 @@ PrepareToPlaceMoveData: ; 13235 hlcoord 1, 12 lb bc, 5, 18 jp ClearBox -; 13256 -PlaceMoveData: ; 13256 +PlaceMoveData: xor a ld [hBGMapMode], a hlcoord 0, 10 @@ -1909,28 +1827,22 @@ PlaceMoveData: ; 13256 ld a, $1 ld [hBGMapMode], a ret -; 132ba -String_MoveType_Top: ; 132ba +String_MoveType_Top: db "┌─────┐@" -; 132c2 -String_MoveType_Bottom: ; 132c2 +String_MoveType_Bottom: db "│TYPE/└@" -; 132ca -String_MoveAtk: ; 132ca +String_MoveAtk: db "ATK/@" -; 132cf -String_MoveNoPower: ; 132cf +String_MoveNoPower: db "---@" -; 132d3 -Function132d3: ; 132d3 +Function132d3: call Function132da call Function132fe ret -; 132da -Function132da: ; 132da +Function132da: ld a, [wCurPartyMon] and a ret z @@ -1958,9 +1870,8 @@ Function132da: ; 132da hlcoord 16, 0 ld [hl], "◀" ret -; 132fe -Function132fe: ; 132fe +Function132fe: ld a, [wCurPartyMon] inc a ld c, a @@ -1990,4 +1901,3 @@ Function132fe: ; 132fe hlcoord 18, 0 ld [hl], "▶" ret -; 13327 diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm index e84c1c9f328..7a0249b6156 100644 --- a/engine/menus/trainer_card.asm +++ b/engine/menus/trainer_card.asm @@ -8,7 +8,7 @@ const TRAINERCARDSTATE_PAGE3_JOYPAD ; 5 const TRAINERCARDSTATE_QUIT ; 6 -TrainerCard: ; 25105 +TrainerCard: ld a, [wVramState] push af xor a @@ -38,7 +38,7 @@ TrainerCard: ; 25105 ld [wVramState], a ret -.InitRAM: ; 2513b (9:513b) +.InitRAM: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -78,10 +78,10 @@ TrainerCard: ; 25105 ld [hl], a ; wTrainerCardBadgeAttributes ret -.RunJumptable: ; 2518e (9:518e) +.RunJumptable: jumptable .Jumptable, wJumptableIndex -.Jumptable: ; 2519d (9:519d) +.Jumptable: ; entries correspond to TRAINERCARDSTATE_* constants dw TrainerCard_Page1_LoadGFX dw TrainerCard_Page1_Joypad @@ -91,17 +91,17 @@ TrainerCard: ; 25105 dw TrainerCard_Page3_Joypad dw TrainerCard_Quit -TrainerCard_IncrementJumptable: ; 251ab (9:51ab) +TrainerCard_IncrementJumptable: ld hl, wJumptableIndex inc [hl] ret -TrainerCard_Quit: ; 251b0 (9:51b0) +TrainerCard_Quit: ld hl, wJumptableIndex set 7, [hl] ret -TrainerCard_Page1_LoadGFX: ; 251b6 (9:51b6) +TrainerCard_Page1_LoadGFX: call ClearSprites hlcoord 0, 8 ld d, 6 @@ -115,7 +115,7 @@ TrainerCard_Page1_LoadGFX: ; 251b6 (9:51b6) call TrainerCard_IncrementJumptable ret -TrainerCard_Page1_Joypad: ; 251d7 (9:51d7) +TrainerCard_Page1_Joypad: call TrainerCard_Page1_PrintGameTime ld hl, hJoyLast ld a, [hl] @@ -136,9 +136,8 @@ TrainerCard_Page1_Joypad: ; 251d7 (9:51d7) ld [wJumptableIndex], a ret -; 251f4 -TrainerCard_Page2_LoadGFX: ; 251f4 (9:51f4) +TrainerCard_Page2_LoadGFX: call ClearSprites hlcoord 0, 8 ld d, 6 @@ -156,7 +155,7 @@ TrainerCard_Page2_LoadGFX: ; 251f4 (9:51f4) call TrainerCard_IncrementJumptable ret -TrainerCard_Page2_Joypad: ; 25221 (9:5221) +TrainerCard_Page2_Joypad: ld hl, TrainerCard_JohtoBadgesOAM call TrainerCard_Page2_3_AnimateBadges ld hl, hJoyLast @@ -186,7 +185,7 @@ TrainerCard_Page2_Joypad: ; 25221 (9:5221) ld [wJumptableIndex], a ret -TrainerCard_Page3_LoadGFX: ; 2524c (9:524c) +TrainerCard_Page3_LoadGFX: call ClearSprites hlcoord 0, 8 ld d, 6 @@ -204,7 +203,7 @@ TrainerCard_Page3_LoadGFX: ; 2524c (9:524c) call TrainerCard_IncrementJumptable ret -TrainerCard_Page3_Joypad: ; 25279 (9:5279) +TrainerCard_Page3_Joypad: ld hl, TrainerCard_JohtoBadgesOAM call TrainerCard_Page2_3_AnimateBadges ld hl, hJoyLast @@ -226,7 +225,7 @@ TrainerCard_Page3_Joypad: ; 25279 (9:5279) ld [wJumptableIndex], a ret -TrainerCard_PrintTopHalfOfCard: ; 25299 (9:5299) +TrainerCard_PrintTopHalfOfCard: hlcoord 0, 0 ld d, 5 call TrainerCard_InitBorder @@ -257,21 +256,19 @@ TrainerCard_PrintTopHalfOfCard: ; 25299 (9:5299) predef PlaceGraphic ret -; 252ec (9:52ec) -.Name_Money: ; 252ec +.Name_Money: db "NAME/" next "" next "MONEY@" -.ID_No: ; 252f9 +.ID_No: db $27, $28, -1 ; ID NO -.HorizontalDivider: ; 252fc +.HorizontalDivider: db $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $26, -1 ; ____________> -; 2530a -TrainerCard_Page1_PrintDexCaught_GameTime: ; 2530a (9:530a) +TrainerCard_Page1_PrintDexCaught_GameTime: hlcoord 2, 10 ld de, .Dex_PlayTime call PlaceString @@ -304,11 +301,10 @@ TrainerCard_Page1_PrintDexCaught_GameTime: ; 2530a (9:530a) .Badges: db " BADGES▶@" -.StatusTilemap: ; 25366 +.StatusTilemap: db $29, $2a, $2b, $2c, $2d, -1 -; 2536c -TrainerCard_Page2_3_InitObjectsAndStrings: ; 2536c (9:536c) +TrainerCard_Page2_3_InitObjectsAndStrings: hlcoord 2, 8 ld de, .BadgesTilemap call TrainerCardSetup_PlaceTilemapString @@ -338,13 +334,11 @@ endr call TrainerCard_Page2_3_OAMUpdate ret -; 253a2 (9:53a2) -.BadgesTilemap: ; 253a2 +.BadgesTilemap: db $79, $7a, $7b, $7c, $7d, -1 ; "BADGES" -; 253a8 -TrainerCardSetup_PlaceTilemapString: ; 253a8 (9:53a8) +TrainerCardSetup_PlaceTilemapString: .loop ld a, [de] cp -1 @@ -353,7 +347,7 @@ TrainerCardSetup_PlaceTilemapString: ; 253a8 (9:53a8) inc de jr .loop -TrainerCard_InitBorder: ; 253b0 (9:53b0) +TrainerCard_InitBorder: ld e, SCREEN_WIDTH .loop1 ld a, $23 @@ -411,7 +405,7 @@ TrainerCard_InitBorder: ; 253b0 (9:53b0) jr nz, .loop6 ret -TrainerCard_Page2_3_PlaceLeadersFaces: ; 253f4 (9:53f4) +TrainerCard_Page2_3_PlaceLeadersFaces: push de push hl ld [hli], a @@ -442,7 +436,7 @@ TrainerCard_Page2_3_PlaceLeadersFaces: ; 253f4 (9:53f4) pop de ret -TrainerCard_Page1_PrintGameTime: ; 25415 (9:5415) +TrainerCard_Page1_PrintGameTime: hlcoord 11, 12 ld de, wGameTimeHours lb bc, 2, 4 @@ -460,7 +454,7 @@ TrainerCard_Page1_PrintGameTime: ; 25415 (9:5415) ld [hl], a ret -TrainerCard_Page2_3_AnimateBadges: ; 25438 (9:5438) +TrainerCard_Page2_3_AnimateBadges: ld a, [hVBlankCounter] and %111 ret nz @@ -470,7 +464,7 @@ TrainerCard_Page2_3_AnimateBadges: ; 25438 (9:5438) ld [wTrainerCardBadgeFrameCounter], a jr TrainerCard_Page2_3_OAMUpdate -TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448) +TrainerCard_Page2_3_OAMUpdate: ; copy flag array pointer ld a, [hli] ld e, a @@ -510,7 +504,7 @@ TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448) jr nz, .loop ret -.PrepOAM: ; 2547b (9:547b) +.PrepOAM: ld a, [wTrainerCardBadgeTileID] and 1 << 7 jr nz, .xflip @@ -546,23 +540,22 @@ TrainerCard_Page2_3_OAMUpdate: ; 25448 (9:5448) inc de jr .loop2 -; 254a7 (9:54a7) -.facing1 ; 254a7 +.facing1 dsprite 0, 0, 0, 0, $00, 0 dsprite 0, 0, 1, 0, $01, 0 dsprite 1, 0, 0, 0, $02, 0 dsprite 1, 0, 1, 0, $03, 0 db -1 -.facing2 ; 254b8 +.facing2 dsprite 0, 0, 0, 0, $01, 0 | X_FLIP dsprite 0, 0, 1, 0, $00, 0 | X_FLIP dsprite 1, 0, 0, 0, $03, 0 | X_FLIP dsprite 1, 0, 1, 0, $02, 0 | X_FLIP db -1 -TrainerCard_JohtoBadgesOAM: ; 254c9 +TrainerCard_JohtoBadgesOAM: ; Template OAM data for each badge on the trainer card. ; Format: ; y, x, palette @@ -611,7 +604,6 @@ TrainerCard_JohtoBadgesOAM: ; 254c9 db $80, $78, 0 db $1c, $20, $24, $20 | (1 << 7) db $1c | (1 << 7), $20, $24, $20 | (1 << 7) -; 25523 CardStatusGFX: INCBIN "gfx/trainer_card/card_status.2bpp" diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm index 87ebfb14f95..e8d880816a9 100644 --- a/engine/movie/credits.asm +++ b/engine/movie/credits.asm @@ -3,7 +3,7 @@ INCLUDE "constants.asm" SECTION "Credits", ROMX -Credits:: ; 109847 +Credits:: bit 6, b ; Hall Of Fame ld a, $0 jr z, .okay @@ -104,18 +104,16 @@ Credits:: ; 109847 pop af ld [rSVBK], a ret -; 1098fd -Credits_HandleAButton: ; 1098fd +Credits_HandleAButton: ld a, [hJoypadDown] and A_BUTTON ret z ld a, [wJumptableIndex] bit 7, a ret -; 109908 -Credits_HandleBButton: ; 109908 +Credits_HandleBButton: ld a, [hJoypadDown] and B_BUTTON ret z @@ -136,9 +134,8 @@ Credits_HandleBButton: ; 109908 ret z dec [hl] ret -; 109926 -Credits_Jumptable: ; 109926 +Credits_Jumptable: ld a, [wJumptableIndex] and $f ld e, a @@ -150,9 +147,8 @@ Credits_Jumptable: ; 109926 ld h, [hl] ld l, a jp hl -; 109937 -.Jumptable: ; 109937 (42:5937) +.Jumptable: dw ParseCredits dw Credits_Next dw Credits_Next @@ -167,24 +163,24 @@ Credits_Jumptable: ; 109926 dw Credits_RequestGFX dw Credits_LoopBack -Credits_Next: ; 109951 (42:5951) +Credits_Next: ld hl, wJumptableIndex inc [hl] ret -Credits_LoopBack: ; 109956 (42:5956) +Credits_LoopBack: ld hl, wJumptableIndex ld a, [hl] and $f0 ld [hl], a ret -Credits_PrepBGMapUpdate: ; 10995e (42:595e) +Credits_PrepBGMapUpdate: xor a ld [hBGMapMode], a jp Credits_Next -Credits_UpdateGFXRequestPath: ; 109964 (42:5964) +Credits_UpdateGFXRequestPath: call Credits_LoadBorderGFX ld a, l ld [wRequested2bppSource], a @@ -196,14 +192,14 @@ Credits_UpdateGFXRequestPath: ; 109964 (42:5964) ld [wRequested2bppDest + 1], a jr Credits_RequestGFX -Credits_RequestGFX: ; 10997b (42:597b) +Credits_RequestGFX: xor a ld [hBGMapMode], a ld a, $8 ld [wRequested2bpp], a jp Credits_Next -Credits_LYOverride: ; 109986 (42:5986) +Credits_LYOverride: ld a, [rLY] cp $30 jr c, Credits_LYOverride @@ -217,17 +213,16 @@ Credits_LYOverride: ; 109986 (42:5986) call .Fill jp Credits_Next -.Fill: ; 1099a3 (42:59a3) +.Fill: ld c, $8 .loop ld [hli], a dec c jr nz, .loop ret -; 1099aa -ParseCredits: ; 1099aa +ParseCredits: ld hl, wJumptableIndex bit 7, [hl] jp nz, .done @@ -397,10 +392,9 @@ ParseCredits: ; 1099aa pop de pop hl ret -; 109a95 -ConstructCreditsTilemap: ; 109a95 (42:5a95) +ConstructCreditsTilemap: xor a ld [hBGMapMode], a ld a, $c @@ -453,7 +447,7 @@ ConstructCreditsTilemap: ; 109a95 (42:5a95) call WaitBGMap2 ret -.InitTopPortion: ; 109aff (42:5aff) +.InitTopPortion: ld b, 5 .outer_loop push hl @@ -478,7 +472,7 @@ endr jr nz, .outer_loop ret -DrawCreditsBorder: ; 109b1d (42:5b1d) +DrawCreditsBorder: ld c, SCREEN_WIDTH / 4 .loop push af @@ -492,7 +486,7 @@ endr jr nz, .loop ret -GetCreditsPalette: ; 109b2c +GetCreditsPalette: call .GetPalAddress push hl @@ -541,9 +535,8 @@ GetCreditsPalette: ; 109b2c CreditsPalettes: INCLUDE "gfx/credits/credits.pal" -; 109bca -Credits_LoadBorderGFX: ; 109bca (42:5bca) +Credits_LoadBorderGFX: ld hl, wCreditsBorderFrame ld a, [hl] cp $ff @@ -572,9 +565,8 @@ Credits_LoadBorderGFX: ; 109bca (42:5bca) .init ld hl, wCreditsFaux2bpp ret -; 109bf1 (42:5bf1) -.Frames: ; 109bf1 +.Frames: dw CreditsPichuGFX dw CreditsPichuGFX + 16 tiles dw CreditsPichuGFX + 32 tiles @@ -591,14 +583,13 @@ Credits_LoadBorderGFX: ; 109bca (42:5bca) dw CreditsIgglybuffGFX + 16 tiles dw CreditsIgglybuffGFX + 32 tiles dw CreditsIgglybuffGFX + 48 tiles -; 109c11 -Credits_TheEnd: ; 109c11 (42:5c11) +Credits_TheEnd: ld a, $40 hlcoord 6, 9 call .Load hlcoord 6, 10 -.Load: ; 109c1c (42:5c1c) +.Load: ld c, 8 .loop ld [hli], a @@ -606,7 +597,6 @@ Credits_TheEnd: ; 109c11 (42:5c11) dec c jr nz, .loop ret -; 109c24 (42:5c24) CreditsBorderGFX: INCBIN "gfx/credits/border.2bpp" diff --git a/engine/movie/crystal_intro.asm b/engine/movie/crystal_intro.asm index 56bb0275089..6e132cfecef 100644 --- a/engine/movie/crystal_intro.asm +++ b/engine/movie/crystal_intro.asm @@ -1,4 +1,4 @@ -Copyright_GFPresents: ; e4579 +Copyright_GFPresents: ld de, MUSIC_NONE call PlayMusic call ClearBGPalettes @@ -47,9 +47,8 @@ Copyright_GFPresents: ; e4579 call .StopGamefreakAnim and a ret -; e45e8 -.GetGFLogoGFX: ; e45e8 +.GetGFLogoGFX: ld de, GameFreakLogo ld hl, vTiles2 lb bc, BANK(GameFreakLogo), 28 @@ -104,18 +103,16 @@ Copyright_GFPresents: ; e4579 lb de, %11100100, %11100100 call DmgToCgbObjPals ret -; e465e -.StopGamefreakAnim: ; e465e +.StopGamefreakAnim: farcall ClearSpriteAnims call ClearTileMap call ClearSprites ld c, 16 call DelayFrames ret -; e4670 -PlaceGameFreakPresents: ; e4670 +PlaceGameFreakPresents: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -126,26 +123,22 @@ PlaceGameFreakPresents: ; e4670 ld h, [hl] ld l, a jp hl -; e467f -.dw ; e467f +.dw dw PlaceGameFreakPresents_0 dw PlaceGameFreakPresents_1 dw PlaceGameFreakPresents_2 dw PlaceGameFreakPresents_3 -; e4687 -PlaceGameFreakPresents_AdvanceIndex: ; e4687 +PlaceGameFreakPresents_AdvanceIndex: ld hl, wJumptableIndex inc [hl] ret -; e468c -PlaceGameFreakPresents_0: ; e468c +PlaceGameFreakPresents_0: ret -; e468d -PlaceGameFreakPresents_1: ; e468d +PlaceGameFreakPresents_1: ld hl, wIntroSceneTimer ld a, [hl] cp $20 @@ -163,16 +156,14 @@ PlaceGameFreakPresents_1: ; e468d ld de, SFX_GAME_FREAK_PRESENTS call PlaySFX ret -; e46af .GAME_FREAK: ; G A M E _ F R E A K db 0, 1, 2, 3, 13, 4, 5, 3, 1, 6 .end db "@" -; e46ba -PlaceGameFreakPresents_2: ; e46ba +PlaceGameFreakPresents_2: ld hl, wIntroSceneTimer ld a, [hl] cp $40 @@ -188,15 +179,13 @@ PlaceGameFreakPresents_2: ; e46ba call CopyBytes call PlaceGameFreakPresents_AdvanceIndex ret -; e46d6 .presents db 7, 8, 9, 10, 11, 12 .end db "@" -; e46dd -PlaceGameFreakPresents_3: ; e46dd +PlaceGameFreakPresents_3: ld hl, wIntroSceneTimer ld a, [hl] cp $80 @@ -208,10 +197,9 @@ PlaceGameFreakPresents_3: ; e46dd ld hl, wJumptableIndex set 7, [hl] ret -; e46ed -GameFreakLogoJumper: ; e46ed (39:46ed) +GameFreakLogoJumper: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld e, [hl] @@ -224,20 +212,20 @@ GameFreakLogoJumper: ; e46ed (39:46ed) ld l, a jp hl -GameFreakLogoScenes: ; e46fd (39:46fd) +GameFreakLogoScenes: dw GameFreakLogoScene1 dw GameFreakLogoScene2 dw GameFreakLogoScene3 dw GameFreakLogoScene4 dw GameFreakLogoScene5 -GameFreakLogoScene1: ; e4707 (39:4707) +GameFreakLogoScene1: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc inc [hl] ret -GameFreakLogoScene2: ; e470d (39:470d) +GameFreakLogoScene2: ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -283,7 +271,7 @@ GameFreakLogoScene2: ; e470d (39:470d) call PlaySFX ret -GameFreakLogoScene3: ; e4759 (39:4759) +GameFreakLogoScene3: ld hl, SPRITEANIMSTRUCT_0D add hl, bc ld a, [hl] @@ -303,7 +291,7 @@ GameFreakLogoScene3: ; e4759 (39:4759) call PlaySFX ret -GameFreakLogoScene4: ; e4776 (39:4776) +GameFreakLogoScene4: ld hl, SPRITEANIMSTRUCT_0D add hl, bc ld a, [hl] @@ -336,20 +324,17 @@ GameFreakLogoScene4: ; e4776 (39:4776) add hl, bc inc [hl] call PlaceGameFreakPresents_AdvanceIndex -GameFreakLogoScene5: ; e47ab (39:47ab) +GameFreakLogoScene5: ret -; e47ac (39:47ac) -GameFreakLogoPalettes: ; e47ac +GameFreakLogoPalettes: INCLUDE "gfx/intro/gamefreak_logo.pal" -; e47cc -GameFreakLogo: ; e47cc +GameFreakLogo: INCBIN "gfx/splash/logo1.1bpp" INCBIN "gfx/splash/logo2.1bpp" -; e48ac -CrystalIntro: ; e48ac +CrystalIntro: ld a, [rSVBK] push af ld a, BANK(wGBCPalettes) @@ -359,7 +344,7 @@ CrystalIntro: ; e48ac ld a, [hVBlank] push af call .InitRAMAddrs -.loop ; e48bc +.loop call JoyTextDelay ld a, [hJoyLast] and BUTTONS @@ -394,9 +379,8 @@ CrystalIntro: ; e48ac pop af ld [rSVBK], a ret -; e4901 -.InitRAMAddrs: ; e4901 +.InitRAMAddrs: xor a ld [hVBlank], a ld a, $1 @@ -405,9 +389,8 @@ CrystalIntro: ; e48ac ld [hMapAnims], a ld [wJumptableIndex], a ret -; e490f -IntroSceneJumper: ; e490f +IntroSceneJumper: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -418,9 +401,8 @@ IntroSceneJumper: ; e490f ld h, [hl] ld l, a jp hl -; e491e -IntroScenes: ; e491e (39:491e) +IntroScenes: dw IntroScene1 dw IntroScene2 dw IntroScene3 @@ -450,12 +432,12 @@ IntroScenes: ; e491e (39:491e) dw IntroScene27 dw IntroScene28 -NextIntroScene: ; e4956 (39:4956) +NextIntroScene: ld hl, wJumptableIndex inc [hl] ret -IntroScene1: ; e495b (39:495b) +IntroScene1: ; Setup the next scene. call Intro_ClearBGPals call ClearSprites @@ -507,7 +489,7 @@ IntroScene1: ; e495b (39:495b) call NextIntroScene ret -IntroScene2: ; e49d6 (39:49d6) +IntroScene2: ; First Unown (A) fades in, pulses, then fades out. ld hl, wIntroSceneFrameCounter ld a, [hl] @@ -531,7 +513,7 @@ IntroScene2: ; e49d6 (39:49d6) call NextIntroScene ret -IntroScene3: ; e49fd (39:49fd) +IntroScene3: ; More setup. Transition to the outdoor scene. call Intro_ClearBGPals call ClearSprites @@ -579,7 +561,7 @@ IntroScene3: ; e49fd (39:49fd) call NextIntroScene ret -IntroScene4: ; e4a69 (39:4a69) +IntroScene4: ; Scroll the outdoor panorama for a bit. call Intro_PerspectiveScrollBG ld hl, wIntroSceneFrameCounter @@ -593,7 +575,7 @@ IntroScene4: ; e4a69 (39:4a69) call NextIntroScene ret -IntroScene5: ; e4a7a (39:4a7a) +IntroScene5: ; Go back to the Unown. call Intro_ClearBGPals call ClearSprites @@ -646,7 +628,7 @@ IntroScene5: ; e4a7a (39:4a7a) call NextIntroScene ret -IntroScene6: ; e4af7 (39:4af7) +IntroScene6: ; Two more Unown (I, H) fade in. ld hl, wIntroSceneFrameCounter ld a, [hl] @@ -691,7 +673,7 @@ IntroScene6: ; e4af7 (39:4af7) call NextIntroScene ret -IntroScene7: ; e4b3f (39:4b3f) +IntroScene7: ; Back to the outdoor scene. call Intro_ClearBGPals call ClearSprites @@ -762,7 +744,7 @@ IntroScene7: ; e4b3f (39:4b3f) call NextIntroScene ret -IntroScene8: ; e4bd3 (39:4bd3) +IntroScene8: ; Scroll the scene, then show Suicune running across the screen. ld hl, wIntroSceneFrameCounter ld a, [hl] @@ -791,7 +773,7 @@ IntroScene8: ; e4bd3 (39:4bd3) call NextIntroScene ret -IntroScene9: ; e4c04 (39:4c04) +IntroScene9: ; Set up the next scene (same bg). xor a ld [hLCDCPointer], a @@ -828,7 +810,7 @@ IntroScene9: ; e4c04 (39:4c04) call NextIntroScene ret -IntroScene10: ; e4c4f (39:4c4f) +IntroScene10: ; Wooper and Pichu enter. call Intro_RustleGrass ld hl, wIntroSceneFrameCounter @@ -861,7 +843,7 @@ IntroScene10: ; e4c4f (39:4c4f) call NextIntroScene ret -IntroScene11: ; e4c86 (39:4c86) +IntroScene11: ; Back to Unown again. call Intro_ClearBGPals call ClearSprites @@ -911,7 +893,7 @@ IntroScene11: ; e4c86 (39:4c86) call NextIntroScene ret -IntroScene12: ; e4cfa (39:4cfa) +IntroScene12: ; Even more Unown. call .PlayUnownSound ld hl, wIntroSceneFrameCounter @@ -951,7 +933,7 @@ IntroScene12: ; e4cfa (39:4cfa) call NextIntroScene ret -.PlayUnownSound: ; e4d36 (39:4d36) +.PlayUnownSound: ld a, [wIntroSceneFrameCounter] ld c, a ld hl, .UnownSounds @@ -973,9 +955,8 @@ IntroScene12: ; e4cfa (39:4cfa) pop de call PlaySFX ret -; e4d54 (39:4d54) -.UnownSounds: ; e4d54 +.UnownSounds: dbw $00, SFX_INTRO_UNOWN_3 dbw $20, SFX_INTRO_UNOWN_2 dbw $40, SFX_INTRO_UNOWN_1 @@ -984,9 +965,9 @@ IntroScene12: ; e4cfa (39:4cfa) dbw $90, SFX_INTRO_UNOWN_2 dbw $a0, SFX_INTRO_UNOWN_1 dbw $b0, SFX_INTRO_UNOWN_2 - db -1 ; e4d6d + db -1 -IntroScene13: ; e4d6d (39:4d6d) +IntroScene13: ; Switch scenes again. call Intro_ClearBGPals call ClearSprites @@ -1045,7 +1026,7 @@ IntroScene13: ; e4d6d (39:4d6d) call NextIntroScene ret -IntroScene14: ; e4dfa (39:4dfa) +IntroScene14: ; Suicune runs then jumps. ld a, [hSCX] sub 10 @@ -1090,7 +1071,7 @@ IntroScene14: ; e4dfa (39:4dfa) call NextIntroScene ret -IntroScene15: ; e4e40 (39:4e40) +IntroScene15: ; Transition to a new scene. call Intro_ClearBGPals call ClearSprites @@ -1154,7 +1135,7 @@ IntroScene15: ; e4e40 (39:4e40) call NextIntroScene ret -IntroScene16: ; e4edc (39:4edc) +IntroScene16: ; Suicune shows its face. An Unown appears in front. ld hl, wIntroSceneFrameCounter ld a, [hl] @@ -1172,7 +1153,7 @@ IntroScene16: ; e4edc (39:4edc) call NextIntroScene ret -IntroScene17: ; e4ef5 (39:4ef5) +IntroScene17: ; ... call Intro_ClearBGPals call ClearSprites @@ -1221,7 +1202,7 @@ IntroScene17: ; e4ef5 (39:4ef5) call NextIntroScene ret -IntroScene18: ; e4f67 (39:4f67) +IntroScene18: ; Suicune close up. ld hl, wIntroSceneFrameCounter ld a, [hl] @@ -1238,7 +1219,7 @@ IntroScene18: ; e4f67 (39:4f67) call NextIntroScene ret -IntroScene19: ; e4f7e (39:4f7e) +IntroScene19: ; More setup. call Intro_ClearBGPals call ClearSprites @@ -1303,7 +1284,7 @@ IntroScene19: ; e4f7e (39:4f7e) call NextIntroScene ret -IntroScene20: ; e5019 (39:5019) +IntroScene20: ; Suicune running away. A bunch of Unown appear. ld hl, wIntroSceneFrameCounter ld a, [hl] @@ -1335,7 +1316,6 @@ IntroScene20: ; e5019 (39:5019) xor a call Intro_Scene20_AppearUnown ret -; e5049 (39:5049) ; unused ld a, c and $1c @@ -1350,7 +1330,7 @@ IntroScene20: ; e5019 (39:5019) call NextIntroScene ret -IntroScene21: ; e505d (39:505d) +IntroScene21: ; Suicune gets more distant and turns black. call Intro_ColoredSuicuneFrameSwap ld c, 3 @@ -1362,7 +1342,7 @@ IntroScene21: ; e505d (39:505d) call NextIntroScene ret -IntroScene22: ; e5072 (39:5072) +IntroScene22: ld hl, wIntroSceneFrameCounter ld a, [hl] inc [hl] @@ -1374,13 +1354,13 @@ IntroScene22: ; e5072 (39:5072) call NextIntroScene ret -IntroScene23: ; e5086 (39:5086) +IntroScene23: xor a ld [wIntroSceneFrameCounter], a call NextIntroScene ret -IntroScene24: ; e508e (39:508e) +IntroScene24: ; Fade to white. ld hl, wIntroSceneFrameCounter ld a, [hl] @@ -1404,7 +1384,7 @@ IntroScene24: ; e508e (39:508e) call NextIntroScene ret -IntroScene25: ; e50ad (39:50ad) +IntroScene25: ; Wait around a bit. ld a, [wIntroSceneFrameCounter] dec a @@ -1416,7 +1396,7 @@ IntroScene25: ; e50ad (39:50ad) call NextIntroScene ret -IntroScene26: ; e50bb (39:50bb) +IntroScene26: ; Load the final scene. call ClearBGPalettes call ClearSprites @@ -1465,7 +1445,7 @@ IntroScene26: ; e50bb (39:50bb) call NextIntroScene ret -IntroScene27: ; e512d (39:512d) +IntroScene27: ; Spell out C R Y S T A L with Unown. ld hl, wIntroSceneTimer inc [hl] @@ -1490,7 +1470,7 @@ IntroScene27: ; e512d (39:512d) ld [wIntroSceneFrameCounter], a ret -IntroScene28: ; e5152 (39:5152) +IntroScene28: ; Cut out when the music ends, and lead into the title screen. ld hl, wIntroSceneFrameCounter ld a, [hl] @@ -1515,7 +1495,7 @@ IntroScene28: ; e5152 (39:5152) set 7, [hl] ret -Intro_Scene24_ApplyPaletteFade: ; e5172 (39:5172) +Intro_Scene24_ApplyPaletteFade: ; load the (a)th palette from .FadePals to all wBGPals2 ld hl, .FadePals add l @@ -1547,13 +1527,11 @@ Intro_Scene24_ApplyPaletteFade: ; e5172 (39:5172) ld a, $1 ld [hCGBPalUpdate], a ret -; e519c (39:519c) -.FadePals: ; e519c +.FadePals: INCLUDE "gfx/intro/fade.pal" -; e51dc -CrystalIntro_InitUnownAnim: ; e51dc (39:51dc) +CrystalIntro_InitUnownAnim: push de ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN call _InitSpriteAnimStruct @@ -1593,7 +1571,7 @@ CrystalIntro_InitUnownAnim: ; e51dc (39:51dc) call ReinitSpriteAnimFrame ret -CrystalIntro_UnownFade: ; e5223 (39:5223) +CrystalIntro_UnownFade: add a add a add a @@ -1673,36 +1651,32 @@ CrystalIntro_UnownFade: ; e5223 (39:5223) ld a, $1 ld [hCGBPalUpdate], a ret -; e5288 (39:5288) -.BWFade: ; e5288 +.BWFade: ; Fade between black and white. hue = 0 rept 32 RGB hue, hue, hue hue = hue + 1 endr -; e52c8 -.BlackLBlueFade: ; e52c8 +.BlackLBlueFade: ; Fade between black and light blue. hue = 0 rept 32 RGB 0, hue / 2, hue hue = hue + 1 endr -; e5308 -.BlackBlueFade: ; e5308 +.BlackBlueFade: ; Fade between black and blue. hue = 0 rept 32 RGB 0, 0, hue hue = hue + 1 endr -; e5348 -Intro_Scene20_AppearUnown: ; e5348 (39:5348) +Intro_Scene20_AppearUnown: ; Spawn the palette for the nth Unown and a jr nz, .load_pal_2 @@ -1755,25 +1729,22 @@ Intro_Scene20_AppearUnown: ; e5348 (39:5348) ld a, $1 ld [hCGBPalUpdate], a ret -; e538d (39:538d) -.pal1 ; e538d +.pal1 RGB 24, 12, 09 RGB 31, 31, 31 RGB 12, 00, 31 RGB 00, 00, 00 -; e5395 -.pal2 ; e5395 +.pal2 RGB 24, 12, 09 RGB 31, 31, 31 RGB 31, 31, 31 RGB 31, 31, 31 -; e539d -Intro_FadeUnownWordPals: ; e539d (39:539d) +Intro_FadeUnownWordPals: add a add a add a @@ -1823,9 +1794,8 @@ endr ld a, $1 ld [hCGBPalUpdate], a ret -; e53db (39:53db) -.FastFadePalettes: ; e53db +.FastFadePalettes: hue = 31 rept 8 RGB hue, hue, hue @@ -1833,17 +1803,15 @@ hue = hue + -1 RGB hue, hue, hue hue = hue + -2 endr -; e53fb -.SlowFadePalettes: ; e53fb +.SlowFadePalettes: hue = 31 rept 16 RGB hue, hue, hue hue = hue + -1 endr -; e541b -Intro_LoadTilemap: ; e541b (39:541b) +Intro_LoadTilemap: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -1873,7 +1841,7 @@ Intro_LoadTilemap: ; e541b (39:541b) ld [rSVBK], a ret -Intro_Scene16_AnimateSuicune: ; e5441 (39:5441) +Intro_Scene16_AnimateSuicune: ld a, [wIntroSceneFrameCounter] and $3 jr z, Intro_ColoredSuicuneFrameSwap @@ -1886,7 +1854,7 @@ Intro_Scene16_AnimateSuicune: ; e5441 (39:5441) ld [hBGMapMode], a ret -Intro_ColoredSuicuneFrameSwap: ; e5451 (39:5451) +Intro_ColoredSuicuneFrameSwap: hlcoord 0, 0 ld bc, SCREEN_HEIGHT * SCREEN_WIDTH .loop @@ -1907,7 +1875,7 @@ Intro_ColoredSuicuneFrameSwap: ; e5451 (39:5451) ld [hBGMapMode], a ret -Intro_RustleGrass: ; e546d (39:546d) +Intro_RustleGrass: ld a, [wIntroSceneFrameCounter] cp 36 ret nc @@ -1928,21 +1896,19 @@ Intro_RustleGrass: ; e546d (39:546d) ld a, 4 ld [wRequested2bppSize], a ret -; e5496 (39:5496) -.RustlingGrassPointers: ; e5496 +.RustlingGrassPointers: dw IntroGrass1GFX dw IntroGrass2GFX dw IntroGrass3GFX dw IntroGrass2GFX -; e549e -Intro_SetCGBPalUpdate: ; e549e (39:549e) +Intro_SetCGBPalUpdate: ld a, $1 ld [hCGBPalUpdate], a ret -Intro_ClearBGPals: ; e54a3 (39:54a3) +Intro_ClearBGPals: ld a, [rSVBK] push af ld a, BANK(wBGPals2) @@ -1961,7 +1927,7 @@ Intro_ClearBGPals: ; e54a3 (39:54a3) call DelayFrame ret -Intro_DecompressRequest2bpp_128Tiles: ; e54c2 (39:54c2) +Intro_DecompressRequest2bpp_128Tiles: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -1980,7 +1946,7 @@ Intro_DecompressRequest2bpp_128Tiles: ; e54c2 (39:54c2) ld [rSVBK], a ret -Intro_DecompressRequest2bpp_255Tiles: ; e54de (39:54de) +Intro_DecompressRequest2bpp_255Tiles: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -1999,7 +1965,7 @@ Intro_DecompressRequest2bpp_255Tiles: ; e54de (39:54de) ld [rSVBK], a ret -Intro_DecompressRequest2bpp_64Tiles: ; e54fa (39:54fa) +Intro_DecompressRequest2bpp_64Tiles: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -2018,7 +1984,7 @@ Intro_DecompressRequest2bpp_64Tiles: ; e54fa (39:54fa) ld [rSVBK], a ret -Intro_ResetLYOverrides: ; e5516 (39:5516) +Intro_ResetLYOverrides: ld a, [rSVBK] push af ld a, BANK(wLYOverrides) @@ -2035,7 +2001,7 @@ Intro_ResetLYOverrides: ; e5516 (39:5516) ld [hLCDCPointer], a ret -Intro_PerspectiveScrollBG: ; e552f (39:552f) +Intro_PerspectiveScrollBG: ld a, [rSVBK] push af ld a, BANK(wLYOverrides) @@ -2066,134 +2032,104 @@ Intro_PerspectiveScrollBG: ; e552f (39:552f) ld [rSVBK], a ret -IntroSuicuneRunGFX: ; e555d +IntroSuicuneRunGFX: INCBIN "gfx/intro/suicune_run.2bpp.lz" -; e592d -IntroPichuWooperGFX: ; e592d +IntroPichuWooperGFX: INCBIN "gfx/intro/pichu_wooper.2bpp.lz" -; e5c7d -IntroBackgroundGFX: ; e5c7d +IntroBackgroundGFX: INCBIN "gfx/intro/background.2bpp.lz" -; e5e6d -IntroTilemap004: ; e5e6d +IntroTilemap004: INCBIN "gfx/intro/004.tilemap.lz" -; e5ecd -IntroTilemap003: ; e5ecd +IntroTilemap003: INCBIN "gfx/intro/003.tilemap.lz" -; e5edd -IntroPalette1: ; e5edd +IntroPalette1: INCLUDE "gfx/intro/intro_1.pal" -; e5f5d -IntroUnownsGFX: ; e5f5d +IntroUnownsGFX: INCBIN "gfx/intro/unowns.2bpp.lz" -; e634d -IntroPulseGFX: ; e634d +IntroPulseGFX: INCBIN "gfx/intro/pulse.2bpp.lz" -; e63dd -IntroTilemap002: ; e63dd +IntroTilemap002: INCBIN "gfx/intro/002.tilemap.lz" -; e641d -IntroTilemap001: ; e641d +IntroTilemap001: INCBIN "gfx/intro/001.tilemap.lz" -; e642d -IntroTilemap006: ; e642d +IntroTilemap006: INCBIN "gfx/intro/006.tilemap.lz" -; e647d -IntroTilemap005: ; e647d +IntroTilemap005: INCBIN "gfx/intro/005.tilemap.lz" -; e649d -IntroTilemap008: ; e649d +IntroTilemap008: INCBIN "gfx/intro/008.tilemap.lz" -; e655d -IntroTilemap007: ; e655d +IntroTilemap007: INCBIN "gfx/intro/007.tilemap.lz" -; e65ad -IntroPalette2: ; e65ad +IntroPalette2: INCLUDE "gfx/intro/intro_2.pal" -; e662d -IntroCrystalUnownsGFX: ; e662d +IntroCrystalUnownsGFX: INCBIN "gfx/intro/crystal_unowns.2bpp.lz" -; e672d -IntroTilemap017: ; e672d +IntroTilemap017: INCBIN "gfx/intro/017.tilemap.lz" -; e676d -IntroTilemap015: ; e676d +IntroTilemap015: INCBIN "gfx/intro/015.tilemap.lz" -; e679d -IntroPalette3: ; e679d +IntroPalette3: INCLUDE "gfx/intro/intro_3.pal" -; e681d -IntroSuicuneCloseGFX: ; e681d +IntroSuicuneCloseGFX: INCBIN "gfx/intro/suicune_close.2bpp.lz" -; e6c3d -IntroTilemap012: ; e6c3d +IntroTilemap012: INCBIN "gfx/intro/012.tilemap.lz" -; e6d0d -IntroTilemap011: ; e6d0d +IntroTilemap011: INCBIN "gfx/intro/011.tilemap.lz" -; e6d6d -IntroPalette4: ; e6d6d +IntroPalette4: INCLUDE "gfx/intro/intro_4.pal" -; e6ded -IntroSuicuneJumpGFX: ; e6ded +IntroSuicuneJumpGFX: INCBIN "gfx/intro/suicune_jump.2bpp.lz" -; e72ad -IntroSuicuneBackGFX: ; e72ad +IntroSuicuneBackGFX: INCBIN "gfx/intro/suicune_back.2bpp.lz" -; e764d -IntroTilemap010: ; e764d +IntroTilemap010: INCBIN "gfx/intro/010.tilemap.lz" -; e76ad -IntroTilemap009: ; e76ad +IntroTilemap009: INCBIN "gfx/intro/009.tilemap.lz" -; e76bd -IntroTilemap014: ; e76bd +IntroTilemap014: INCBIN "gfx/intro/014.tilemap.lz" -; e778d -IntroTilemap013: ; e778d +IntroTilemap013: INCBIN "gfx/intro/013.tilemap.lz" -; e77dd -IntroPalette5: ; e77dd +IntroPalette5: INCLUDE "gfx/intro/intro_5.pal" -IntroUnownBackGFX: ; e785d +IntroUnownBackGFX: INCBIN "gfx/intro/unown_back.2bpp.lz" -; e799d -IntroGrass1GFX: ; e799d +IntroGrass1GFX: INCBIN "gfx/intro/grass1.2bpp" -IntroGrass2GFX: ; e79dd +IntroGrass2GFX: INCBIN "gfx/intro/grass2.2bpp" -IntroGrass3GFX: ; e7a1d +IntroGrass3GFX: INCBIN "gfx/intro/grass3.2bpp" -IntroGrass4GFX: ; e7a5d +IntroGrass4GFX: INCBIN "gfx/intro/grass4.2bpp" diff --git a/engine/movie/evolution_animation.asm b/engine/movie/evolution_animation.asm index 978f9e968d8..426636a0e9c 100644 --- a/engine/movie/evolution_animation.asm +++ b/engine/movie/evolution_animation.asm @@ -1,4 +1,4 @@ -EvolutionAnimation: ; 4e5e1 +EvolutionAnimation: push hl push de push bc @@ -27,9 +27,8 @@ EvolutionAnimation: ; 4e5e1 scf ret -; 4e607 -.EvolutionAnimation: ; 4e607 +.EvolutionAnimation: ld a, %11100100 ld [rOBP0], a @@ -150,20 +149,17 @@ EvolutionAnimation: ; 4e5e1 ld a, [wPlayerHPPal] call PlayMonCry ret -; 4e703 -.GetSGBLayout: ; 4e703 +.GetSGBLayout: ld b, SCGB_EVOLUTION jp GetSGBLayout -; 4e708 -.PlaceFrontpic: ; 4e708 +.PlaceFrontpic: call GetBaseData hlcoord 7, 2 jp PrepMonFrontpic -; 4e711 -.LoadFrontpic: ; 4e711 +.LoadFrontpic: call GetBaseData ld a, $1 ld [wBoxAlignment], a @@ -172,9 +168,8 @@ EvolutionAnimation: ; 4e5e1 xor a ld [wBoxAlignment], a ret -; 4e726 -.AnimationSequence: ; 4e726 +.AnimationSequence: call ClearJoypad lb bc, 1, 2 * 7 ; flash b times, wait c frames in between .loop @@ -195,9 +190,8 @@ EvolutionAnimation: ; 4e5e1 .exit_sequence scf ret -; 4e741 -.Flash: ; 4e741 +.Flash: ld a, -7 * 7 ; new stage ld [wEvolutionPicOffset], a call .ReplaceFrontpic @@ -207,9 +201,8 @@ EvolutionAnimation: ; 4e5e1 dec b jr nz, .Flash ret -; 4e755 -.ReplaceFrontpic: ; 4e755 +.ReplaceFrontpic: push bc xor a ld [hBGMapMode], a @@ -233,9 +226,8 @@ EvolutionAnimation: ; 4e5e1 call WaitBGMap pop bc ret -; 4e779 -.WaitFrames_CheckPressedB: ; 4e779 +.WaitFrames_CheckPressedB: call DelayFrame push bc call JoyTextDelay @@ -255,9 +247,8 @@ EvolutionAnimation: ; 4e5e1 jr nz, .loop3 scf ret -; 4e794 -.check_statused ; 4e794 +.check_statused ld a, [wCurPartyMon] ld hl, wPartyMon1Species call GetPartyLocation @@ -265,9 +256,8 @@ EvolutionAnimation: ; 4e5e1 ld c, l farcall CheckFaintedFrzSlp ret -; 4e7a6 -.PlayEvolvedSFX: ; 4e7a6 +.PlayEvolvedSFX: ld a, [wEvolutionCanceled] and a ret nz @@ -292,9 +282,8 @@ EvolutionAnimation: ; 4e5e1 pop af ld [wJumptableIndex], a ret -; 4e7cf -.balls_of_light ; 4e7cf +.balls_of_light ld hl, wJumptableIndex ld a, [hl] cp 32 @@ -311,9 +300,8 @@ EvolutionAnimation: ; 4e5e1 .done_balls scf ret -; 4e7e8 -.GenerateBallOfLight: ; 4e7e8 +.GenerateBallOfLight: push de depixel 9, 11 ld a, SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT @@ -333,9 +321,8 @@ EvolutionAnimation: ; 4e5e1 add hl, bc ld [hl], $10 ret -; 4e80c -.AnimateBallsOfLight: ; 4e80c +.AnimateBallsOfLight: push bc callfar PlaySpriteAnimations ; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES @@ -360,7 +347,6 @@ endr pop bc call DelayFrame ret -; 4e831 .GFX: diff --git a/engine/movie/gbc_only.asm b/engine/movie/gbc_only.asm index badd953aafb..39a2ea47e9b 100644 --- a/engine/movie/gbc_only.asm +++ b/engine/movie/gbc_only.asm @@ -1,4 +1,4 @@ -GBCOnlyScreen: ; 4ea82 +GBCOnlyScreen: ld a, [hCGB] and a @@ -37,10 +37,9 @@ GBCOnlyScreen: ; 4ea82 .loop call DelayFrame jr .loop -; 4eac5 -DrawGBCOnlyScreen: ; 4eac5 +DrawGBCOnlyScreen: call DrawGBCOnlyBorder @@ -63,10 +62,9 @@ DrawGBCOnlyScreen: ; 4eac5 call PlaceString ret -; 4eaea -DrawGBCOnlyBorder: ; 4eaea +DrawGBCOnlyBorder: hlcoord 0, 0 ld [hl], 0 ; top-left @@ -94,18 +92,16 @@ DrawGBCOnlyBorder: ; 4eaea ld [hl], 7 ; bottom-right ret -; 4eb15 -.FillRow: ; 4eb15 +.FillRow: ld c, SCREEN_WIDTH - 2 .next_column ld [hli], a dec c jr nz, .next_column ret -; 4eb1c -.FillColumn: ; 4eb1c +.FillColumn: ld de, SCREEN_WIDTH ld c, SCREEN_HEIGHT - 2 .next_row @@ -114,10 +110,9 @@ DrawGBCOnlyBorder: ; 4eaea dec c jr nz, .next_row ret -; 4eb27 -DrawGBCOnlyGraphic: ; 4eb27 +DrawGBCOnlyGraphic: ld de, SCREEN_WIDTH .y push bc @@ -133,17 +128,14 @@ DrawGBCOnlyGraphic: ; 4eb27 dec c jr nz, .y ret -; 4eb38 -GBCOnlyString: ; 4eb38 +GBCOnlyString: db "This Game Pak is" next "designed only for" next "use on the" next "Game Boy Color.@" -; 4eb76 -GBCOnlyGFX: ; 4eb76 +GBCOnlyGFX: INCBIN "gfx/sgb/gbc_only.2bpp.lz" -; 4f0bc diff --git a/engine/movie/init_hof_credits.asm b/engine/movie/init_hof_credits.asm index e8e98a0e1b4..cc98e9e151c 100644 --- a/engine/movie/init_hof_credits.asm +++ b/engine/movie/init_hof_credits.asm @@ -1,4 +1,4 @@ -InitDisplayForHallOfFame: ; 4e881 +InitDisplayForHallOfFame: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -28,7 +28,7 @@ InitDisplayForHallOfFame: ; 4e881 text_jump UnknownText_0x1bd39e db "@" -InitDisplayForRedCredits: ; 4e8c2 +InitDisplayForRedCredits: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -60,7 +60,7 @@ InitDisplayForRedCredits: ; 4e8c2 call SetPalettes ret -ResetDisplayBetweenHallOfFameMons: ; 4e906 +ResetDisplayBetweenHallOfFameMons: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) diff --git a/engine/movie/title.asm b/engine/movie/title.asm index ad1246790dc..56402c7df36 100644 --- a/engine/movie/title.asm +++ b/engine/movie/title.asm @@ -1,4 +1,4 @@ -_TitleScreen: ; 10ed67 +_TitleScreen: call ClearBGPalettes call ClearSprites @@ -228,9 +228,8 @@ _TitleScreen: ; 10ed67 call PlaySFX ret -; 10eea7 -SuicuneFrameIterator: ; 10eea7 +SuicuneFrameIterator: ld hl, wd002 ld a, [hl] ld c, a @@ -257,17 +256,15 @@ SuicuneFrameIterator: ; 10eea7 ld a, $3 ld [hBGMapThird], a ret -; 10eece -.Frames: ; 10eece +.Frames: db $80 ; vTiles4 tile $00 db $88 ; vTiles4 tile $08 db $00 ; vTiles5 tile $00 db $08 ; vTiles5 tile $08 -; 10eed2 -LoadSuicuneFrame: ; 10eed2 +LoadSuicuneFrame: hlcoord 6, 12 ld b, 6 .bgrows @@ -290,9 +287,8 @@ LoadSuicuneFrame: ; 10eed2 dec b jr nz, .bgrows ret -; 10eeef -DrawTitleGraphic: ; 10eeef +DrawTitleGraphic: ; input: ; hl: draw location ; b: height @@ -320,9 +316,8 @@ DrawTitleGraphic: ; 10eeef dec b jr nz, .bgrows ret -; 10ef06 -InitializeBackground: ; 10ef06 +InitializeBackground: ld hl, wVirtualOAMSprite00 ld d, -$22 ld e, $0 @@ -337,9 +332,8 @@ InitializeBackground: ; 10ef06 dec c jr nz, .loop ret -; 10ef1c -.InitColumn: ; 10ef1c +.InitColumn: ld c, $6 ld b, $40 .loop2 @@ -358,10 +352,9 @@ InitializeBackground: ; 10ef06 dec c jr nz, .loop2 ret -; 10ef32 -AnimateTitleCrystal: ; 10ef32 +AnimateTitleCrystal: ; Move the title screen crystal downward until it's fully visible ; Stop at y=6 @@ -384,19 +377,15 @@ endr jr nz, .loop ret -; 10ef46 -TitleSuicuneGFX: ; 10ef46 +TitleSuicuneGFX: INCBIN "gfx/title/suicune.2bpp.lz" -; 10f326 -TitleLogoGFX: ; 10f326 +TitleLogoGFX: INCBIN "gfx/title/logo.2bpp.lz" -; 10fcee -TitleCrystalGFX: ; 10fcee +TitleCrystalGFX: INCBIN "gfx/title/crystal.2bpp.lz" -; 10fede TitleScreenPalettes: INCLUDE "gfx/title/title.pal" diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm index 0b9c7268132..1b17ff6700e 100644 --- a/engine/movie/trade_animation.asm +++ b/engine/movie/trade_animation.asm @@ -9,7 +9,7 @@ TRADEANIM_LEFT_ARROW EQU $ee const TRADEANIMSTATE_3 ; 3 TRADEANIMJUMPTABLE_LENGTH EQU const_value -TradeAnimation: ; 28f24 +TradeAnimation: xor a ld [wcf66], a ld hl, wPlayerTrademonSenderName @@ -60,7 +60,7 @@ TradeAnimation: ; 28f24 tradeanim_scroll_out_right tradeanim_end -TradeAnimationPlayer2: ; 28f63 +TradeAnimationPlayer2: xor a ld [wcf66], a ld hl, wOTTrademonSenderName @@ -110,7 +110,7 @@ TradeAnimationPlayer2: ; 28f63 tradeanim_scroll_out_right tradeanim_end -RunTradeAnimScript: ; 28fa1 +RunTradeAnimScript: ld hl, wTradeAnimAddress ld [hl], e inc hl @@ -144,9 +144,8 @@ RunTradeAnimScript: ; 28fa1 ld [hMapAnims], a ret -; 28fdb -.TradeAnimLayout: ; 28fdb +.TradeAnimLayout: xor a ld [wJumptableIndex], a call ClearBGPalettes @@ -212,9 +211,8 @@ RunTradeAnimScript: ; 28fa1 call TradeAnim_NormalPals ret -; 29082 -DoTradeAnimation: ; 29082 +DoTradeAnimation: ld a, [wJumptableIndex] bit 7, a jr nz, .finished @@ -231,9 +229,8 @@ DoTradeAnimation: ; 29082 scf ret -; 290a0 -.DoTradeAnimCommand: ; 290a0 +.DoTradeAnimCommand: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -244,9 +241,8 @@ DoTradeAnimation: ; 29082 ld h, [hl] ld l, a jp hl -; 290af -.JumpTable: ; 290af +.JumpTable: ; entries correspond to macros/scripts/trade_anims.asm enumeration dw TradeAnim_AdvanceScriptPointer ; 00 dw TradeAnim_ShowGivemonData ; 01 @@ -296,16 +292,14 @@ DoTradeAnimation: ; 29082 dw TraideAnim_Wait96 ; 2d dw TraideAnim_Wait80IfOTEgg ; 2e dw TraideAnim_Wait180IfOTEgg ; 2f -; 2910f -TradeAnim_IncrementJumptableIndex: ; 2910f +TradeAnim_IncrementJumptableIndex: ld hl, wJumptableIndex inc [hl] ret -; 29114 -TradeAnim_AdvanceScriptPointer: ; 29114 +TradeAnim_AdvanceScriptPointer: ld hl, wTradeAnimAddress ld e, [hl] inc hl @@ -318,16 +312,14 @@ TradeAnim_AdvanceScriptPointer: ; 29114 ld [hl], e ret -; 29123 -TradeAnim_End: ; 29123 +TradeAnim_End: ld hl, wJumptableIndex set 7, [hl] ret -; 29129 -TradeAnim_TubeToOT1: ; 29129 +TradeAnim_TubeToOT1: ld a, TRADEANIM_RIGHT_ARROW call TradeAnim_PlaceTrademonStatsOnTubeAnim ld a, [wLinkTradeSendmonSpecies] @@ -337,7 +329,7 @@ TradeAnim_TubeToOT1: ; 29129 ld b, $0 jr TradeAnim_InitTubeAnim -TradeAnim_TubeToPlayer1: ; 2913c +TradeAnim_TubeToPlayer1: ld a, TRADEANIM_LEFT_ARROW call TradeAnim_PlaceTrademonStatsOnTubeAnim ld a, [wLinkTradeGetmonSpecies] @@ -345,7 +337,7 @@ TradeAnim_TubeToPlayer1: ; 2913c ld a, TRADEANIMSTATE_2 depixel 9, 18, 4, 4 ld b, $4 -TradeAnim_InitTubeAnim: ; 2914e +TradeAnim_InitTubeAnim: push bc push de push bc @@ -402,9 +394,8 @@ TradeAnim_InitTubeAnim: ; 2914e ld [wFrameCounter], a ret -; 291af -TradeAnim_TubeToOT2: ; 291af +TradeAnim_TubeToOT2: call TradeAnim_FlashBGPals ld a, [hSCX] add $2 @@ -416,9 +407,8 @@ TradeAnim_TubeToOT2: ; 291af call TradeAnim_IncrementJumptableIndex ret -; 291c4 -TradeAnim_TubeToOT3: ; 291c4 +TradeAnim_TubeToOT3: call TradeAnim_FlashBGPals ld a, [hSCX] add $2 @@ -430,9 +420,8 @@ TradeAnim_TubeToOT3: ; 291c4 call TradeAnim_IncrementJumptableIndex ret -; 291d9 -TradeAnim_TubeToOT4: ; 291d9 +TradeAnim_TubeToOT4: call TradeAnim_FlashBGPals ld a, [hSCX] add $2 @@ -442,9 +431,8 @@ TradeAnim_TubeToOT4: ; 291d9 call TradeAnim_IncrementJumptableIndex ret -; 291e8 -TradeAnim_TubeToPlayer3: ; 291e8 +TradeAnim_TubeToPlayer3: call TradeAnim_FlashBGPals ld a, [hSCX] sub $2 @@ -456,9 +444,8 @@ TradeAnim_TubeToPlayer3: ; 291e8 call TradeAnim_IncrementJumptableIndex ret -; 291fd -TradeAnim_TubeToPlayer4: ; 291fd +TradeAnim_TubeToPlayer4: call TradeAnim_FlashBGPals ld a, [hSCX] sub $2 @@ -470,9 +457,8 @@ TradeAnim_TubeToPlayer4: ; 291fd call TradeAnim_IncrementJumptableIndex ret -; 29211 -TradeAnim_TubeToPlayer5: ; 29211 +TradeAnim_TubeToPlayer5: call TradeAnim_FlashBGPals ld a, [hSCX] sub $2 @@ -482,19 +468,17 @@ TradeAnim_TubeToPlayer5: ; 29211 call TradeAnim_IncrementJumptableIndex ret -; 29220 TradeAnim_TubeToOT6: -TradeAnim_TubeToPlayer6: ; 29220 +TradeAnim_TubeToPlayer6: ld a, 128 ld [wFrameCounter], a call TradeAnim_IncrementJumptableIndex ret -; 29229 TradeAnim_TubeToOT8: -TradeAnim_TubeToPlayer8: ; 29229 +TradeAnim_TubeToPlayer8: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -515,12 +499,11 @@ TradeAnim_TubeToPlayer8: ; 29229 call TradeAnim_AdvanceScriptPointer ret -; 2925d TradeAnim_TubeToOT5: TradeAnim_TubeToOT7: TradeAnim_TubeToPlayer2: -TradeAnim_TubeToPlayer7: ; 2925d +TradeAnim_TubeToPlayer7: call TradeAnim_FlashBGPals ld hl, wFrameCounter ld a, [hl] @@ -533,25 +516,22 @@ TradeAnim_TubeToPlayer7: ; 2925d call TradeAnim_IncrementJumptableIndex ret -; 2926d -TradeAnim_GiveTrademonSFX: ; 2926d +TradeAnim_GiveTrademonSFX: call TradeAnim_AdvanceScriptPointer ld de, SFX_GIVE_TRADEMON call PlaySFX ret -; 29277 -TradeAnim_GetTrademonSFX: ; 29277 +TradeAnim_GetTrademonSFX: call TradeAnim_AdvanceScriptPointer ld de, SFX_GET_TRADEMON call PlaySFX ret -; 29281 -TradeAnim_TubeAnimJumptable: ; 29281 +TradeAnim_TubeAnimJumptable: maskbits TRADEANIMJUMPTABLE_LENGTH ld e, a ld d, 0 @@ -562,18 +542,16 @@ TradeAnim_TubeAnimJumptable: ; 29281 ld h, [hl] ld l, a jp hl -; 2928f -.Jumptable: ; 2928f +.Jumptable: ; entries correspond to TRADEANIMSTATE_* constants dw .Zero dw .One dw .Two dw .Three -; 29297 -.Zero: ; 29297 -.Three: ; 29297 +.Zero: +.Three: call TradeAnim_BlankTileMap hlcoord 9, 3 ld [hl], $5b @@ -585,9 +563,8 @@ TradeAnim_TubeAnimJumptable: ; 29281 call TradeAnim_CopyTradeGameBoyTilemap ret -; 292af -.One: ; 292af +.One: call TradeAnim_BlankTileMap hlcoord 0, 3 ld bc, SCREEN_WIDTH @@ -595,9 +572,8 @@ TradeAnim_TubeAnimJumptable: ; 29281 call ByteFill ret -; 292be -.Two: ; 292be +.Two: call TradeAnim_BlankTileMap hlcoord 0, 3 ld bc, $11 @@ -625,17 +601,15 @@ TradeAnim_TubeAnimJumptable: ; 29281 call TradeAnim_CopyTradeGameBoyTilemap ret -; 292ec -TradeAnim_CopyTradeGameBoyTilemap: ; 292ec +TradeAnim_CopyTradeGameBoyTilemap: ld de, TradeGameBoyTilemap lb bc, 8, 6 call TradeAnim_CopyBoxFromDEtoHL ret -; 292f6 -TradeAnim_PlaceTrademonStatsOnTubeAnim: ; 292f6 +TradeAnim_PlaceTrademonStatsOnTubeAnim: push af call ClearBGPalettes call WaitTop @@ -674,9 +648,8 @@ TradeAnim_PlaceTrademonStatsOnTubeAnim: ; 292f6 call ClearTileMap ret -; 29348 -TradeAnim_EnterLinkTube1: ; 29348 +TradeAnim_EnterLinkTube1: call ClearTileMap call WaitTop ld a, $a0 @@ -698,9 +671,8 @@ TradeAnim_EnterLinkTube1: ; 29348 call TradeAnim_IncrementJumptableIndex ret -; 2937e -TradeAnim_EnterLinkTube2: ; 2937e +TradeAnim_EnterLinkTube2: ld a, [hSCX] and a jr z, .done @@ -714,9 +686,8 @@ TradeAnim_EnterLinkTube2: ; 2937e call TradeAnim_AdvanceScriptPointer ret -; 29391 -TradeAnim_ExitLinkTube: ; 29391 +TradeAnim_ExitLinkTube: ld a, [hSCX] cp $a0 jr z, .done @@ -731,9 +702,8 @@ TradeAnim_ExitLinkTube: ; 29391 call TradeAnim_AdvanceScriptPointer ret -; 293a6 -TradeAnim_SetupGivemonScroll: ; 293a6 +TradeAnim_SetupGivemonScroll: ld a, $8f ld [hWX], a ld a, $88 @@ -743,9 +713,8 @@ TradeAnim_SetupGivemonScroll: ; 293a6 call TradeAnim_AdvanceScriptPointer ret -; 293b6 -TradeAnim_DoGivemonScroll: ; 293b6 +TradeAnim_DoGivemonScroll: ld a, [hWX] cp $7 jr z, .done @@ -764,9 +733,8 @@ TradeAnim_DoGivemonScroll: ; 293b6 call TradeAnim_AdvanceScriptPointer ret -; 293d2 -TradeAnim_FrontpicScrollStart: ; 293d2 +TradeAnim_FrontpicScrollStart: ld a, $7 ld [hWX], a ld a, $50 @@ -774,9 +742,8 @@ TradeAnim_FrontpicScrollStart: ; 293d2 call TradeAnim_AdvanceScriptPointer ret -; 293de -TradeAnim_TextboxScrollStart: ; 293de +TradeAnim_TextboxScrollStart: ld a, $7 ld [hWX], a ld a, $90 @@ -784,9 +751,8 @@ TradeAnim_TextboxScrollStart: ; 293de call TradeAnim_AdvanceScriptPointer ret -; 293ea -TradeAnim_ScrollOutRight: ; 293ea +TradeAnim_ScrollOutRight: call WaitTop ld a, HIGH(vBGMap1) ld [hBGMapAddress + 1], a @@ -803,9 +769,8 @@ TradeAnim_ScrollOutRight: ; 293ea call TradeAnim_IncrementJumptableIndex ret -; 2940c -TradeAnim_ScrollOutRight2: ; 2940c +TradeAnim_ScrollOutRight2: ld a, [hWX] cp $a1 jr nc, .done @@ -826,9 +791,8 @@ TradeAnim_ScrollOutRight2: ; 2940c call TradeAnim_AdvanceScriptPointer ret -; 2942e -TradeAnim_ShowGivemonData: ; 2942e +TradeAnim_ShowGivemonData: call ShowPlayerTrademonStats ld a, [wPlayerTrademonSpecies] ld [wCurPartySpecies], a @@ -853,9 +817,8 @@ TradeAnim_ShowGivemonData: ; 2942e call TradeAnim_AdvanceScriptPointer ret -; 29461 -TradeAnim_ShowGetmonData: ; 29461 +TradeAnim_ShowGetmonData: call ShowOTTrademonStats ld a, [wOTTrademonSpecies] ld [wCurPartySpecies], a @@ -871,16 +834,14 @@ TradeAnim_ShowGetmonData: ; 29461 call TradeAnim_AdvanceScriptPointer ret -; 29487 -TradeAnim_AnimateFrontpic: ; 29487 +TradeAnim_AnimateFrontpic: farcall AnimateTrademonFrontpic call TradeAnim_AdvanceScriptPointer ret -; 29491 -TradeAnim_GetFrontpic: ; 29491 +TradeAnim_GetFrontpic: push de push af predef GetUnownLetter @@ -892,9 +853,8 @@ TradeAnim_GetFrontpic: ; 29491 predef GetMonFrontpic ret -; 294a9 -TradeAnim_GetNickname: ; 294a9 +TradeAnim_GetNickname: push de ld [wd265], a call GetPokemonName @@ -904,15 +864,14 @@ TradeAnim_GetNickname: ; 294a9 call CopyBytes ret -; 294bb -TradeAnim_ShowGivemonFrontpic: ; 294bb +TradeAnim_ShowGivemonFrontpic: ld de, vTiles0 jr TradeAnim_ShowFrontpic -TradeAnim_ShowGetmonFrontpic: ; 294c0 +TradeAnim_ShowGetmonFrontpic: ld de, vTiles0 tile $31 -TradeAnim_ShowFrontpic: ; 294c3 +TradeAnim_ShowFrontpic: call DelayFrame ld hl, vTiles2 lb bc, 10, $31 @@ -927,58 +886,51 @@ TradeAnim_ShowFrontpic: ; 294c3 call WaitBGMap ret -; 294e7 -TraideAnim_Wait80: ; 294e7 +TraideAnim_Wait80: ld c, 80 call DelayFrames call TradeAnim_AdvanceScriptPointer ret -; 294f0 -TraideAnim_Wait40: ; 294f0 +TraideAnim_Wait40: ld c, 40 call DelayFrames call TradeAnim_AdvanceScriptPointer ret -; 294f9 -TraideAnim_Wait96: ; 294f9 +TraideAnim_Wait96: ld c, 96 call DelayFrames call TradeAnim_AdvanceScriptPointer ret -; 29502 -TraideAnim_Wait80IfOTEgg: ; 29502 +TraideAnim_Wait80IfOTEgg: call IsOTTrademonEgg ret nz ld c, 80 call DelayFrames ret -; 2950c -TraideAnim_Wait180IfOTEgg: ; 2950c +TraideAnim_Wait180IfOTEgg: call IsOTTrademonEgg ret nz ld c, 180 call DelayFrames ret -; 29516 -IsOTTrademonEgg: ; 29516 +IsOTTrademonEgg: call TradeAnim_AdvanceScriptPointer ld a, [wOTTrademonSpecies] cp EGG ret -; 2951f -ShowPlayerTrademonStats: ; 2951f +ShowPlayerTrademonStats: ld de, wPlayerTrademonSpecies ld a, [de] cp EGG @@ -996,9 +948,8 @@ ShowPlayerTrademonStats: ; 2951f call TrademonStats_WaitBGMap ret -; 29549 -ShowOTTrademonStats: ; 29549 +ShowOTTrademonStats: ld de, wOTTrademonSpecies ld a, [de] cp EGG @@ -1016,9 +967,8 @@ ShowOTTrademonStats: ; 29549 call TrademonStats_WaitBGMap ret -; 29573 -TrademonStats_MonTemplate: ; 29573 +TrademonStats_MonTemplate: call WaitTop call TradeAnim_BlankTileMap ld a, HIGH(vBGMap1) @@ -1032,16 +982,14 @@ TrademonStats_MonTemplate: ; 29573 call PlaceString ret -; 29591 -.OTMonData: ; 29591 +.OTMonData: db "─── №." next "" next "OT/" next "№.@" -; 295a1 -TrademonStats_Egg: ; 295a1 +TrademonStats_Egg: call WaitTop call TradeAnim_BlankTileMap ld a, HIGH(vBGMap1) @@ -1056,40 +1004,35 @@ TrademonStats_Egg: ; 295a1 call TrademonStats_WaitBGMap ret -; 295c2 -.EggData: ; 295c2 +.EggData: db "EGG" next "OT/?????" next "№.?????@" -; 295d8 -TrademonStats_WaitBGMap: ; 295d8 +TrademonStats_WaitBGMap: call WaitBGMap call WaitTop ld a, HIGH(vBGMap0) ld [hBGMapAddress + 1], a ret -; 295e3 -TrademonStats_PrintSpeciesNumber: ; 295e3 +TrademonStats_PrintSpeciesNumber: hlcoord 10, 0 lb bc, PRINTNUM_LEADINGZEROS | 1, 3 call PrintNum ld [hl], " " ret -; 295ef -TrademonStats_PrintSpeciesName: ; 295ef +TrademonStats_PrintSpeciesName: hlcoord 4, 2 call PlaceString ret -; 295f6 -TrademonStats_PrintOTName: ; 295f6 +TrademonStats_PrintOTName: cp 3 jr c, .caught_gender_okay xor a @@ -1107,21 +1050,18 @@ TrademonStats_PrintOTName: ; 295f6 ld [bc], a ret -; 2960e -.Gender: ; 2960e +.Gender: db " ", "♂", "♀" -; 29611 -TrademonStats_PrintTrademonID: ; 29611 +TrademonStats_PrintTrademonID: hlcoord 7, 6 lb bc, PRINTNUM_LEADINGZEROS | 2, 5 call PrintNum ret -; 2961b -TradeAnim_RockingBall: ; 2961b +TradeAnim_RockingBall: depixel 10, 11, 4, 0 ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL call _InitSpriteAnimStruct @@ -1130,9 +1070,8 @@ TradeAnim_RockingBall: ; 2961b ld [wFrameCounter], a ret -; 2962c -TradeAnim_DropBall: ; 2962c +TradeAnim_DropBall: depixel 10, 11, 4, 0 ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL call _InitSpriteAnimStruct @@ -1147,9 +1086,8 @@ TradeAnim_DropBall: ; 2962c ld [wFrameCounter], a ret -; 29649 -TradeAnim_Poof: ; 29649 +TradeAnim_Poof: depixel 10, 11, 4, 0 ld a, SPRITE_ANIM_INDEX_TRADE_POOF call _InitSpriteAnimStruct @@ -1160,9 +1098,8 @@ TradeAnim_Poof: ; 29649 call PlaySFX ret -; 29660 -TradeAnim_BulgeThroughTube: ; 29660 +TradeAnim_BulgeThroughTube: ld a, %11100100 ; 3,2,1,0 call DmgToCgbObjPal0 depixel 5, 11 @@ -1173,9 +1110,8 @@ TradeAnim_BulgeThroughTube: ; 29660 ld [wFrameCounter], a ret -; 29676 -TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) +TradeAnim_AnimateTrademonInTube: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc ld e, [hl] @@ -1187,9 +1123,8 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) ld h, [hl] ld l, a jp hl -; 29686 -.Jumptable: ; 29686 (a:5686) +.Jumptable: dw .InitTimer dw .WaitTimer1 dw .MoveRight @@ -1197,22 +1132,21 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) dw .MoveUp dw .MoveLeft dw .WaitTimer2 -; 2969a -.JumptableNext: ; 29694 (a:5694) +.JumptableNext: ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX add hl, bc inc [hl] ret -.InitTimer: ; 2969a (a:569a) +.InitTimer: call .JumptableNext ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld [hl], $80 ret -.WaitTimer1: ; 296a4 (a:56a4) +.WaitTimer1: ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -1221,7 +1155,7 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) ret nz call .JumptableNext -.MoveRight: ; 296af (a:56af) +.MoveRight: ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -1233,7 +1167,7 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) .done_move_right call .JumptableNext -.MoveDown: ; 296bd (a:56bd) +.MoveDown: ld hl, SPRITEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] @@ -1248,7 +1182,7 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) ld [hl], $0 ret -.MoveUp: ; 296cf (a:56cf) +.MoveUp: ld hl, SPRITEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] @@ -1260,7 +1194,7 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) .done_move_up call .JumptableNext -.MoveLeft: ; 296dd (a:56dd) +.MoveLeft: ld hl, SPRITEANIMSTRUCT_XCOORD add hl, bc ld a, [hl] @@ -1276,7 +1210,7 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) ld [hl], $80 ret -.WaitTimer2: ; 296f2 (a:56f2) +.WaitTimer2: ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -1288,9 +1222,8 @@ TradeAnim_AnimateTrademonInTube: ; 29676 (a:5676) ld [hl], $0 ret -; 29701 (a:5701) -TradeAnim_SentToOTText: ; 29701 +TradeAnim_SentToOTText: ld a, [wLinkMode] cp LINK_TIMECAPSULE jr z, .time_capsule @@ -1313,7 +1246,6 @@ TradeAnim_SentToOTText: ; 29701 call TradeAnim_AdvanceScriptPointer ret -; 29732 .Text_WasSentTo: ; 0x29732 ; was sent to @ . @@ -1327,7 +1259,7 @@ TradeAnim_SentToOTText: ; 29701 db "@" ; 0x2973c -TradeAnim_OTBidsFarewell: ; 2973c +TradeAnim_OTBidsFarewell: ld hl, .Text_BidsFarewellToMon call PrintText call TradeAnim_Wait80Frames @@ -1337,7 +1269,6 @@ TradeAnim_OTBidsFarewell: ; 2973c call TradeAnim_AdvanceScriptPointer ret -; 29752 .Text_BidsFarewellToMon: ; 0x29752 ; bids farewell to @@ -1351,7 +1282,7 @@ TradeAnim_OTBidsFarewell: ; 2973c db "@" ; 0x2975c -TradeAnim_TakeCareOfText: ; 2975c +TradeAnim_TakeCareOfText: call WaitTop hlcoord 0, 10 ld bc, 8 * SCREEN_WIDTH @@ -1364,7 +1295,6 @@ TradeAnim_TakeCareOfText: ; 2975c call TradeAnim_AdvanceScriptPointer ret -; 2977a .Text_TakeGoodCareOfMon: ; 0x2977a ; Take good care of @ . @@ -1372,7 +1302,7 @@ TradeAnim_TakeCareOfText: ; 2975c db "@" ; 0x2977f -TradeAnim_OTSendsText1: ; 2977f +TradeAnim_OTSendsText1: ld hl, .Text_ForYourMon call PrintText call TradeAnim_Wait80Frames @@ -1384,7 +1314,6 @@ TradeAnim_OTSendsText1: ; 2977f call TradeAnim_AdvanceScriptPointer ret -; 2979a .Text_ForYourMon: ; 0x2979a ; For @ 's @ , @@ -1398,7 +1327,7 @@ TradeAnim_OTSendsText1: ; 2977f db "@" ; 0x297a4 -TradeAnim_OTSendsText2: ; 297a4 +TradeAnim_OTSendsText2: ld hl, .Text_WillTrade call PrintText call TradeAnim_Wait80Frames @@ -1410,7 +1339,6 @@ TradeAnim_OTSendsText2: ; 297a4 call TradeAnim_AdvanceScriptPointer ret -; 297bf .Text_WillTrade: ; 0x297bf ; will trade @ @ @@ -1424,23 +1352,21 @@ TradeAnim_OTSendsText2: ; 297a4 db "@" ; 0x297c9 -TradeAnim_Wait80Frames: ; 297c9 +TradeAnim_Wait80Frames: ld c, 80 call DelayFrames ret -; 297cf -TradeAnim_BlankTileMap: ; 297cf +TradeAnim_BlankTileMap: hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " call ByteFill ret -; 297db -TradeAnim_CopyBoxFromDEtoHL: ; 297db +TradeAnim_CopyBoxFromDEtoHL: .row push bc push hl @@ -1458,9 +1384,8 @@ TradeAnim_CopyBoxFromDEtoHL: ; 297db jr nz, .row ret -; 297ed -TradeAnim_NormalPals: ; 297ed +TradeAnim_NormalPals: ld a, [hSGB] and a ld a, %11100100 ; 3,2,1,0 @@ -1473,9 +1398,8 @@ TradeAnim_NormalPals: ; 297ed call DmgToCgbBGPals ret -; 297ff -LinkTradeAnim_LoadTradePlayerNames: ; 297ff +LinkTradeAnim_LoadTradePlayerNames: push de ld de, wLinkPlayer1Name ld bc, NAME_LENGTH @@ -1486,18 +1410,16 @@ LinkTradeAnim_LoadTradePlayerNames: ; 297ff call CopyBytes ret -; 29814 -LinkTradeAnim_LoadTradeMonSpecies: ; 29814 +LinkTradeAnim_LoadTradeMonSpecies: ld a, [hl] ld [wLinkTradeSendmonSpecies], a ld a, [de] ld [wLinkTradeGetmonSpecies], a ret -; 2981d -TradeAnim_FlashBGPals: ; 2981d +TradeAnim_FlashBGPals: ld a, [wcf65] and $7 ret nz @@ -1506,9 +1428,8 @@ TradeAnim_FlashBGPals: ; 2981d call DmgToCgbBGPals ret -; 2982b -LoadTradeBallAndCableGFX: ; 2982b +LoadTradeBallAndCableGFX: call DelayFrame ld de, TradeBallGFX ld hl, vTiles0 tile $62 @@ -1528,9 +1449,8 @@ LoadTradeBallAndCableGFX: ; 2982b ld [hl], $62 ret -; 2985a -LoadTradeBubbleGFX: ; 2985a +LoadTradeBubbleGFX: call DelayFrame ld e, $3 callfar LoadMenuMonIcon @@ -1544,9 +1464,8 @@ LoadTradeBubbleGFX: ; 2985a ld [hl], $62 ret -; 29879 -TradeAnim_WaitAnim: ; 29879 +TradeAnim_WaitAnim: ld hl, wFrameCounter ld a, [hl] and a @@ -1558,9 +1477,8 @@ TradeAnim_WaitAnim: ; 29879 call TradeAnim_AdvanceScriptPointer ret -; 29886 -TradeAnim_WaitAnim2: ; 29886 +TradeAnim_WaitAnim2: ld hl, wFrameCounter ld a, [hl] and a @@ -1572,10 +1490,9 @@ TradeAnim_WaitAnim2: ; 29886 call TradeAnim_AdvanceScriptPointer ret -; 29893 -Unreferenced_DebugTrade: ; 29893 +Unreferenced_DebugTrade: ; This function is not referenced. ; It was meant for use in Japanese versions, so the ; constant used for copy length was changed by accident. @@ -1605,7 +1522,6 @@ Unreferenced_DebugTrade: ; 29893 jr nz, .loop2 ret -; 298b5 debugtrade: MACRO ; species, ot name, ot id (?) @@ -1613,13 +1529,12 @@ debugtrade: MACRO dw \3 ENDM -.DebugTradeData: ; 298b5 +.DebugTradeData: debugtrade VENUSAUR, "ゲーフり@@", $0123 ; GAME FREAK debugtrade CHARIZARD, "クりーチャ@", $0456 ; Creatures Inc. -; 298c7 -TradeGameBoyTilemap: ; 298c7 +TradeGameBoyTilemap: ; 6x8 db $31, $32, $32, $32, $32, $33 db $34, $35, $36, $36, $37, $38 @@ -1629,14 +1544,12 @@ TradeGameBoyTilemap: ; 298c7 db $46, $47, $43, $48, $49, $4a db $41, $43, $4b, $4c, $4d, $4e db $4f, $50, $50, $50, $51, $52 -; 297f7 -TradeLinkTubeTilemap: ; 297f7 +TradeLinkTubeTilemap: ; 12x3 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 -; 2991b TradeArrowGFX: INCBIN "gfx/trade/arrow.2bpp" TradeCableGFX: INCBIN "gfx/trade/cable.2bpp" diff --git a/engine/movie/unused_title.asm b/engine/movie/unused_title.asm index 8e52a71bb16..4527d9ade86 100644 --- a/engine/movie/unused_title.asm +++ b/engine/movie/unused_title.asm @@ -1,4 +1,4 @@ -UnusedTitleScreen: ; 10c000 +UnusedTitleScreen: call ClearBGPalettes call ClearTileMap @@ -96,30 +96,24 @@ UnusedTitleScreen: ; 10c000 call PlayMusic ret -; 10c0b1 -UnusedTitleBG_GFX: ; 10c0b1 +UnusedTitleBG_GFX: INCBIN "gfx/title/old_bg.2bpp" -; 10d0b1 -UnusedTitleBG_Tilemap: ; 10d0b1 +UnusedTitleBG_Tilemap: ; 32x32 (alternating tiles and attributes) INCBIN "gfx/title/old_bg.tilemap" -; 10d8b1 -UnusedTitleBG_Palettes: ; 10d8b1 +UnusedTitleBG_Palettes: INCLUDE "gfx/title/old_bg.pal" -; 10dab1 -UnusedTitleFG_GFX: ; 10dab1 +UnusedTitleFG_GFX: INCBIN "gfx/title/old_fg.2bpp" -; 10eab1 -UnusedTitleFG_Palettes: ; 10eab1 +UnusedTitleFG_Palettes: INCLUDE "gfx/title/old_fg.pal" -; 10ecb1 -UnusedTitleFG_OAM: ; 10ecb1 +UnusedTitleFG_OAM: dsprite 3, 0, 7, 0, $00, 1 dsprite 3, 0, 8, 0, $02, 1 dsprite 3, 0, 9, 0, $04, 1 @@ -160,9 +154,8 @@ UnusedTitleFG_OAM: ; 10ecb1 dsprite 11, 0, 12, 0, $4a, 1 dsprite 11, 0, 13, 0, $4c, 1 dsprite 11, 0, 14, 0, $4e, 1 -; 10ed51 -Function10ed51: ; 10ed51 +Function10ed51: call _TitleScreen .loop call JoyTextDelay @@ -175,4 +168,3 @@ Function10ed51: ; 10ed51 jr .loop .done ret -; 10ed67 diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm index 33d0ca0cd0a..0ed34e3187d 100644 --- a/engine/overworld/decorations.asm +++ b/engine/overworld/decorations.asm @@ -1,4 +1,4 @@ -InitDecorations: ; 26751 (9:6751) +InitDecorations: ld a, DECO_FEATHERY_BED ld [wDecoBed], a ld a, DECO_TOWN_MAP @@ -51,7 +51,7 @@ _PlayerDecorationMenu: ; 0x2675c dw .pointers ; 0x267aa -.pointers ; 267aa +.pointers dw DecoBedMenu, .bed dw DecoCarpetMenu, .carpet dw DecoPlantMenu, .plant @@ -69,9 +69,8 @@ _PlayerDecorationMenu: ; 0x2675c .ornament db "ORNAMENT@" .big_doll db "BIG DOLL@" .exit db "EXIT@" -; 26806 -.FindCategoriesWithOwnedDecos: ; 26806 +.FindCategoriesWithOwnedDecos: xor a ld [wWhichIndexSet], a call .ClearStringBuffer2 @@ -84,7 +83,7 @@ _PlayerDecorationMenu: ; 0x2675c call CopyBytes ret -.ClearStringBuffer2: ; 26822 (9:6822) +.ClearStringBuffer2: ld hl, wStringBuffer2 xor a ld [hli], a @@ -93,7 +92,7 @@ _PlayerDecorationMenu: ; 0x2675c call ByteFill ret -.AppendToStringBuffer2: ; 26830 (9:6830) +.AppendToStringBuffer2: ld hl, wStringBuffer2 inc [hl] ld e, [hl] @@ -102,7 +101,7 @@ _PlayerDecorationMenu: ; 0x2675c ld [hl], a ret -.FindOwndDecos: ; 2683a (9:683a) +.FindOwndDecos: ld hl, .dw .loop ld a, [hli] @@ -124,9 +123,8 @@ _PlayerDecorationMenu: ; 0x2675c jr .loop .done ret -; 26855 (9:6855) -.dw ; 26855 +.dw dwb FindOwnedBeds, 0 ; bed dwb FindOwnedCarpets, 1 ; carpet dwb FindOwnedPlants, 2 ; plant @@ -135,9 +133,8 @@ _PlayerDecorationMenu: ; 0x2675c dwb FindOwnedOrnaments, 5 ; ornament dwb FindOwnedBigDolls, 6 ; big doll dw 0 ; end -; 2686c -Deco_FillTempWithMinusOne: ; 2686c +Deco_FillTempWithMinusOne: xor a ld hl, wd002 ld [hli], a @@ -145,9 +142,8 @@ Deco_FillTempWithMinusOne: ; 2686c ld bc, $10 call ByteFill ret -; 2687a -CheckAllDecorationFlags: ; 2687a +CheckAllDecorationFlags: .loop ld a, [hli] cp -1 @@ -166,9 +162,8 @@ CheckAllDecorationFlags: ; 2687a .done ret -; 26891 -AppendDecoIndex: ; 26891 +AppendDecoIndex: ld hl, wd002 inc [hl] ld e, [hl] @@ -176,9 +171,8 @@ AppendDecoIndex: ; 26891 add hl, de ld [hl], a ret -; 2689b -FindOwnedDecosInCategory: ; 2689b +FindOwnedDecosInCategory: push bc push hl call Deco_FillTempWithMinusOne @@ -195,126 +189,108 @@ FindOwnedDecosInCategory: ; 2689b call AppendDecoIndex scf ret -; 268b5 -DecoBedMenu: ; 268b5 +DecoBedMenu: call FindOwnedBeds call PopulateDecoCategoryMenu xor a ret -; 268bd -FindOwnedBeds: ; 268bd +FindOwnedBeds: ld hl, .beds ld c, BEDS jp FindOwnedDecosInCategory -; 268c5 -.beds ; 268c5 +.beds db DECO_FEATHERY_BED ; 2 db DECO_PINK_BED ; 3 db DECO_POLKADOT_BED ; 4 db DECO_PIKACHU_BED ; 5 db -1 -; 268ca -DecoCarpetMenu: ; 268ca +DecoCarpetMenu: call FindOwnedCarpets call PopulateDecoCategoryMenu xor a ret -; 268d2 -FindOwnedCarpets: ; 268d2 +FindOwnedCarpets: ld hl, .carpets ld c, CARPETS jp FindOwnedDecosInCategory -; 268da -.carpets ; 268da +.carpets db DECO_RED_CARPET ; 7 db DECO_BLUE_CARPET ; 8 db DECO_YELLOW_CARPET ; 9 db DECO_GREEN_CARPET ; a db -1 -; 268df -DecoPlantMenu: ; 268df +DecoPlantMenu: call FindOwnedPlants call PopulateDecoCategoryMenu xor a ret -; 268e7 -FindOwnedPlants: ; 268e7 +FindOwnedPlants: ld hl, .plants ld c, PLANTS jp FindOwnedDecosInCategory -; 268ef -.plants ; 268ef +.plants db DECO_MAGNAPLANT ; c db DECO_TROPICPLANT ; d db DECO_JUMBOPLANT ; e db -1 -; 268f3 -DecoPosterMenu: ; 268f3 +DecoPosterMenu: call FindOwnedPosters call PopulateDecoCategoryMenu xor a ret -; 268fb -FindOwnedPosters: ; 268fb +FindOwnedPosters: ld hl, .posters ld c, POSTERS jp FindOwnedDecosInCategory -; 26903 -.posters ; 26903 +.posters db DECO_TOWN_MAP ; 10 db DECO_PIKACHU_POSTER ; 11 db DECO_CLEFAIRY_POSTER ; 12 db DECO_JIGGLYPUFF_POSTER ; 13 db -1 -; 26908 -DecoConsoleMenu: ; 26908 +DecoConsoleMenu: call FindOwnedConsoles call PopulateDecoCategoryMenu xor a ret -; 26910 -FindOwnedConsoles: ; 26910 +FindOwnedConsoles: ld hl, .consoles ld c, CONSOLES jp FindOwnedDecosInCategory -; 26918 -.consoles ; 26918 +.consoles db DECO_FAMICOM ; 15 db DECO_SNES ; 16 db DECO_N64 ; 17 db DECO_VIRTUAL_BOY ; 18 db -1 -; 2691d -DecoOrnamentMenu: ; 2691d +DecoOrnamentMenu: call FindOwnedOrnaments call PopulateDecoCategoryMenu xor a ret -; 26925 -FindOwnedOrnaments: ; 26925 +FindOwnedOrnaments: ld hl, .ornaments ld c, DOLLS jp FindOwnedDecosInCategory -; 2692d -.ornaments ; 2692d +.ornaments db DECO_PIKACHU_DOLL ; 1e db DECO_SURF_PIKACHU_DOLL ; 1f db DECO_CLEFAIRY_DOLL ; 20 @@ -339,34 +315,29 @@ FindOwnedOrnaments: ; 26925 db DECO_GOLD_TROPHY_DOLL ; 33 db DECO_SILVER_TROPHY_DOLL ; 34 db -1 -; 26945 -DecoBigDollMenu: ; 26945 +DecoBigDollMenu: call FindOwnedBigDolls call PopulateDecoCategoryMenu xor a ret -; 2694d -FindOwnedBigDolls: ; 2694d +FindOwnedBigDolls: ld hl, .big_dolls ld c, BIG_DOLLS jp FindOwnedDecosInCategory -; 26955 -.big_dolls ; 26955 +.big_dolls db DECO_BIG_SNORLAX_DOLL ; 1a db DECO_BIG_ONIX_DOLL ; 1b db DECO_BIG_LAPRAS_DOLL ; 1c db -1 -; 26959 -DecoExitMenu: ; 26959 +DecoExitMenu: scf ret -; 2695b -PopulateDecoCategoryMenu: ; 2695b +PopulateDecoCategoryMenu: ld a, [wd002] and a jr z, .empty @@ -413,7 +384,6 @@ PopulateDecoCategoryMenu: ; 2695b ld hl, .Text_nothing_to_choose call MenuTextBoxBackup ret -; 269b0 .Text_nothing_to_choose: ; 0x269b0 ; There's nothing to choose. @@ -451,26 +421,23 @@ PopulateDecoCategoryMenu: ; 2695b dba DecorationMenuFunction dbw 0, 0 dbw 0, 0 -; 269dd -GetDecorationData: ; 269dd +GetDecorationData: ld hl, DecorationAttributes ld bc, 6 call AddNTimes ret -; 269e7 -GetDecorationName: ; 269e7 +GetDecorationName: push hl call GetDecorationData call GetDecoName pop hl call CopyName2 ret -; 269f3 -DecorationMenuFunction: ; 269f3 +DecorationMenuFunction: ld a, [wMenuSelection] push de call GetDecorationData @@ -478,9 +445,8 @@ DecorationMenuFunction: ; 269f3 pop hl call PlaceString ret -; 26a02 -DoDecorationAction2: ; 26a02 +DoDecorationAction2: ld a, [wMenuSelection] call GetDecorationData ld de, 2 ; function 2 @@ -489,9 +455,8 @@ DoDecorationAction2: ; 26a02 ld hl, .DecoActions rst JumpTable ret -; 26a12 -.DecoActions: ; 26a12 +.DecoActions: dw DecoAction_nothing dw DecoAction_setupbed dw DecoAction_putawaybed @@ -507,10 +472,9 @@ DoDecorationAction2: ; 26a02 dw DecoAction_putawaybigdoll dw DecoAction_setupornament dw DecoAction_putawayornament -; 26a30 -GetDecorationFlag: ; 26a30 +GetDecorationFlag: call GetDecorationData ld de, 3 ; event flag add hl, de @@ -518,17 +482,15 @@ GetDecorationFlag: ; 26a30 ld d, [hl] ld e, a ret -; 26a3b -DecorationFlagAction: ; 26a3b +DecorationFlagAction: push bc call GetDecorationFlag pop bc call EventFlagAction ret -; 26a44 -GetDecorationSprite: ; 26a44 +GetDecorationSprite: ld a, c call GetDecorationData ld de, 5 ; sprite @@ -536,13 +498,12 @@ GetDecorationSprite: ; 26a44 ld a, [hl] ld c, a ret -; 26a4f INCLUDE "data/decorations/attributes.asm" INCLUDE "data/decorations/names.asm" -GetDecoName: ; 26c72 +GetDecoName: ld a, [hli] ld e, [hl] ld bc, wStringBuffer2 @@ -551,9 +512,8 @@ GetDecoName: ; 26c72 rst JumpTable pop de ret -; 26c7e -.NameFunctions: ; 26c7e +.NameFunctions: dw .invalid dw .plant dw .bed @@ -561,40 +521,38 @@ GetDecoName: ; 26c72 dw .poster dw .doll dw .bigdoll -; 26c8c -.invalid ; 26c8c +.invalid ret -; 26c8d -.plant ; 26c8d +.plant ld a, e jr .getdeconame -.bed ; 26c90 +.bed call .plant ld a, _BED jr .getdeconame -.carpet ; 26c97 +.carpet call .plant ld a, _CARPET jr .getdeconame -.poster ; 26c9e +.poster ld a, e call .getpokename ld a, _POSTER jr .getdeconame -.doll ; 26ca6 +.doll ld a, e call .getpokename ld a, _DOLL jr .getdeconame -.bigdoll ; 26cae +.bigdoll push de ld a, BIG_ call .getdeconame @@ -602,25 +560,25 @@ GetDecoName: ; 26c72 ld a, e jr .getpokename -.unused ; 26cb8 +.unused push de call .getdeconame pop de ld a, e jr .getdeconame -.getpokename ; 26cc0 +.getpokename push bc ld [wd265], a call GetPokemonName pop bc jr .copy -.getdeconame ; 26cca +.getdeconame call ._getdeconame jr .copy -._getdeconame ; 26ccf +._getdeconame push bc ld hl, DecorationNames call GetNthString @@ -629,7 +587,7 @@ GetDecoName: ; 26c72 pop bc ret -.copy ; 26cda +.copy ld h, b ld l, c call CopyName2 @@ -637,74 +595,60 @@ GetDecoName: ; 26c72 ld b, h ld c, l ret -; 26ce3 -DecoAction_nothing: ; 26ce3 +DecoAction_nothing: scf ret -; 26ce5 -DecoAction_setupbed: ; 26ce5 +DecoAction_setupbed: ld hl, wDecoBed jp DecoAction_TrySetItUp -; 26ceb -DecoAction_putawaybed: ; 26ceb +DecoAction_putawaybed: ld hl, wDecoBed jp DecoAction_TryPutItAway -; 26cf1 -DecoAction_setupcarpet: ; 26cf1 +DecoAction_setupcarpet: ld hl, wDecoCarpet jp DecoAction_TrySetItUp -; 26cf7 -DecoAction_putawaycarpet: ; 26cf7 +DecoAction_putawaycarpet: ld hl, wDecoCarpet jp DecoAction_TryPutItAway -; 26cfd -DecoAction_setupplant: ; 26cfd +DecoAction_setupplant: ld hl, wDecoPlant jp DecoAction_TrySetItUp -; 26d03 -DecoAction_putawayplant: ; 26d03 +DecoAction_putawayplant: ld hl, wDecoPlant jp DecoAction_TryPutItAway -; 26d09 -DecoAction_setupposter: ; 26d09 +DecoAction_setupposter: ld hl, wDecoPoster jp DecoAction_TrySetItUp -; 26d0f -DecoAction_putawayposter: ; 26d0f +DecoAction_putawayposter: ld hl, wDecoPoster jp DecoAction_TryPutItAway -; 26d15 -DecoAction_setupconsole: ; 26d15 +DecoAction_setupconsole: ld hl, wDecoConsole jp DecoAction_TrySetItUp -; 26d1b -DecoAction_putawayconsole: ; 26d1b +DecoAction_putawayconsole: ld hl, wDecoConsole jp DecoAction_TryPutItAway -; 26d21 -DecoAction_setupbigdoll: ; 26d21 +DecoAction_setupbigdoll: ld hl, wDecoBigDoll jp DecoAction_TrySetItUp -; 26d27 -DecoAction_putawaybigdoll: ; 26d27 +DecoAction_putawaybigdoll: ld hl, wDecoBigDoll jp DecoAction_TryPutItAway -; 26d2d -DecoAction_TrySetItUp: ; 26d2d +DecoAction_TrySetItUp: ld a, [hl] ld [wBuffer1], a push hl @@ -722,9 +666,8 @@ DecoAction_TrySetItUp: ; 26d2d pop hl xor a ret -; 26d46 -DecoAction_SetItUp: ; 26d46 +DecoAction_SetItUp: ; See if there's anything of the same type already out ld a, [wBuffer1] and a @@ -760,9 +703,8 @@ DecoAction_SetItUp: ; 26d46 call MenuTextBoxBackup scf ret -; 26d86 -DecoAction_TryPutItAway: ; 26d86 +DecoAction_TryPutItAway: ; If there is no item of that type already set, there is nothing to put away. ld a, [hl] ld [wBuffer1], a @@ -788,9 +730,8 @@ DecoAction_TryPutItAway: ; 26d86 call MenuTextBoxBackup xor a ret -; 26db3 -DecoAction_setupornament: ; 26db3 +DecoAction_setupornament: ld hl, UnknownText_0x26e41 call DecoAction_AskWhichSide jr c, .cancel @@ -804,7 +745,7 @@ DecoAction_setupornament: ; 26db3 xor a ret -DecoAction_putawayornament: ; 26dc9 +DecoAction_putawayornament: ld hl, DecoText_WhichSide call DecoAction_AskWhichSide jr nc, .incave @@ -814,7 +755,7 @@ DecoAction_putawayornament: ; 26dc9 .incave call DecoAction_PutItAway_Ornament -DecoAction_FinishUp_Ornament: ; 26dd6 +DecoAction_FinishUp_Ornament: call QueryWhichSide ld a, [wSelectedDecoration] ld [hl], a @@ -822,9 +763,8 @@ DecoAction_FinishUp_Ornament: ; 26dd6 ld [de], a xor a ret -; 26de3 -DecoAction_SetItUp_Ornament: ; 26de3 +DecoAction_SetItUp_Ornament: ld a, [wSelectedDecoration] and a jr z, .nothingthere @@ -863,9 +803,8 @@ DecoAction_SetItUp_Ornament: ; 26de3 call MenuTextBoxBackup scf ret -; 26e33 -.getwhichside ; 26e33 +.getwhichside ld a, [wMenuSelection] ld b, a ld a, [wOtherDecoration] @@ -874,7 +813,6 @@ DecoAction_SetItUp_Ornament: ; 26de3 xor a ld [wOtherDecoration], a ret -; 26e41 UnknownText_0x26e41: ; 0x26e41 ; Which side do you want to put it on? @@ -882,7 +820,7 @@ UnknownText_0x26e41: ; 0x26e41 db "@" ; 0x26e46 -DecoAction_PutItAway_Ornament: ; 26e46 +DecoAction_PutItAway_Ornament: ld a, [wSelectedDecoration] and a jr z, .nothingthere @@ -902,7 +840,6 @@ DecoAction_PutItAway_Ornament: ; 26e46 call MenuTextBoxBackup xor a ret -; 26e6b DecoText_WhichSide: ; 0x26e6b ; Which side do you want to put away? @@ -910,7 +847,7 @@ DecoText_WhichSide: ; 0x26e6b db "@" ; 0x26e70 -DecoAction_AskWhichSide: ; 26e70 +DecoAction_AskWhichSide: call MenuTextBox ld hl, MenuHeader_0x26eab call GetMenu2 @@ -932,9 +869,8 @@ DecoAction_AskWhichSide: ; 26e70 .nope scf ret -; 26e9a -QueryWhichSide: ; 26e9a +QueryWhichSide: ld hl, wDecoRightOrnament ld de, wDecoLeftOrnament ld a, [wBuffer2] @@ -945,7 +881,6 @@ QueryWhichSide: ; 26e9a ld l, e pop de ret -; 26eab MenuHeader_0x26eab: ; 0x26eab db MENU_BACKUP_TILES ; flags @@ -992,21 +927,19 @@ DecoText_AlreadySetUp: ; 0x26ee5 db "@" ; 0x26eea -GetDecorationName_c_de: ; 26eea +GetDecorationName_c_de: ld a, c ld h, d ld l, e call GetDecorationName ret -; 26ef1 -DecorationFlagAction_c: ; 26ef1 +DecorationFlagAction_c: ld a, c jp DecorationFlagAction -; 26ef5 -GetDecorationName_c: ; 26ef5 (9:6ef5) +GetDecorationName_c: ld a, c call GetDecorationID ld hl, wStringBuffer1 @@ -1016,15 +949,14 @@ GetDecorationName_c: ; 26ef5 (9:6ef5) ret -SetSpecificDecorationFlag: ; 26f02 +SetSpecificDecorationFlag: ld a, c call GetDecorationID ld b, SET_FLAG call DecorationFlagAction ret -; 26f0c -GetDecorationID: ; 26f0c +GetDecorationID: push hl push de ld e, a @@ -1035,9 +967,8 @@ GetDecorationID: ; 26f0c pop de pop hl ret -; 26f19 -SetAllDecorationFlags: ; 26f19 +SetAllDecorationFlags: ld hl, DecorationIDs .loop ld a, [hli] @@ -1051,27 +982,24 @@ SetAllDecorationFlags: ; 26f19 .done ret -; 26f2b INCLUDE "data/decorations/decorations.asm" -DescribeDecoration:: ; 26f59 +DescribeDecoration:: ld a, b ld hl, .JumpTable rst JumpTable ret -; 26f5f -.JumpTable: ; 26f5f +.JumpTable: ; entries correspond to DECODESC_* constants dw DecorationDesc_Poster dw DecorationDesc_LeftOrnament dw DecorationDesc_RightOrnament dw DecorationDesc_GiantOrnament dw DecorationDesc_Console -; 26f69 -DecorationDesc_Poster: ; 26f69 +DecorationDesc_Poster: ld a, [wDecoPoster] ld hl, DecorationDesc_PosterPointers ld de, 3 @@ -1088,15 +1016,13 @@ DecorationDesc_Poster: ; 26f69 ld d, [hl] ld e, a ret -; 26f84 -DecorationDesc_PosterPointers: ; 26f84 +DecorationDesc_PosterPointers: dbw DECO_TOWN_MAP, DecorationDesc_TownMapPoster dbw DECO_PIKACHU_POSTER, DecorationDesc_PikachuPoster dbw DECO_CLEFAIRY_POSTER, DecorationDesc_ClefairyPoster dbw DECO_JIGGLYPUFF_POSTER, DecorationDesc_JigglypuffPoster db -1 -; 26f91 DecorationDesc_TownMapPoster: ; 0x26f91 opentext @@ -1143,34 +1069,31 @@ DecorationDesc_JigglypuffPoster: ; 0x26fb0 db "@" ; 0x26fb8 -DecorationDesc_NullPoster: ; 26fb8 +DecorationDesc_NullPoster: end -; 26fb9 -DecorationDesc_LeftOrnament: ; 26fb9 +DecorationDesc_LeftOrnament: ld a, [wDecoLeftOrnament] jr DecorationDesc_OrnamentOrConsole -DecorationDesc_RightOrnament: ; 26fbe +DecorationDesc_RightOrnament: ld a, [wDecoRightOrnament] jr DecorationDesc_OrnamentOrConsole -DecorationDesc_Console: ; 26fc3 +DecorationDesc_Console: ld a, [wDecoConsole] jr DecorationDesc_OrnamentOrConsole -DecorationDesc_OrnamentOrConsole: ; 26fc8 +DecorationDesc_OrnamentOrConsole: ld c, a ld de, wStringBuffer3 call GetDecorationName_c_de ld b, BANK(.OrnamentConsoleScript) ld de, .OrnamentConsoleScript ret -; 26fd5 -.OrnamentConsoleScript: ; 26fd5 +.OrnamentConsoleScript: jumptext .OrnamentConsoleText -; 26fd8 .OrnamentConsoleText: ; 0x26fd8 ; It's an adorable @ . @@ -1178,15 +1101,13 @@ DecorationDesc_OrnamentOrConsole: ; 26fc8 db "@" ; 0x26fdd -DecorationDesc_GiantOrnament: ; 26fdd +DecorationDesc_GiantOrnament: ld b, BANK(.BigDollScript) ld de, .BigDollScript ret -; 26fe3 -.BigDollScript: ; 26fe3 +.BigDollScript: jumptext .BigDollText -; 26fe6 .BigDollText: ; 0x26fe6 ; A giant doll! It's fluffy and cuddly. @@ -1194,7 +1115,7 @@ DecorationDesc_GiantOrnament: ; 26fdd db "@" ; 0x26feb -ToggleMaptileDecorations: ; 26feb +ToggleMaptileDecorations: lb de, 0, 4 ld a, [wDecoBed] call SetDecorationTile @@ -1223,9 +1144,8 @@ ToggleMaptileDecorations: ; 26feb dec a ld [hl], a ret -; 27027 -SetPosterVisibility: ; 27027 +SetPosterVisibility: ld b, SET_FLAG ld a, [wDecoPoster] and a @@ -1235,9 +1155,8 @@ SetPosterVisibility: ; 27027 .ok ld de, EVENT_PLAYERS_ROOM_POSTER jp EventFlagAction -; 27037 -SetDecorationTile: ; 27037 +SetDecorationTile: push af call PadCoords_de pop af @@ -1246,9 +1165,8 @@ SetDecorationTile: ; 27037 call _GetDecorationSprite ld [hl], a ret -; 27043 -ToggleDecorationsVisibility: ; 27043 +ToggleDecorationsVisibility: ld de, EVENT_PLAYERS_HOUSE_2F_CONSOLE ld hl, wVariableSprites + SPRITE_CONSOLE - SPRITE_VARS ld a, [wDecoConsole] @@ -1266,9 +1184,8 @@ ToggleDecorationsVisibility: ; 27043 ld a, [wDecoBigDoll] call ToggleDecorationVisibility ret -; 27074 -ToggleDecorationVisibility: ; 27074 +ToggleDecorationVisibility: and a jr z, .hide call _GetDecorationSprite @@ -1279,9 +1196,8 @@ ToggleDecorationVisibility: ; 27074 .hide ld b, SET_FLAG jp EventFlagAction -; 27085 -_GetDecorationSprite: ; 27085 +_GetDecorationSprite: ld c, a push de push hl @@ -1290,9 +1206,8 @@ _GetDecorationSprite: ; 27085 pop de ld a, c ret -; 27092 -PadCoords_de: ; 27092 +PadCoords_de: ld a, d add 4 ld d, a diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm index cc2c8c57439..daa7b841477 100644 --- a/engine/overworld/events.asm +++ b/engine/overworld/events.asm @@ -3,7 +3,7 @@ INCLUDE "constants.asm" SECTION "Events", ROMX -OverworldLoop:: ; 966b0 +OverworldLoop:: xor a ld [wMapStatus], a .loop @@ -21,99 +21,83 @@ OverworldLoop:: ; 966b0 dw EnterMap dw HandleMap dw .done -; 966cb -DisableEvents: ; 966cb +DisableEvents: xor a ld [wScriptFlags3], a ret -; 966d0 -EnableEvents:: ; 966d0 +EnableEvents:: ld a, $ff ld [wScriptFlags3], a ret -; 966d6 -CheckBit5_ScriptFlags3: ; 966d6 +CheckBit5_ScriptFlags3: ld hl, wScriptFlags3 bit 5, [hl] ret -; 966dc -DisableWarpsConnxns: ; 966dc +DisableWarpsConnxns: ld hl, wScriptFlags3 res 2, [hl] ret -; 966e2 -DisableCoordEvents: ; 966e2 +DisableCoordEvents: ld hl, wScriptFlags3 res 1, [hl] ret -; 966e8 -DisableStepCount: ; 966e8 +DisableStepCount: ld hl, wScriptFlags3 res 0, [hl] ret -; 966ee -DisableWildEncounters: ; 966ee +DisableWildEncounters: ld hl, wScriptFlags3 res 4, [hl] ret -; 966f4 -EnableWarpsConnxns: ; 966f4 +EnableWarpsConnxns: ld hl, wScriptFlags3 set 2, [hl] ret -; 966fa -EnableCoordEvents: ; 966fa +EnableCoordEvents: ld hl, wScriptFlags3 set 1, [hl] ret -; 96700 -EnableStepCount: ; 96700 +EnableStepCount: ld hl, wScriptFlags3 set 0, [hl] ret -; 96706 -EnableWildEncounters: ; 96706 +EnableWildEncounters: ld hl, wScriptFlags3 set 4, [hl] ret -; 9670c -CheckWarpConnxnScriptFlag: ; 9670c +CheckWarpConnxnScriptFlag: ld hl, wScriptFlags3 bit 2, [hl] ret -; 96712 -CheckCoordEventScriptFlag: ; 96712 +CheckCoordEventScriptFlag: ld hl, wScriptFlags3 bit 1, [hl] ret -; 96718 -CheckStepCountScriptFlag: ; 96718 +CheckStepCountScriptFlag: ld hl, wScriptFlags3 bit 0, [hl] ret -; 9671e -CheckWildEncountersScriptFlag: ; 9671e +CheckWildEncountersScriptFlag: ld hl, wScriptFlags3 bit 4, [hl] ret -; 96724 -StartMap: ; 96724 +StartMap: xor a ld [wScriptVar], a xor a @@ -123,7 +107,7 @@ StartMap: ; 96724 call ByteFill farcall InitCallReceiveDelay call ClearJoypad -EnterMap: ; 9673e +EnterMap: xor a ld [wXYComparePointer], a ld [wXYComparePointer + 1], a @@ -149,15 +133,13 @@ EnterMap: ; 9673e ld a, 2 ; HandleMap ld [wMapStatus], a ret -; 9676d -UnusedWait30Frames: ; 9676d +UnusedWait30Frames: ld c, 30 call DelayFrames ret -; 96773 -HandleMap: ; 96773 +HandleMap: call ResetOverworldDelay call HandleMapTimeAndJoypad farcall HandleCmdQueue ; no need to farcall @@ -173,9 +155,8 @@ HandleMap: ; 96773 call HandleMapBackground call CheckPlayerState ret -; 96795 -MapEvents: ; 96795 +MapEvents: ld a, [wMapEventStatus] ld hl, .jumps rst JumpTable @@ -184,39 +165,33 @@ MapEvents: ; 96795 .jumps dw .events dw .no_events -; 967a1 -.events ; 967a1 +.events call PlayerEvents call DisableEvents farcall ScriptEvents ret -; 967ae -.no_events ; 967ae +.no_events ret -; 967af -MaxOverworldDelay: ; 967af +MaxOverworldDelay: db 2 -; 967b0 -ResetOverworldDelay: ; 967b0 +ResetOverworldDelay: ld a, [MaxOverworldDelay] ld [wOverworldDelay], a ret -; 967b7 -NextOverworldFrame: ; 967b7 +NextOverworldFrame: ld a, [wOverworldDelay] and a ret z ld c, a call DelayFrames ret -; 967c1 -HandleMapTimeAndJoypad: ; 967c1 +HandleMapTimeAndJoypad: ld a, [wMapEventStatus] cp 1 ; no events ret z @@ -225,23 +200,20 @@ HandleMapTimeAndJoypad: ; 967c1 call GetJoypad call TimeOfDayPals ret -; 967d1 -HandleMapObjects: ; 967d1 +HandleMapObjects: farcall HandleNPCStep ; engine/map_objects.asm farcall _HandlePlayerStep call _CheckObjectEnteringVisibleRange ret -; 967e1 -HandleMapBackground: ; 967e1 +HandleMapBackground: farcall _UpdateSprites farcall ScrollScreen farcall PlaceMapNameSign ret -; 967f4 -CheckPlayerState: ; 967f4 +CheckPlayerState: ld a, [wPlayerStepFlags] bit 5, a ; in the middle of step jr z, .events @@ -259,17 +231,15 @@ CheckPlayerState: ; 967f4 ld a, 1 ; no events ld [wMapEventStatus], a ret -; 96812 -_CheckObjectEnteringVisibleRange: ; 96812 +_CheckObjectEnteringVisibleRange: ld hl, wPlayerStepFlags bit 6, [hl] ret z farcall CheckObjectEnteringVisibleRange ret -; 9681f -PlayerEvents: ; 9681f +PlayerEvents: xor a ; If there's already a player event, don't interrupt it. ld a, [wScriptRunning] @@ -318,9 +288,8 @@ PlayerEvents: ; 9681f .ok2 scf ret -; 96867 -CheckTrainerBattle3: ; 96867 +CheckTrainerBattle3: nop nop call CheckTrainerBattle2 @@ -333,9 +302,8 @@ CheckTrainerBattle3: ; 96867 .nope xor a ret -; 96874 -CheckTileEvent: ; 96874 +CheckTileEvent: ; Check for warps, coord events, or wild battles. call CheckWarpConnxnScriptFlag @@ -399,9 +367,8 @@ CheckTileEvent: ; 96874 call GetMapScriptsBank call CallScript ret -; 968c7 -CheckWildEncounterCooldown:: ; 968c7 +CheckWildEncounterCooldown:: ld hl, wWildEncounterCooldown ld a, [hl] and a @@ -410,35 +377,30 @@ CheckWildEncounterCooldown:: ; 968c7 ret z scf ret -; 968d1 -SetUpFiveStepWildEncounterCooldown: ; 968d1 +SetUpFiveStepWildEncounterCooldown: ld a, 5 ld [wWildEncounterCooldown], a ret -; 968d7 -ret_968d7: ; 968d7 +ret_968d7: ret -;968d8 -SetMinTwoStepWildEncounterCooldown: ; 968d8 +SetMinTwoStepWildEncounterCooldown: ld a, [wWildEncounterCooldown] cp 2 ret nc ld a, 2 ld [wWildEncounterCooldown], a ret -; 968e4 -Dummy_CheckScriptFlags3Bit5: ; 968e4 +Dummy_CheckScriptFlags3Bit5: call CheckBit5_ScriptFlags3 ret z call ret_2f3e ret -; 968ec -RunSceneScript: ; 968ec +RunSceneScript: ld a, [wCurrMapSceneScriptCount] and a jr z, .nope @@ -485,9 +447,8 @@ endr .nope xor a ret -; 9693a -CheckTimeEvents: ; 9693a +CheckTimeEvents: ld a, [wLinkMode] and a jr nz, .nothing @@ -517,15 +478,13 @@ CheckTimeEvents: ; 9693a call CallScript scf ret -; 96970 -.unused ; 96970 +.unused ld a, 8 scf ret -; 96974 -OWPlayerInput: ; 96974 +OWPlayerInput: call PlayerMovement ret c @@ -552,9 +511,8 @@ OWPlayerInput: ; 96974 pop af scf ret -; 96999 -CheckAPressOW: ; 96999 +CheckAPressOW: ld a, [hJoyPressed] and A_BUTTON ret z @@ -566,17 +524,15 @@ CheckAPressOW: ; 96999 ret c xor a ret -; 969ac -PlayTalkObject: ; 969ac +PlayTalkObject: push de ld de, SFX_READ_TEXT_2 call PlaySFX pop de ret -; 969b5 -TryObjectEvent: ; 969b5 +TryObjectEvent: farcall CheckFacingObject jr c, .IsObject xor a @@ -627,9 +583,8 @@ TryObjectEvent: ; 969b5 dbw OBJECTTYPE_5, .five dbw OBJECTTYPE_6, .six db -1 -; 96a04 -.script ; 96a04 +.script ld hl, MAPOBJECT_SCRIPT_POINTER add hl, bc ld a, [hli] @@ -638,9 +593,8 @@ TryObjectEvent: ; 969b5 call GetMapScriptsBank call CallScript ret -; 96a12 -.itemball ; 96a12 +.itemball ld hl, MAPOBJECT_SCRIPT_POINTER add hl, bc ld a, [hli] @@ -653,36 +607,30 @@ TryObjectEvent: ; 969b5 ld a, PLAYEREVENT_ITEMBALL scf ret -; 96a29 -.trainer ; 96a29 +.trainer call TalkToTrainer ld a, PLAYEREVENT_TALKTOTRAINER scf ret -; 96a30 -.three ; 96a30 +.three xor a ret -; 96a32 -.four ; 96a32 +.four xor a ret -; 96a34 -.five ; 96a34 +.five xor a ret -; 96a36 -.six ; 96a36 +.six xor a ret -; 96a38 -TryBGEvent: ; 96a38 +TryBGEvent: call CheckFacingBGEvent jr c, .is_bg_event xor a @@ -704,7 +652,6 @@ TryBGEvent: ; 96a38 dw .ifnotset dw .itemifset dw .copy -; 96a59 .up ld b, OW_UP @@ -784,9 +731,8 @@ TryBGEvent: ; 96a38 .dontread xor a ret -; 96ad8 -CheckBGEventFlag: ; 96ad8 +CheckBGEventFlag: ld hl, wEngineBuffer4 ld a, [hli] ld h, [hl] @@ -802,16 +748,14 @@ CheckBGEventFlag: ; 96ad8 and a pop hl ret -; 96af0 -PlayerMovement: ; 96af0 +PlayerMovement: farcall DoPlayerMovement ld a, c ld hl, .pointers rst JumpTable ld a, c ret -; 96afd .pointers dw .zero @@ -824,34 +768,30 @@ PlayerMovement: ; 96af0 dw .seven .zero -.four ; 96b0d +.four xor a ld c, a ret -; 96b10 -.seven ; 96b10 +.seven call ret_968d7 ; mobile xor a ld c, a ret -; 96b16 -.one ; 96b16 +.one ld a, 5 ld c, a scf ret -; 96b1b -.two ; 96b1b +.two ld a, 9 ld c, a scf ret -; 96b20 -.three ; 96b20 +.three ; force the player to move in some direction ld a, BANK(Script_ForcedMovement) ld hl, Script_ForcedMovement @@ -860,17 +800,15 @@ PlayerMovement: ; 96af0 ld c, a scf ret -; 96b2b .five -.six ; 96b2b +.six ld a, -1 ld c, a and a ret -; 96b30 -CheckMenuOW: ; 96b30 +CheckMenuOW: xor a ld [hMenuReturn], a ld [hMenuReturn + 1], a @@ -899,36 +837,30 @@ CheckMenuOW: ; 96b30 call CallScript scf ret -; 96b58 -StartMenuScript: ; 96b58 +StartMenuScript: callasm StartMenu jump StartMenuCallback -; 96b5f -SelectMenuScript: ; 96b5f +SelectMenuScript: callasm SelectMenu jump SelectMenuCallback -; 96b66 StartMenuCallback: -SelectMenuCallback: ; 96b66 +SelectMenuCallback: copybytetovar hMenuReturn ifequal HMENURETURN_SCRIPT, .Script ifequal HMENURETURN_ASM, .Asm end -; 96b72 -.Script: ; 96b72 +.Script: ptjump wQueuedScriptBank -; 96b75 -.Asm: ; 96b75 +.Asm: ptcallasm wQueuedScriptBank end -; 96b79 -CountStep: ; 96b79 +CountStep: ; Don't count steps in link communication rooms. ld a, [wLinkMode] and a @@ -993,16 +925,14 @@ CountStep: ; 96b79 ld a, 8 scf ret -; 96bd3 ; unused -.unreferenced ; 96bd3 +.unreferenced ld a, 7 scf ret -; 96bd7 -DoRepelStep: ; 96bd7 +DoRepelStep: ld a, [wRepelEffect] and a ret z @@ -1016,9 +946,8 @@ DoRepelStep: ; 96bd7 call CallScript scf ret -; 96beb -DoPlayerEvent: ; 96beb +DoPlayerEvent: ld a, [wScriptRunning] and a ret z @@ -1042,9 +971,8 @@ DoPlayerEvent: ; 96beb ld a, [hl] ld [wScriptPos + 1], a ret -; 96c0c -PlayerEventScriptPointers: ; 96c0c +PlayerEventScriptPointers: dba Invalid_0x96c2d ; 0 dba SeenByTrainerScript ; 1 dba TalkToTrainerScript ; 2 @@ -1056,55 +984,45 @@ PlayerEventScriptPointers: ; 96c0c dba HatchEggScript ; 8 dba ChangeDirectionScript ; 9 dba Invalid_0x96c2d ; 10 -; 96c2d -Invalid_0x96c2d: ; 96c2d +Invalid_0x96c2d: end -; 96c2e ; unused end -; 96c2f -HatchEggScript: ; 96c2f +HatchEggScript: callasm OverworldHatchEgg end -; 96c34 -WarpToNewMapScript: ; 96c34 +WarpToNewMapScript: warpsound newloadmap MAPSETUP_DOOR end -; 96c38 -FallIntoMapScript: ; 96c38 +FallIntoMapScript: newloadmap MAPSETUP_FALL playsound SFX_KINESIS applymovement PLAYER, MovementData_0x96c48 playsound SFX_STRENGTH scall LandAfterPitfallScript end -; 96c48 -MovementData_0x96c48: ; 96c48 +MovementData_0x96c48: skyfall step_end -; 96c4a -LandAfterPitfallScript: ; 96c4a +LandAfterPitfallScript: earthquake 16 end -; 96c4d EdgeWarpScript: ; 4 reloadandreturn MAPSETUP_CONNECTION -; 96c4f ChangeDirectionScript: ; 9 deactivatefacing 3 callasm EnableWildEncounters end -; 96c56 INCLUDE "engine/overworld/scripting.asm" diff --git a/engine/overworld/events_2.asm b/engine/overworld/events_2.asm index 6e106541a1f..b7376d48d6f 100644 --- a/engine/overworld/events_2.asm +++ b/engine/overworld/events_2.asm @@ -1,14 +1,13 @@ ; More overworld event handling. -WarpToSpawnPoint:: ; 97c28 +WarpToSpawnPoint:: ld hl, wStatusFlags2 res STATUSFLAGS2_SAFARI_GAME_F, [hl] res STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] ret -; 97c30 -RunMemScript:: ; 97c30 +RunMemScript:: ; If there is no script here, we don't need to be here. ld a, [wMapReentryScriptQueueFlag] and a @@ -29,9 +28,8 @@ RunMemScript:: ; 97c30 call ByteFill pop af ret -; 97c4f -LoadScriptBDE:: ; 97c4f +LoadScriptBDE:: ; If there's already a script here, don't overwrite. ld hl, wMapReentryScriptQueueFlag ld a, [hl] @@ -48,9 +46,8 @@ LoadScriptBDE:: ; 97c4f ld [hl], d scf ret -; 97c5f -TryTileCollisionEvent:: ; 97c5f +TryTileCollisionEvent:: call GetFacingTileCoord ld [wEngineBuffer1], a ld c, a @@ -98,10 +95,9 @@ TryTileCollisionEvent:: ; 97c5f ld a, $ff scf ret -; 97cc0 -RandomEncounter:: ; 97cc0 +RandomEncounter:: ; Random encounter call CheckWildEncounterCooldown @@ -139,16 +135,14 @@ RandomEncounter:: ; 97cc0 call CallScript scf ret -; 97cf9 -WildBattleScript: ; 97cf9 +WildBattleScript: randomwildmon startbattle reloadmapafterbattle end -; 97cfd -CanUseSweetScent:: ; 97cfd +CanUseSweetScent:: ld hl, wStatusFlags bit STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl] jr nz, .no @@ -170,17 +164,15 @@ CanUseSweetScent:: ; 97cfd .no and a ret -; 97d23 -_TryWildEncounter_BugContest: ; 97d23 +_TryWildEncounter_BugContest: call TryWildEncounter_BugContest ret nc call ChooseWildEncounter_BugContest farcall CheckRepelEffect ret -; 97d31 -ChooseWildEncounter_BugContest:: ; 97d31 +ChooseWildEncounter_BugContest:: ; Pick a random mon out of ContestMons. .loop @@ -232,9 +224,8 @@ ChooseWildEncounter_BugContest:: ; 97d31 xor a ret -; 97d64 -TryWildEncounter_BugContest: ; 97d64 +TryWildEncounter_BugContest: ld a, [wPlayerStandingTile] call CheckSuperTallGrassTile ld b, 40 percent @@ -251,13 +242,12 @@ TryWildEncounter_BugContest: ; 97d64 ld a, 1 and a ret -; 97d87 INCLUDE "data/wild/bug_contest_mons.asm" -DoBikeStep:: ; 97db3 +DoBikeStep:: nop nop ; If the bike shop owner doesn't have our number, or @@ -322,9 +312,8 @@ DoBikeStep:: ; 97db3 .NoCall: xor a ret -; 97df9 -ClearCmdQueue:: ; 97df9 +ClearCmdQueue:: ld hl, wCmdQueue ld de, 6 ld c, 4 @@ -335,9 +324,8 @@ ClearCmdQueue:: ; 97df9 dec c jr nz, .loop ret -; 97e08 -HandleCmdQueue:: ; 97e08 +HandleCmdQueue:: ld hl, wCmdQueue xor a .loop @@ -359,18 +347,16 @@ HandleCmdQueue:: ; 97e08 cp CMDQUEUE_CAPACITY jr nz, .loop ret -; 97e25 -Unreferenced_GetNthCmdQueueEntry: ; 97e25 +Unreferenced_GetNthCmdQueueEntry: ld hl, wCmdQueue ld bc, CMDQUEUE_ENTRY_SIZE call AddNTimes ld b, h ld c, l ret -; 97e31 -WriteCmdQueue:: ; 97e31 +WriteCmdQueue:: push bc push de call .GetNextEmptyEntry @@ -385,9 +371,8 @@ WriteCmdQueue:: ; 97e31 xor a ld [hl], a ret -; 97e45 -.GetNextEmptyEntry: ; 97e45 +.GetNextEmptyEntry: ld hl, wCmdQueue ld de, CMDQUEUE_ENTRY_SIZE ld c, CMDQUEUE_CAPACITY @@ -406,9 +391,8 @@ WriteCmdQueue:: ; 97e31 sub c and a ret -; 97e5c -DelCmdQueue:: ; 97e5c +DelCmdQueue:: ld hl, wCmdQueue ld de, CMDQUEUE_ENTRY_SIZE ld c, CMDQUEUE_CAPACITY @@ -427,16 +411,14 @@ DelCmdQueue:: ; 97e5c ld [hl], a scf ret -; 97e72 -_DelCmdQueue: ; 97e72 +_DelCmdQueue: ld hl, CMDQUEUE_TYPE add hl, bc ld [hl], 0 ret -; 97e79 -HandleQueuedCommand: ; 97e79 +HandleQueuedCommand: ld hl, CMDQUEUE_TYPE add hl, bc ld a, [hl] @@ -459,62 +441,54 @@ HandleQueuedCommand: ; 97e79 pop af rst FarCall ret -; 97e94 -.Jumptable: ; 97e94 +.Jumptable: dba CmdQueue_Null dba CmdQueue_Null2 dba CmdQueue_StoneTable dba CmdQueue_Type3 dba CmdQueue_Type4 -; 97ea3 -CmdQueueAnonymousJumptable: ; 97ea3 +CmdQueueAnonymousJumptable: ld hl, CMDQUEUE_05 add hl, bc ld a, [hl] pop hl rst JumpTable ret -; 97eab -CmdQueueAnonJT_Increment: ; 97eab +CmdQueueAnonJT_Increment: ld hl, CMDQUEUE_05 add hl, bc inc [hl] ret -; 97eb1 -CmdQueueAnonJT_Decrement: ; 97eb1 +CmdQueueAnonJT_Decrement: ld hl, CMDQUEUE_05 add hl, bc dec [hl] ret -; 97eb7 -CmdQueue_Null: ; 97eb7 +CmdQueue_Null: ret -; 97eb8 -CmdQueue_Null2: ; 97eb8 +CmdQueue_Null2: call ret_2f3e ret -; 97ebc -CmdQueue_Type4: ; 97ebc +CmdQueue_Type4: call CmdQueueAnonymousJumptable ; anonymous dw dw .zero dw .one -; 97ec3 -.zero ; 97ec3 +.zero ld a, [hSCY] ld hl, 4 add hl, bc ld [hl], a call CmdQueueAnonJT_Increment -.one ; 97ecd +.one ld hl, 1 add hl, bc ld a, [hl] @@ -545,21 +519,19 @@ CmdQueue_Type4: ; 97ebc ld [hSCY], a call _DelCmdQueue ret -; 97ef9 -CmdQueue_Type3: ; 97ef9 +CmdQueue_Type3: call CmdQueueAnonymousJumptable ; anonymous dw dw .zero dw .one dw .two -; 97f02 -.zero ; 97f02 +.zero call .IsPlayerFacingDown jr z, .PlayerNotFacingDown call CmdQueueAnonJT_Increment -.one ; 97f0a +.one call .IsPlayerFacingDown jr z, .PlayerNotFacingDown call CmdQueueAnonJT_Increment @@ -569,9 +541,8 @@ CmdQueue_Type3: ; 97ef9 ld a, [hl] ld [wd173], a ret -; 97f1b -.two ; 97f1b +.two call .IsPlayerFacingDown jr z, .PlayerNotFacingDown call CmdQueueAnonJT_Decrement @@ -581,27 +552,24 @@ CmdQueue_Type3: ; 97ef9 ld a, [hl] ld [wd173], a ret -; 97f2c -.PlayerNotFacingDown: ; 97f2c +.PlayerNotFacingDown: ld a, $7f ld [wd173], a ld hl, 5 add hl, bc ld [hl], 0 ret -; 97f38 -.IsPlayerFacingDown: ; 97f38 +.IsPlayerFacingDown: push bc ld bc, wPlayerStruct call GetSpriteDirection and a pop bc ret -; 97f42 -CmdQueue_StoneTable: ; 97f42 +CmdQueue_StoneTable: ld de, wPlayerStruct ld a, NUM_OBJECT_STRUCTS .loop @@ -647,4 +615,3 @@ CmdQueue_StoneTable: ; 97f42 .fall_down_hole pop af ret -; 97f7e diff --git a/engine/overworld/init_map.asm b/engine/overworld/init_map.asm index 2eb4998a6c0..ba1e7429509 100644 --- a/engine/overworld/init_map.asm +++ b/engine/overworld/init_map.asm @@ -1,4 +1,4 @@ -ReanchorBGMap_NoOAMUpdate:: ; 6454 +ReanchorBGMap_NoOAMUpdate:: call DelayFrame ld a, [hOAMUpdate] push af @@ -50,13 +50,13 @@ ReanchorBGMap_NoOAMUpdate:: ; 6454 call ApplyBGMapAnchorToObjects ret -.LoadBGMapAddrIntoHRAM: ; 64b9 +.LoadBGMapAddrIntoHRAM: ld [hBGMapAddress + 1], a xor a ld [hBGMapAddress], a ret -LoadFonts_NoOAMUpdate:: ; 64bf +LoadFonts_NoOAMUpdate:: ld a, [hOAMUpdate] push af ld a, $1 @@ -76,7 +76,7 @@ LoadFonts_NoOAMUpdate:: ; 64bf call LoadStandardFont ret -HDMATransfer_FillBGMap0WithBlack: ; 64db +HDMATransfer_FillBGMap0WithBlack: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) diff --git a/engine/overworld/load_map_part.asm b/engine/overworld/load_map_part.asm index 9eeef725910..da1436406f7 100644 --- a/engine/overworld/load_map_part.asm +++ b/engine/overworld/load_map_part.asm @@ -1,4 +1,4 @@ -_LoadMapPart:: ; 4d15b +_LoadMapPart:: ld hl, wSurroundingTiles ld a, [wMetatileStandingY] and a diff --git a/engine/overworld/map_object_action.asm b/engine/overworld/map_object_action.asm index 8c897d25ace..613e3b09985 100644 --- a/engine/overworld/map_object_action.asm +++ b/engine/overworld/map_object_action.asm @@ -1,4 +1,4 @@ -ObjectActionPairPointers: ; 445f +ObjectActionPairPointers: ; entries correspond to OBJECT_ACTION_* constants dw SetFacingStanding, SetFacingStanding dw SetFacingStandAction, SetFacingCurrent @@ -17,34 +17,30 @@ ObjectActionPairPointers: ; 445f dw SetFacingBoulderDust, SetFacingStanding dw SetFacingGrassShake, SetFacingStanding dw SetFacingSkyfall, SetFacingCurrent -; 44a3 -SetFacingStanding: ; 44a3 +SetFacingStanding: ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], STANDING ret -; 44aa -SetFacingCurrent: ; 44aa +SetFacingCurrent: call GetSpriteDirection or FACING_STEP_DOWN_0 ; useless ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], a ret -; 44b5 -SetFacingStandAction: ; 44b5 +SetFacingStandAction: ld hl, OBJECT_FACING_STEP add hl, bc ld a, [hl] and 1 jr nz, SetFacingStepAction jp SetFacingCurrent -; 44c1 -SetFacingStepAction: ; 44c1 +SetFacingStepAction: ld hl, OBJECT_FLAGS1 add hl, bc bit SLIDING_F, [hl] @@ -69,9 +65,8 @@ SetFacingStepAction: ; 44c1 add hl, bc ld [hl], a ret -; 44e4 -SetFacingSkyfall: ; 44e4 +SetFacingSkyfall: ld hl, OBJECT_FLAGS1 add hl, bc bit SLIDING_F, [hl] @@ -96,9 +91,8 @@ SetFacingSkyfall: ; 44e4 add hl, bc ld [hl], a ret -; 4508 -SetFacingBumpAction: ; 4508 +SetFacingBumpAction: ld hl, OBJECT_FLAGS1 add hl, bc bit SLIDING_F, [hl] @@ -122,9 +116,8 @@ SetFacingBumpAction: ; 4508 add hl, bc ld [hl], a ret -; 4529 -SetFacingCounterclockwiseSpin: ; 4529 +SetFacingCounterclockwiseSpin: call CounterclockwiseSpinAction ld hl, OBJECT_FACING add hl, bc @@ -134,14 +127,12 @@ SetFacingCounterclockwiseSpin: ; 4529 add hl, bc ld [hl], a ret -; 4539 -SetFacingCounterclockwiseSpin2: ; 4539 +SetFacingCounterclockwiseSpin2: call CounterclockwiseSpinAction jp SetFacingStanding -; 453f -CounterclockwiseSpinAction: ; 453f +CounterclockwiseSpinAction: ; Here, OBJECT_STEP_FRAME consists of two 2-bit components, ; using only bits 0,1 and 4,5. ; bits 0,1 is a timer (4 overworld frames) @@ -179,13 +170,11 @@ CounterclockwiseSpinAction: ; 453f add hl, bc ld [hl], a ret -; 456a -.Directions: ; 456a +.Directions: db OW_DOWN, OW_RIGHT, OW_UP, OW_LEFT -; 456e -SetFacingFish: ; 456e +SetFacingFish: call GetSpriteDirection rrca rrca @@ -194,30 +183,26 @@ SetFacingFish: ; 456e add hl, bc ld [hl], a ret -; 457b -SetFacingShadow: ; 457b +SetFacingShadow: ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], FACING_SHADOW ret -; 4582 SetFacingEmote: ; 4582 emote ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], FACING_EMOTE ret -; 4589 -SetFacingBigDollSym: ; 4589 +SetFacingBigDollSym: ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], FACING_BIG_DOLL_SYM ret -; 4590 -SetFacingBounce: ; 4590 +SetFacingBounce: ld hl, OBJECT_STEP_FRAME add hl, bc ld a, [hl] @@ -230,16 +215,14 @@ SetFacingBounce: ; 4590 add hl, bc ld [hl], FACING_STEP_UP_0 ret -; 45a4 -SetFacingFreezeBounce: ; 45a4 +SetFacingFreezeBounce: ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], FACING_STEP_DOWN_0 ret -; 45ab -SetFacingWeirdTree: ; 45ab +SetFacingWeirdTree: ld hl, OBJECT_STEP_FRAME add hl, bc ld a, [hl] @@ -253,16 +236,14 @@ SetFacingWeirdTree: ; 45ab add hl, bc ld [hl], a ret -; 45be -SetFacingBigDollAsym: ; 45be +SetFacingBigDollAsym: ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], FACING_BIG_DOLL_ASYM ret -; 45c5 -SetFacingBigDoll: ; 45c5 +SetFacingBigDoll: ld a, [wVariableSprites + SPRITE_BIG_DOLL - SPRITE_VARS] ld d, FACING_BIG_DOLL_SYM ; symmetric cp SPRITE_BIG_SNORLAX @@ -276,9 +257,8 @@ SetFacingBigDoll: ; 45c5 add hl, bc ld [hl], d ret -; 45da -SetFacingBoulderDust: ; 45da +SetFacingBoulderDust: ld hl, OBJECT_STEP_FRAME add hl, bc inc [hl] @@ -293,9 +273,8 @@ SetFacingBoulderDust: ; 45da .ok ld [hl], a ret -; 45ed -SetFacingGrassShake: ; 45ed +SetFacingGrassShake: ld hl, OBJECT_STEP_FRAME add hl, bc inc [hl] @@ -310,4 +289,3 @@ SetFacingGrassShake: ; 45ed .ok ld [hl], a ret -; 4600 diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm index 7ed1d5f5fb3..0846f01b1f7 100644 --- a/engine/overworld/map_objects.asm +++ b/engine/overworld/map_objects.asm @@ -3,8 +3,7 @@ INCLUDE "data/sprites/facings.asm" INCLUDE "data/sprites/map_objects.asm" -; 4357 -DeleteMapObject:: ; 4357 +DeleteMapObject:: push bc ld hl, OBJECT_MAP_OBJECT_INDEX add hl, bc @@ -27,9 +26,8 @@ DeleteMapObject:: ; 4357 .ok pop bc ret -; 437b -Function437b: ; 437b +Function437b: call .CheckObjectStillVisible ret c call .HandleStepType @@ -156,9 +154,8 @@ Function437b: ; 437b jr nz, asm_4448 ld de, ObjectActionPairPointers ; use first column jr _HandleObjectAction -; 4440 -Function4440: ; 4440 +Function4440: ld hl, OBJECT_FLAGS1 add hl, bc bit INVISIBLE_F, [hl] @@ -166,7 +163,6 @@ Function4440: ; 4440 asm_4448: ld de, ObjectActionPairPointers + 2 ; use second column jr _HandleObjectAction -; 444d _HandleObjectAction: ; call [4 * wObjectStructs[ObjInd, OBJECT_ACTION] + de] @@ -183,11 +179,10 @@ _HandleObjectAction: ld l, a call _hl_ ret -; 445f INCLUDE "engine/overworld/map_object_action.asm" -CopyNextCoordsTileToStandingCoordsTile: ; 4600 +CopyNextCoordsTileToStandingCoordsTile: ld hl, OBJECT_NEXT_MAP_X add hl, bc ld a, [hl] @@ -212,9 +207,8 @@ CopyNextCoordsTileToStandingCoordsTile: ; 4600 ld a, [hl] call UselessAndA ret -; 462a -Function462a: ; 462a +Function462a: ld hl, OBJECT_MAP_X add hl, bc ld a, [hl] @@ -228,9 +222,8 @@ Function462a: ; 462a add hl, bc ld [hl], a ret -; 463f -UpdateTallGrassFlags: ; 463f +UpdateTallGrassFlags: ld hl, OBJECT_FLAGS2 add hl, bc bit OVERHEAD_F, [hl] @@ -250,9 +243,8 @@ UpdateTallGrassFlags: ; 463f ld a, [hl] call UselessAndA ret -; 4661 -SetTallGrassFlags: ; 4661 +SetTallGrassFlags: call CheckSuperTallGrassTile jr z, .set call CheckGrassTile @@ -268,14 +260,12 @@ SetTallGrassFlags: ; 4661 add hl, bc res OVERHEAD_F, [hl] ret -; 4679 -UselessAndA: ; 4679 +UselessAndA: and a ret -; 467b -EndSpriteMovement: ; 467b +EndSpriteMovement: xor a ld hl, OBJECT_STEP_FRAME add hl, bc @@ -290,9 +280,8 @@ EndSpriteMovement: ; 467b add hl, bc ld [hl], STANDING ret -; 4690 -InitStep: ; 4690 +InitStep: ld hl, OBJECT_DIRECTION_WALKING add hl, bc ld [hl], a @@ -306,7 +295,7 @@ InitStep: ; 4690 ld hl, OBJECT_FACING add hl, bc ld [hl], a -GetNextTile: ; 46a6 +GetNextTile: call GetStepVector ld hl, OBJECT_STEP_DURATION add hl, bc @@ -336,9 +325,8 @@ GetNextTile: ; 46a6 add hl, bc ld [hl], a ret -; 46d7 -AddStepVector: ; 46d7 +AddStepVector: call GetStepVector ld hl, OBJECT_SPRITE_X add hl, bc @@ -351,9 +339,8 @@ AddStepVector: ; 46d7 add e ld [hl], a ret -; 46e9 -GetStepVector: ; 46e9 +GetStepVector: ; Return (x, y, duration, speed) in (d, e, a, h). ld hl, OBJECT_DIRECTION_WALKING add hl, bc @@ -372,9 +359,8 @@ GetStepVector: ; 46e9 ld a, [hli] ld h, [hl] ret -; 4700 -StepVectors: ; 4700 +StepVectors: ; x, y, duration, speed ; slow db 0, 1, 16, 1 @@ -391,18 +377,16 @@ StepVectors: ; 4700 db 0, -4, 4, 4 db -4, 0, 4, 4 db 4, 0, 4, 4 -; 4730 -GetStepVectorSign: ; 4730 +GetStepVectorSign: add a ret z ; 0 or 128 ld a, 1 ret nc ; 1 - 127 ld a, -1 ret ; 129 - 255 -; 4738 -UpdatePlayerStep: ; 4738 +UpdatePlayerStep: ld hl, OBJECT_DIRECTION_WALKING add hl, bc ld a, [hl] @@ -418,9 +402,8 @@ UpdatePlayerStep: ; 4738 ld hl, wPlayerStepFlags set 5, [hl] ret -; 4759 -Unreferenced_Function4759: ; 4759 +Unreferenced_Function4759: push bc ld e, a ld d, 0 @@ -432,9 +415,8 @@ Unreferenced_Function4759: ; 4759 ld a, [hl] pop bc ret -; 4769 -RestoreDefaultMovement: ; 4769 +RestoreDefaultMovement: ld hl, OBJECT_MAP_OBJECT_INDEX add hl, bc ld a, [hl] @@ -451,76 +433,66 @@ RestoreDefaultMovement: ; 4769 .ok ld a, SPRITEMOVEFN_STANDING ret -; 4780 -ClearObjectMovementByteIndex: ; 4780 +ClearObjectMovementByteIndex: ld hl, OBJECT_MOVEMENT_BYTE_INDEX add hl, bc ld [hl], 0 ret -; 4787 -IncrementObjectMovementByteIndex: ; 4787 +IncrementObjectMovementByteIndex: ld hl, OBJECT_MOVEMENT_BYTE_INDEX add hl, bc inc [hl] ret -; 478d -DecrementObjectMovementByteIndex: ; 478d +DecrementObjectMovementByteIndex: ld hl, OBJECT_MOVEMENT_BYTE_INDEX add hl, bc dec [hl] ret -; 4793 -MovementAnonymousJumptable: ; 4793 +MovementAnonymousJumptable: ld hl, OBJECT_MOVEMENT_BYTE_INDEX add hl, bc ld a, [hl] pop hl rst JumpTable ret -; 479b -ClearObjectStructField1c: ; 479b +ClearObjectStructField1c: ld hl, OBJECT_1C add hl, bc ld [hl], 0 ret -; 47a2 -IncrementObjectStructField1c: ; 47a2 +IncrementObjectStructField1c: ld hl, OBJECT_1C add hl, bc inc [hl] ret -; 47a8 -Field1cAnonymousJumptable: ; 47a8 +Field1cAnonymousJumptable: ld hl, OBJECT_1C add hl, bc ld a, [hl] pop hl rst JumpTable ret -; 47b0 -GetValueObjectStructField1c: ; 47b0 +GetValueObjectStructField1c: ld hl, OBJECT_1C add hl, bc ld a, [hl] ret -; 47b6 -SetValueObjectStructField1c: ; 47b6 +SetValueObjectStructField1c: ld hl, OBJECT_1C add hl, bc ld [hl], a ret -; 47bc -ObjectMovementReset: ; 47bc +ObjectMovementReset: ld hl, OBJECT_NEXT_MAP_X add hl, bc ld d, [hl] @@ -539,9 +511,8 @@ ObjectMovementReset: ; 47bc add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 47dd -MapObjectMovementPattern: ; 47dd +MapObjectMovementPattern: call ClearObjectStructField1c call GetSpriteMovementFunction ld a, [hl] @@ -549,7 +520,7 @@ MapObjectMovementPattern: ; 47dd rst JumpTable ret -.Pointers: ; 47e9 +.Pointers: ; entries correspond to SPRITEMOVEFN_* constants dw .Null_00 ; 00 dw .RandomWalkY ; 01 @@ -848,7 +819,7 @@ MapObjectMovementPattern: ; 47dd call .MovementSpinNextFacing jr .MovementSpinCounterclockwise -.DirectionData_Counterclockwise: ; 49c0 +.DirectionData_Counterclockwise: db OW_RIGHT, OW_LEFT, OW_DOWN, OW_UP .MovementSpinTurnRight: @@ -856,7 +827,7 @@ MapObjectMovementPattern: ; 47dd call .MovementSpinNextFacing jr .MovementSpinClockwise -.DirectionData_Clockwise: ; 49cc +.DirectionData_Clockwise: db OW_LEFT, OW_RIGHT, OW_UP, OW_DOWN .MovementSpinNextFacing: @@ -969,7 +940,7 @@ MapObjectMovementPattern: ; 47dd ld [hl], STEP_TYPE_TRACKING_OBJECT ret -.data_4a81 ; 4a81 +.data_4a81 ; x, y db 0, -4 db 0, 8 @@ -1073,18 +1044,17 @@ MapObjectMovementPattern: ; 47dd .NewDuration: call EndSpriteMovement call Function462a -RandomStepDuration_Slow: ; 4b1d +RandomStepDuration_Slow: call Random ld a, [hRandomAdd] and %01111111 jr SetRandomStepDuration -; 4b26 -RandomStepDuration_Fast: ; 4b26 +RandomStepDuration_Fast: call Random ld a, [hRandomAdd] and %00011111 -SetRandomStepDuration: ; 4b2d +SetRandomStepDuration: ld hl, OBJECT_STEP_DURATION add hl, bc ld [hl], a @@ -1098,9 +1068,8 @@ SetRandomStepDuration: ; 4b2d add hl, bc ld [hl], STEP_TYPE_03 ret -; 4b45 -StepTypesJumptable: ; 4b45 +StepTypesJumptable: ; entries correspond to STEP_TYPE_* constants dw ObjectMovementReset ; 00 dw MapObjectMovementPattern ; 01 @@ -1128,9 +1097,8 @@ StepTypesJumptable: ; 4b45 dw StepType17 ; 17 dw StepType18 ; 18 dw SkyfallTop ; 19 -; 4b79 -WaitStep_InPlace: ; 4b79 +WaitStep_InPlace: ld hl, OBJECT_STEP_DURATION add hl, bc dec [hl] @@ -1139,9 +1107,8 @@ WaitStep_InPlace: ; 4b79 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4b86 -NPCJump: ; 4b86 +NPCJump: call Field1cAnonymousJumptable ; anonymous dw dw .Jump @@ -1174,9 +1141,8 @@ NPCJump: ; 4b86 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4bbf -PlayerJump: ; 4bbf +PlayerJump: call Field1cAnonymousJumptable ; anonymous dw dw .initjump @@ -1224,16 +1190,14 @@ PlayerJump: ; 4bbf add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4c18 -TeleportFrom: ; 4c18 +TeleportFrom: call Field1cAnonymousJumptable ; anonymous dw dw .InitSpin dw .DoSpin dw .InitSpinRise dw .DoSpinRise -; 4c23 .InitSpin: ld hl, OBJECT_STEP_FRAME @@ -1294,9 +1258,8 @@ TeleportFrom: ; 4c18 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4c89 -TeleportTo: ; 4c89 +TeleportTo: call Field1cAnonymousJumptable ; anonymous dw dw .InitWait @@ -1306,7 +1269,6 @@ TeleportTo: ; 4c89 dw .InitFinalSpin dw .DoFinalSpin dw .FinishStep -; 4c9a .InitWait: ld hl, OBJECT_ACTION @@ -1317,7 +1279,6 @@ TeleportTo: ; 4c89 ld [hl], 16 call IncrementObjectStructField1c ret -; 4caa .DoWait: ld hl, OBJECT_STEP_DURATION @@ -1337,7 +1298,6 @@ TeleportTo: ; 4c89 ld [hl], 16 call IncrementObjectStructField1c ret -; 4cc9 .DoDescent: ld hl, OBJECT_ACTION @@ -1365,7 +1325,6 @@ TeleportTo: ; 4c89 ld [hl], 16 call IncrementObjectStructField1c ret -; 4cf5 .DoFinalSpin: ld hl, OBJECT_ACTION @@ -1386,16 +1345,14 @@ TeleportTo: ; 4c89 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4d14 -Skyfall: ; 4d14 +Skyfall: call Field1cAnonymousJumptable ; anonymous dw dw .Init dw .Step dw .Fall dw .Finish -; 4d1f .Init: ld hl, OBJECT_ACTION @@ -1451,14 +1408,12 @@ Skyfall: ; 4d14 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4d7e -GotBiteStep: ; 4d7e +GotBiteStep: call Field1cAnonymousJumptable ; anonymous dw dw .Init dw .Run -; 4d85 .Init: ld hl, OBJECT_STEP_DURATION @@ -1485,12 +1440,10 @@ GotBiteStep: ; 4d7e add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4daf -RockSmashStep: ; 4daf +RockSmashStep: call .Step jp WaitStep_InPlace -; 4db5 .Step: ld hl, OBJECT_STEP_DURATION @@ -1505,9 +1458,8 @@ RockSmashStep: ; 4daf add hl, bc ld [hl], a ret -; 4dc8 -ReturnDigStep: ; 4dc8 +ReturnDigStep: ld hl, OBJECT_STEP_DURATION add hl, bc ld a, [hl] @@ -1520,9 +1472,8 @@ ReturnDigStep: ; 4dc8 add hl, bc ld [hl], a jp WaitStep_InPlace -; 4ddd -StepType03: ; 4ddd +StepType03: ld hl, OBJECT_DIRECTION_WALKING add hl, bc ld [hl], STANDING @@ -1534,9 +1485,8 @@ StepType03: ; 4ddd add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4df0 -StepType18: ; 4df0 +StepType18: ld hl, OBJECT_DIRECTION_WALKING add hl, bc ld [hl], STANDING @@ -1545,9 +1495,8 @@ StepType18: ; 4df0 dec [hl] ret nz jp DeleteMapObject -; 4dff -StepTypeBump: ; 4dff +StepTypeBump: ld hl, OBJECT_STEP_DURATION add hl, bc dec [hl] @@ -1556,9 +1505,8 @@ StepTypeBump: ; 4dff add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4e0c -StepType05: ; 4e0c +StepType05: call Field1cAnonymousJumptable ; anonymous dw dw .Reset @@ -1571,15 +1519,14 @@ StepType05: ; 4e0c add hl, bc ld [hl], a call IncrementObjectStructField1c -StepType04: ; 4e21 +StepType04: call Stubbed_Function4fb2 ld hl, OBJECT_DIRECTION_WALKING add hl, bc ld [hl], STANDING ret -; 4e2b -NPCStep: ; 4e2b +NPCStep: call Stubbed_Function4fb2 call AddStepVector ld hl, OBJECT_STEP_DURATION @@ -1594,9 +1541,8 @@ NPCStep: ; 4e2b add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4e47 -StepType07: ; 4e47 +StepType07: call AddStepVector ld hl, OBJECT_STEP_DURATION add hl, bc @@ -1604,9 +1550,8 @@ StepType07: ; 4e47 ret nz call CopyNextCoordsTileToStandingCoordsTile jp RandomStepDuration_Slow -; 4e56 -PlayerStep: ; 4e56 +PlayerStep: ; AnimateStep? call Field1cAnonymousJumptable ; anonymous dw @@ -1633,9 +1578,8 @@ PlayerStep: ; 4e56 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4e83 -PlayerOrNPCTurnStep: ; 4e83 +PlayerOrNPCTurnStep: call Field1cAnonymousJumptable ; anonymous dw dw .init1 @@ -1681,9 +1625,8 @@ PlayerOrNPCTurnStep: ; 4e83 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4ecd -StepType0f: ; 4ecd +StepType0f: call AddStepVector ld hl, OBJECT_STEP_DURATION add hl, bc @@ -1713,9 +1656,8 @@ StepType0f: ; 4ecd add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4f04 -StepTypeTrackingObject: ; 4f04 +StepTypeTrackingObject: ld hl, OBJECT_1D add hl, bc ld e, [hl] @@ -1747,10 +1689,9 @@ StepTypeTrackingObject: ; 4f04 ret nz .nope jp DeleteMapObject -; 4f33 -StepType14: ; 4f33 -StepType15: ; 4f33 +StepType14: +StepType15: call Field1cAnonymousJumptable ; anonymous dw dw .Init @@ -1797,21 +1738,18 @@ StepType15: ; 4f33 cpl inc a ret -; 4f77 -StepType16: ; 4f77 +StepType16: call Field1cAnonymousJumptable ; ???? -; 4f7a -StepType17: ; 4f7a +StepType17: call Field1cAnonymousJumptable ; anonymous dw dw .null dw .null dw .null .null -; 4f83 -SkyfallTop: ; 4f83 +SkyfallTop: call Field1cAnonymousJumptable ; anonymous dw dw .Init @@ -1841,7 +1779,6 @@ SkyfallTop: ; 4f83 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 4fb2 Stubbed_Function4fb2: ret @@ -1862,10 +1799,9 @@ Stubbed_Function4fb2: ld [hl], a ret -.y ; 4fcd +.y db 0, -1, -2, -3, -4, -3, -2, -1 -; 4fd5 -UpdateJumpPosition: ; 4fd5 +UpdateJumpPosition: call GetStepVector ld a, h ld hl, OBJECT_1F @@ -1884,10 +1820,9 @@ UpdateJumpPosition: ; 4fd5 ld [hl], a ret -.y ; 4ff0 +.y db -4, -6, -8, -10, -11, -12, -12, -12 db -11, -10, -9, -8, -6, -4, 0, 0 -; 5000 Function5000: ; unscripted? ; copy [wPlayerNextMovement] to [wPlayerMovement] ld a, [wPlayerNextMovement] @@ -1899,15 +1834,13 @@ Function5000: ; unscripted? ; recover the previous value of [wPlayerNextMovement] ld a, [hl] ret -; 500e GetMovementByte: ld hl, wMovementDataPointer call _GetMovementByte ret -; 5015 -Function5015: ; 5015 +Function5015: ld hl, OBJECT_MOVEMENT_BYTE_INDEX add hl, bc ld e, [hl] @@ -1920,9 +1853,8 @@ Function5015: ; 5015 add hl, de ld a, [hl] ret -; 5026 -Function5026: ; 5026 +Function5026: ld hl, OBJECT_MOVEMENT_BYTE_INDEX add hl, bc ld e, [hl] @@ -1935,19 +1867,16 @@ Function5026: ; 5026 add hl, de ld a, [hl] ret -; 5037 -_GetMovementObject: ; 5037 +_GetMovementObject: ld hl, GetMovementObject jp HandleMovementData -; 503d -GetMovementObject: ; 503d +GetMovementObject: ld a, [wMovementObject] ret -; 5041 -HandleMovementData: ; 5041 +HandleMovementData: call .StorePointer .loop xor a @@ -1965,35 +1894,30 @@ HandleMovementData: ; 5041 ld a, h ld [wMovementPointer + 1], a ret -; 505e -JumpMovementPointer: ; 505e +JumpMovementPointer: ld hl, wMovementPointer ld a, [hli] ld h, [hl] ld l, a jp hl -; 5065 -ContinueReadingMovement: ; 5065 +ContinueReadingMovement: ld a, 1 ld [wMovementByteWasControlSwitch], a ret -; 506b -DoMovementFunction: ; 506b +DoMovementFunction: push af call ApplyMovementToFollower pop af ld hl, MovementPointers rst JumpTable ret -; 5075 INCLUDE "engine/overworld/movement.asm" -; 54b8 -ApplyMovementToFollower: ; 54b8 +ApplyMovementToFollower: ld e, a ld a, [wObjectFollow_Follower] cp -1 @@ -2024,9 +1948,8 @@ ApplyMovementToFollower: ; 54b8 pop af ld [hl], a ret -; 54e6 -GetFollowerNextMovementByte: ; 54e6 +GetFollowerNextMovementByte: ld hl, wFollowerMovementQueueLength ld a, [hl] and a @@ -2075,9 +1998,8 @@ GetFollowerNextMovementByte: ; 54e6 ld a, movement_step_end scf ret -; 5529 -SpawnShadow: ; 5529 +SpawnShadow: push bc ld de, .ShadowObject call CopyTempObjectData @@ -2088,9 +2010,8 @@ SpawnShadow: ; 5529 .ShadowObject: ; vtile, palette, movement db $00, PAL_OW_SILVER, SPRITEMOVEDATA_SHADOW -; 5538 -SpawnStrengthBoulderDust: ; 5538 +SpawnStrengthBoulderDust: push bc ld de, .BoulderDustObject call CopyTempObjectData @@ -2100,9 +2021,8 @@ SpawnStrengthBoulderDust: ; 5538 .BoulderDustObject: db $00, PAL_OW_SILVER, SPRITEMOVEDATA_BOULDERDUST -; 5547 -SpawnEmote: ; 5547 +SpawnEmote: push bc ld de, .EmoteObject call CopyTempObjectData @@ -2112,9 +2032,8 @@ SpawnEmote: ; 5547 .EmoteObject: db $00, PAL_OW_SILVER, SPRITEMOVEDATA_EMOTE -; 5556 -ShakeGrass: ; 5556 +ShakeGrass: push bc ld de, .GrassObject call CopyTempObjectData @@ -2124,9 +2043,8 @@ ShakeGrass: ; 5556 .GrassObject db $00, PAL_OW_TREE, SPRITEMOVEDATA_GRASS -; 5565 -ShakeScreen: ; 5565 +ShakeScreen: push bc push af ld de, .ScreenShakeObject @@ -2139,9 +2057,8 @@ ShakeScreen: ; 5565 .ScreenShakeObject: db $00, PAL_OW_SILVER, SPRITEMOVEDATA_SCREENSHAKE -; 5579 -DespawnEmote: ; 5579 +DespawnEmote: push bc ld a, [hMapObjectIndexBuffer] ld c, a @@ -2177,18 +2094,16 @@ DespawnEmote: ; 5579 dec a jr nz, .loop ret -; 55ac -InitTempObject: ; 55ac +InitTempObject: call FindFirstEmptyObjectStruct ret nc ld d, h ld e, l farcall CopyTempObjectToObjectStruct ret -; 55b9 -CopyTempObjectData: ; 55b9 +CopyTempObjectData: ; load into wTempObjectCopy: ; -1, -1, [de], [de + 1], [de + 2], [hMapObjectIndexBuffer], [NextMapX], [NextMapY], -1 ; This spawns the object at the same place as whichever object is loaded into bc. @@ -2221,9 +2136,8 @@ CopyTempObjectData: ; 55b9 inc hl ld [hl], -1 ret -; 55e0 -Function55e0:: ; 55e0 +Function55e0:: ld a, [wVramState] bit 0, a ret z @@ -2244,7 +2158,6 @@ Function55e0:: ; 55e0 cp NUM_OBJECT_STRUCTS jr nz, .loop ret -; 5602 Function5602: ; 5602, called at battle start call Function5645 ; clear sprites @@ -2260,17 +2173,15 @@ Function5602: ; 5602, called at battle start .ok call _UpdateSprites ret -; 561d -Function561d: ; 561d +Function561d: call Function5645 ; clear sprites ld a, PLAYER call Function5629 ; respawn player call _UpdateSprites ret -; 5629 -Function5629: ; 5629 +Function5629: cp NUM_OBJECTS ret nc call GetMapObject @@ -2286,9 +2197,8 @@ Function5629: ; 5629 ret z call Function5673 ret -; 5645 -Function5645: ; 5645 +Function5645: xor a ld bc, wObjectStructs .loop @@ -2303,9 +2213,8 @@ Function5645: ; 5645 cp NUM_OBJECT_STRUCTS jr nz, .loop ret -; 565c -Function565c: ; 565c +Function565c: push bc call Function56cd pop bc @@ -2316,25 +2225,22 @@ Function565c: ; 565c farcall Function4440 xor a ret -; 5673 -Function5673: ; 5673 +Function5673: call Function56a3 jr c, SetFacing_Standing farcall Function4440 ; no need to farcall xor a ret -; 5680 -SetFacing_Standing: ; 5680 +SetFacing_Standing: ld hl, OBJECT_FACING_STEP add hl, bc ld [hl], STANDING scf ret -; 5688 -Function5688: ; 5688 +Function5688: push bc ld hl, OBJECT_NEXT_MAP_X add hl, bc @@ -2349,9 +2255,8 @@ Function5688: ; 5688 ld [hl], a farcall UpdateTallGrassFlags ; no need to farcall ret -; 56a3 -Function56a3: ; 56a3 +Function56a3: ld hl, OBJECT_NEXT_MAP_X add hl, bc ld d, [hl] @@ -2382,9 +2287,8 @@ Function56a3: ; 56a3 .nope scf ret -; 56cd -Function56cd: ; 56cd +Function56cd: ld a, [wPlayerBGMapOffsetX] ld d, a ld hl, OBJECT_SPRITE_X_OFFSET @@ -2492,9 +2396,8 @@ Function56cd: ; 56cd .nope scf ret -; 576a -HandleNPCStep:: ; 576a +HandleNPCStep:: call .ResetStepVector call .DoStepsForAllObjects ret @@ -2526,9 +2429,8 @@ HandleNPCStep:: ; 576a cp NUM_OBJECT_STRUCTS jr nz, .loop ret -; 579d -RefreshPlayerSprite: ; 579d +RefreshPlayerSprite: ld a, movement_step_sleep ld [wPlayerNextMovement], a ld [wPlayerMovement], a @@ -2540,9 +2442,8 @@ RefreshPlayerSprite: ; 579d call c, SpawnInFacingDown call .SpawnInCustomFacing ret -; 57bc -.TryResetPlayerAction: ; 57bc +.TryResetPlayerAction: ld hl, wPlayerSpriteSetupFlags bit PLAYERSPRITESETUP_RESET_ACTION_F, [hl] jr nz, .ok @@ -2552,9 +2453,8 @@ RefreshPlayerSprite: ; 579d ld a, OBJECT_ACTION_00 ld [wPlayerAction], a ret -; 57ca -.SpawnInCustomFacing: ; 57ca +.SpawnInCustomFacing: ld hl, wPlayerSpriteSetupFlags bit PLAYERSPRITESETUP_CUSTOM_FACING_F, [hl] ret z @@ -2563,17 +2463,15 @@ RefreshPlayerSprite: ; 579d add a add a jr ContinueSpawnFacing -; 57d9 -SpawnInFacingDown: ; 57d9 +SpawnInFacingDown: ld a, 0 -ContinueSpawnFacing: ; 57db +ContinueSpawnFacing: ld bc, wPlayerStruct call SetSpriteDirection ret -; 57e2 -_SetPlayerPalette: ; 57e2 +_SetPlayerPalette: ld a, d and 1 << 7 ret z @@ -2595,9 +2493,8 @@ _SetPlayerPalette: ; 57e2 or d ld [hl], a ret -; 5803 -StartFollow:: ; 5803 +StartFollow:: push bc ld a, b call SetLeaderIfVisible @@ -2607,29 +2504,25 @@ StartFollow:: ; 5803 call SetFollowerIfVisible farcall QueueFollowerFirstStep ret -; 5815 -SetLeaderIfVisible: ; 5815 +SetLeaderIfVisible: call CheckObjectVisibility ret c ld a, [hObjectStructIndexBuffer] ld [wObjectFollow_Leader], a ret -; 581f -StopFollow:: ; 581f +StopFollow:: call ResetLeader call ResetFollower ret -; 5826 -ResetLeader: ; 5826 +ResetLeader: ld a, -1 ld [wObjectFollow_Leader], a ret -; 582c -SetFollowerIfVisible: ; 582c +SetFollowerIfVisible: push af call ResetFollower pop af @@ -2644,9 +2537,8 @@ SetFollowerIfVisible: ; 582c ld a, [hObjectStructIndexBuffer] ld [wObjectFollow_Follower], a ret -; 5847 -ResetFollower: ; 5847 +ResetFollower: ld a, [wObjectFollow_Follower] cp -1 ret z @@ -2655,9 +2547,8 @@ ResetFollower: ; 5847 ld a, -1 ld [wObjectFollow_Follower], a ret -; 585c -SetFlagsForMovement_1:: ; 585c +SetFlagsForMovement_1:: ld a, c call CheckObjectVisibility ret c @@ -2669,9 +2560,8 @@ SetFlagsForMovement_1:: ; 585c res 5, [hl] xor a ret -; 586e -Function586e: ; 586e +Function586e: call CheckObjectVisibility ret c ld hl, OBJECT_FLAGS2 @@ -2679,9 +2569,8 @@ Function586e: ; 586e set 5, [hl] xor a ret -; 587a -Function587a: ; 587a +Function587a: ld bc, wObjectStructs xor a .loop @@ -2701,9 +2590,8 @@ Function587a: ; 587a cp NUM_OBJECT_STRUCTS jr nz, .loop ret -; 5897 -_SetFlagsForMovement_2:: ; 5897 +_SetFlagsForMovement_2:: ld a, [wObjectFollow_Leader] cp -1 ret z @@ -2723,9 +2611,8 @@ _SetFlagsForMovement_2:: ; 5897 add hl, bc res 5, [hl] ret -; 58b9 -Function58b9:: ; 58b9 +Function58b9:: push bc ld bc, wObjectStructs xor a @@ -2747,18 +2634,16 @@ Function58b9:: ; 58b9 jr nz, .loop pop bc ret -; 58d8 -Function58d8: ; 58d8 +Function58d8: call CheckObjectVisibility ret c ld hl, OBJECT_FLAGS2 add hl, bc res 5, [hl] ret -; 58e3 -Function58e3: ; 58e3 +Function58e3: ld hl, OBJECT_MAP_OBJECT_INDEX add hl, bc ld a, [hl] @@ -2777,9 +2662,8 @@ Function58e3: ; 58e3 add hl, bc ld [hl], STEP_TYPE_00 ret -; 5903 -Function5903: ; 5903 +Function5903: call GetSpriteDirection rrca rrca @@ -2801,9 +2685,8 @@ Function5903: ; 5903 db SPRITEMOVEDATA_STANDING_UP db SPRITEMOVEDATA_STANDING_LEFT db SPRITEMOVEDATA_STANDING_RIGHT -; 5920 -_UpdateSprites:: ; 5920 +_UpdateSprites:: ld a, [wVramState] bit 0, a ret z @@ -2840,9 +2723,8 @@ _UpdateSprites:: ; 5920 cp l jr nz, .loop ret -; 5958 -ApplyBGMapAnchorToObjects: ; 5958 +ApplyBGMapAnchorToObjects: push hl push de push bc @@ -2881,14 +2763,13 @@ ApplyBGMapAnchorToObjects: ; 5958 pop de pop hl ret -; 5991 PRIORITY_LOW EQU $10 PRIORITY_NORM EQU $20 PRIORITY_HIGH EQU $30 -InitSprites: ; 5991 +InitSprites: call .DeterminePriorities ld c, PRIORITY_HIGH call .InitSpritesByPriority @@ -3107,7 +2988,7 @@ InitSprites: ; 5991 ld b, [hl] ret -.Addresses: ; 5ace +.Addresses: dw wPlayerStruct dw wObject1Struct dw wObject2Struct @@ -3121,4 +3002,3 @@ InitSprites: ; 5991 dw wObject10Struct dw wObject11Struct dw wObject12Struct -; 5ae8 diff --git a/engine/overworld/map_objects_2.asm b/engine/overworld/map_objects_2.asm index 038e2b49bcb..f055e0fd94c 100644 --- a/engine/overworld/map_objects_2.asm +++ b/engine/overworld/map_objects_2.asm @@ -1,4 +1,4 @@ -LoadObjectMasks: ; 2454f +LoadObjectMasks: ld hl, wObjectMasks xor a ld bc, NUM_OBJECTS @@ -29,7 +29,7 @@ LoadObjectMasks: ; 2454f jr nz, .loop ret -CheckObjectFlag: ; 2457d (9:457d) +CheckObjectFlag: ld hl, MAPOBJECT_SPRITE add hl, bc ld a, [hl] @@ -62,7 +62,7 @@ CheckObjectFlag: ; 2457d (9:457d) scf ret -GetObjectTimeMask: ; 245a7 (9:45a7) +GetObjectTimeMask: call CheckObjectTime ld a, -1 ret c diff --git a/engine/overworld/map_setup.asm b/engine/overworld/map_setup.asm index 268574de0d8..6cdccba711f 100644 --- a/engine/overworld/map_setup.asm +++ b/engine/overworld/map_setup.asm @@ -1,4 +1,4 @@ -RunMapSetupScript:: ; 15363 +RunMapSetupScript:: ld a, [hMapEntryMethod] and $f dec a @@ -12,11 +12,10 @@ RunMapSetupScript:: ; 15363 ld l, a call ReadMapSetupScript ret -; 15377 INCLUDE "data/maps/setup_scripts.asm" -ReadMapSetupScript: ; 1541d +ReadMapSetupScript: .loop ld a, [hli] cp -1 @@ -58,9 +57,8 @@ ReadMapSetupScript: ; 1541d pop hl jr .loop -; 15440 -MapSetupCommands: ; 15440 +MapSetupCommands: ; entries correspond to command indexes in constants/map_setup_constants.asm dba EnableLCD ; 00 dba DisableLCD ; 01 @@ -108,51 +106,44 @@ MapSetupCommands: ; 15440 dba RetainOldPalettes ; 2b dba DontScrollText ; 2c dba ReturnFromMapSetupScript ; 2d -; 154ca -DontScrollText: ; 154ca +DontScrollText: xor a ld [wDisableTextAcceleration], a ret -; 154cf -ActivateMapAnims: ; 154cf +ActivateMapAnims: ld a, $1 ld [hMapAnims], a ret -; 154d3 -SuspendMapAnims: ; 154d3 +SuspendMapAnims: xor a ld [hMapAnims], a ret -; 154d7 -LoadObjectsRunCallback_02: ; 154d7 +LoadObjectsRunCallback_02: ld a, MAPCALLBACK_OBJECTS call RunMapCallback farcall LoadObjectMasks farcall InitializeVisibleSprites ret -; 154ea (5:54ea) ; unused ret -; 154eb -DelayClearingOldSprites: ; 154eb +DelayClearingOldSprites: ld hl, wPlayerSpriteSetupFlags set PLAYERSPRITESETUP_RESET_ACTION_F, [hl] ret -; 154f1 -DelayLoadingNewSprites: ; 154f1 +DelayLoadingNewSprites: ld hl, wPlayerSpriteSetupFlags set PLAYERSPRITESETUP_SKIP_RELOAD_GFX_F, [hl] ret -CheckReplaceKrisSprite: ; 154f7 +CheckReplaceKrisSprite: nop call .CheckBiking jr c, .ok @@ -166,7 +157,7 @@ CheckReplaceKrisSprite: ; 154f7 call ReplaceKrisSprite ret -.CheckBiking: ; 1550c (5:550c) +.CheckBiking: and a ld hl, wBikeFlags bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl] @@ -176,7 +167,7 @@ CheckReplaceKrisSprite: ; 154f7 scf ret -.CheckSurfing2: ; 1551a (5:551a) +.CheckSurfing2: ld a, [wPlayerState] cp PLAYER_NORMAL jr z, .nope @@ -208,7 +199,7 @@ CheckReplaceKrisSprite: ; 154f7 and a ret -.CheckSurfing: ; 1554e (5:554e) +.CheckSurfing: call CheckOnWater jr nz, .ret_nc ld a, [wPlayerState] @@ -224,19 +215,17 @@ CheckReplaceKrisSprite: ; 154f7 .ret_nc and a ret -; 15567 -FadeOldMapMusic: ; 15567 +FadeOldMapMusic: ld a, 6 call SkipMusic ret -; 1556d -RetainOldPalettes: ; 1556d +RetainOldPalettes: farcall _UpdateTimePals ret -RotatePalettesRightMapAndMusic: ; 15574 +RotatePalettesRightMapAndMusic: ld e, 0 ld a, [wMusicFadeID] ld d, 0 @@ -245,9 +234,8 @@ RotatePalettesRightMapAndMusic: ; 15574 ld [wMusicFade], a call RotateThreePalettesRight ret -; 15587 -ForceMapMusic: ; 15587 +ForceMapMusic: ld a, [wPlayerState] cp PLAYER_BIKE jr nz, .notbiking @@ -257,4 +245,3 @@ ForceMapMusic: ; 15587 .notbiking call TryRestartMapMusic ret -; 1559a diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm index fcb8d55fba9..fac0b4ae85b 100644 --- a/engine/overworld/movement.asm +++ b/engine/overworld/movement.asm @@ -1,4 +1,4 @@ -MovementPointers: ; 5075 +MovementPointers: ; entries correspond to macros/scripts/movement.asm enumeration dw Movement_turn_head_down ; 00 dw Movement_turn_head_up ; 01 @@ -90,38 +90,33 @@ MovementPointers: ; 5075 dw Movement_rock_smash ; 57 dw Movement_return_dig ; 58 dw Movement_skyfall_top ; 59 -; 5129 -Movement_teleport_from: ; 5129 +Movement_teleport_from: ld hl, OBJECT_STEP_TYPE add hl, bc ld [hl], STEP_TYPE_TELEPORT_FROM ret -; 5130 -Movement_teleport_to: ; 5130 +Movement_teleport_to: ld hl, OBJECT_STEP_TYPE add hl, bc ld [hl], STEP_TYPE_TELEPORT_TO ret -; 5137 -Movement_skyfall: ; 5137 +Movement_skyfall: ld hl, OBJECT_STEP_TYPE add hl, bc ld [hl], STEP_TYPE_SKYFALL ret -; 513e -Movement_skyfall_top: ; 513e +Movement_skyfall_top: ld hl, OBJECT_STEP_TYPE add hl, bc ld [hl], STEP_TYPE_SKYFALL_TOP ret -; 5145 -Movement_step_dig: ; 5145 +Movement_step_dig: call GetSpriteDirection rlca rlca @@ -142,9 +137,8 @@ Movement_step_dig: ; 5145 add hl, bc ld [hl], STANDING ret -; 516a -Movement_return_dig: ; 516a +Movement_return_dig: call GetSpriteDirection rlca rlca @@ -162,9 +156,8 @@ Movement_return_dig: ; 516a add hl, bc ld [hl], STEP_TYPE_RETURN_DIG ret -; 5189 -Movement_fish_got_bite: ; 5189 +Movement_fish_got_bite: ld hl, OBJECT_ACTION add hl, bc ld [hl], OBJECT_ACTION_FISHING @@ -172,9 +165,8 @@ Movement_fish_got_bite: ; 5189 add hl, bc ld [hl], STEP_TYPE_GOT_BITE ret -; 5196 -Movement_rock_smash: ; 5196 +Movement_rock_smash: call JumpMovementPointer ld hl, OBJECT_STEP_DURATION add hl, bc @@ -186,9 +178,8 @@ Movement_rock_smash: ; 5196 add hl, bc ld [hl], STEP_TYPE_ROCK_SMASH ret -; 51ab -Movement_fish_cast_rod: ; 51ab +Movement_fish_cast_rod: ld hl, OBJECT_ACTION add hl, bc ld [hl], OBJECT_ACTION_FISHING @@ -196,16 +187,14 @@ Movement_fish_cast_rod: ; 51ab add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 51b8 -Movement_step_loop: ; 51b8 +Movement_step_loop: ld hl, OBJECT_MOVEMENT_BYTE_INDEX add hl, bc ld [hl], $0 jp ContinueReadingMovement -; 51c1 -Movement_step_end: ; 51c1 +Movement_step_end: call RestoreDefaultMovement ld hl, OBJECT_MOVEMENTTYPE add hl, bc @@ -222,9 +211,8 @@ Movement_step_end: ; 51c1 add hl, bc ld [hl], STEP_TYPE_SLEEP ret -; 51db -Movement_48: ; 51db +Movement_48: call RestoreDefaultMovement ld hl, OBJECT_MOVEMENTTYPE add hl, bc @@ -246,9 +234,8 @@ Movement_48: ; 51db ld hl, wVramState res 7, [hl] ret -; 51fd -Movement_remove_object: ; 51fd +Movement_remove_object: call DeleteMapObject ld hl, wObjectFollow_Leader ld a, [hMapObjectIndexBuffer] @@ -260,9 +247,8 @@ Movement_remove_object: ; 51fd ld hl, wVramState res 7, [hl] ret -; 5210 -Movement_4b: ; 5210 +Movement_4b: ld hl, OBJECT_ACTION add hl, bc ld [hl], OBJECT_ACTION_STAND @@ -274,48 +260,47 @@ Movement_4b: ; 5210 ld hl, wVramState res 7, [hl] ret -; 5222 -Movement_step_sleep_1: ; 5222 +Movement_step_sleep_1: ld a, 1 jr Movement_step_sleep_common -Movement_step_sleep_2: ; 5226 +Movement_step_sleep_2: ld a, 2 jr Movement_step_sleep_common -Movement_step_sleep_3: ; 522a +Movement_step_sleep_3: ld a, 3 jr Movement_step_sleep_common -Movement_step_sleep_4: ; 522e +Movement_step_sleep_4: ld a, 4 jr Movement_step_sleep_common -Movement_step_sleep_5: ; 5232 +Movement_step_sleep_5: ld a, 5 jr Movement_step_sleep_common -Movement_step_sleep_6: ; 5236 +Movement_step_sleep_6: ld a, 6 jr Movement_step_sleep_common -Movement_step_sleep_7: ; 523a +Movement_step_sleep_7: ld a, 7 jr Movement_step_sleep_common -Movement_step_sleep_8: ; 523e +Movement_step_sleep_8: ld a, 8 jr Movement_step_sleep_common -Movement_step_sleep: ; 5242 +Movement_step_sleep: ; parameters: ; duration (DecimalParam) call JumpMovementPointer jr Movement_step_sleep_common -Movement_step_sleep_common: ; 5247 +Movement_step_sleep_common: ld hl, OBJECT_STEP_DURATION add hl, bc ld [hl], a @@ -332,9 +317,8 @@ Movement_step_sleep_common: ; 5247 add hl, bc ld [hl], STANDING ret -; 525f -Movement_step_bump: ; 525f +Movement_step_bump: ld a, 1 ld hl, OBJECT_STEP_DURATION add hl, bc @@ -352,9 +336,8 @@ Movement_step_bump: ; 525f add hl, bc ld [hl], STANDING ret -; 5279 -Movement_tree_shake: ; 5279 +Movement_tree_shake: ld a, 24 ld hl, OBJECT_STEP_DURATION add hl, bc @@ -372,86 +355,76 @@ Movement_tree_shake: ; 5279 add hl, bc ld [hl], STANDING ret -; 5293 -Movement_remove_sliding: ; 5293 +Movement_remove_sliding: ld hl, OBJECT_FLAGS1 add hl, bc res SLIDING_F, [hl] jp ContinueReadingMovement -; 529c -Movement_set_sliding: ; 529c +Movement_set_sliding: ld hl, OBJECT_FLAGS1 add hl, bc set SLIDING_F, [hl] jp ContinueReadingMovement -; 52a5 -Movement_remove_fixed_facing: ; 52a5 +Movement_remove_fixed_facing: ld hl, OBJECT_FLAGS1 add hl, bc res FIXED_FACING_F, [hl] jp ContinueReadingMovement -; 52ae -Movement_fix_facing: ; 52ae +Movement_fix_facing: ld hl, OBJECT_FLAGS1 add hl, bc set FIXED_FACING_F, [hl] jp ContinueReadingMovement -; 52b7 -Movement_show_object: ; 52b7 +Movement_show_object: ld hl, OBJECT_FLAGS1 add hl, bc res INVISIBLE_F, [hl] jp ContinueReadingMovement -; 52c0 -Movement_hide_object: ; 52c0 +Movement_hide_object: ld hl, OBJECT_FLAGS1 add hl, bc set INVISIBLE_F, [hl] jp ContinueReadingMovement -; 52c9 -Movement_hide_emote: ; 52c9 +Movement_hide_emote: call DespawnEmote jp ContinueReadingMovement -; 52cf -Movement_show_emote: ; 52cf +Movement_show_emote: call SpawnEmote jp ContinueReadingMovement -; 52d5 -Movement_step_shake: ; 52d5 +Movement_step_shake: ; parameters: ; displacement (DecimalParam) call JumpMovementPointer call ShakeScreen jp ContinueReadingMovement -; 52de -Movement_turn_head_down: ; 52de +Movement_turn_head_down: ld a, OW_DOWN jr TurnHead -Movement_turn_head_up: ; 52e2 +Movement_turn_head_up: ld a, OW_UP jr TurnHead -Movement_turn_head_left: ; 52e6 +Movement_turn_head_left: ld a, OW_LEFT jr TurnHead -Movement_turn_head_right: ; 52ea +Movement_turn_head_right: ld a, OW_RIGHT jr TurnHead -TurnHead: ; 52ee +TurnHead: ld hl, OBJECT_FACING add hl, bc ld [hl], a @@ -464,269 +437,220 @@ TurnHead: ; 52ee add hl, bc ld [hl], STANDING ret -; 5300 -Movement_slow_step_down: ; 5300 +Movement_slow_step_down: ld a, STEP_SLOW << 2 | DOWN jp NormalStep -; 5305 -Movement_slow_step_up: ; 5305 +Movement_slow_step_up: ld a, STEP_SLOW << 2 | UP jp NormalStep -; 530a -Movement_slow_step_left: ; 530a +Movement_slow_step_left: ld a, STEP_SLOW << 2 | LEFT jp NormalStep -; 530f -Movement_slow_step_right: ; 530f +Movement_slow_step_right: ld a, STEP_SLOW << 2 | RIGHT jp NormalStep -; 5314 -Movement_step_down: ; 5314 +Movement_step_down: ld a, STEP_WALK << 2 | DOWN jp NormalStep -; 5319 -Movement_step_up: ; 5319 +Movement_step_up: ld a, STEP_WALK << 2 | UP jp NormalStep -; 531e -Movement_step_left: ; 531e +Movement_step_left: ld a, STEP_WALK << 2 | LEFT jp NormalStep -; 5323 -Movement_step_right: ; 5323 +Movement_step_right: ld a, STEP_WALK << 2 | RIGHT jp NormalStep -; 5328 -Movement_big_step_down: ; 5328 +Movement_big_step_down: ld a, STEP_BIKE << 2 | DOWN jp NormalStep -; 532d -Movement_big_step_up: ; 532d +Movement_big_step_up: ld a, STEP_BIKE << 2 | UP jp NormalStep -; 5332 -Movement_big_step_left: ; 5332 +Movement_big_step_left: ld a, STEP_BIKE << 2 | LEFT jp NormalStep -; 5337 -Movement_big_step_right: ; 5337 +Movement_big_step_right: ld a, STEP_BIKE << 2 | RIGHT jp NormalStep -; 533c -Movement_turn_away_down: ; 533c +Movement_turn_away_down: ld a, STEP_SLOW << 2 | DOWN jp TurningStep -; 5341 -Movement_turn_away_up: ; 5341 +Movement_turn_away_up: ld a, STEP_SLOW << 2 | UP jp TurningStep -; 5346 -Movement_turn_away_left: ; 5346 +Movement_turn_away_left: ld a, STEP_SLOW << 2 | LEFT jp TurningStep -; 534b -Movement_turn_away_right: ; 534b +Movement_turn_away_right: ld a, STEP_SLOW << 2 | RIGHT jp TurningStep -; 5350 -Movement_turn_in_down: ; 5350 +Movement_turn_in_down: ld a, STEP_WALK << 2 | DOWN jp TurningStep -; 5355 -Movement_turn_in_up: ; 5355 +Movement_turn_in_up: ld a, STEP_WALK << 2 | UP jp TurningStep -; 535a -Movement_turn_in_left: ; 535a +Movement_turn_in_left: ld a, STEP_WALK << 2 | LEFT jp TurningStep -; 535f -Movement_turn_in_right: ; 535f +Movement_turn_in_right: ld a, STEP_WALK << 2 | RIGHT jp TurningStep -; 5364 -Movement_turn_waterfall_down: ; 5364 +Movement_turn_waterfall_down: ld a, STEP_BIKE << 2 | DOWN jp TurningStep -; 5369 -Movement_turn_waterfall_up: ; 5369 +Movement_turn_waterfall_up: ld a, STEP_BIKE << 2 | UP jp TurningStep -; 536e -Movement_turn_waterfall_left: ; 536e +Movement_turn_waterfall_left: ld a, STEP_BIKE << 2 | LEFT jp TurningStep -; 5373 -Movement_turn_waterfall_right: ; 5373 +Movement_turn_waterfall_right: ld a, STEP_BIKE << 2 | RIGHT jp TurningStep -; 5378 -Movement_slow_slide_step_down: ; 5378 +Movement_slow_slide_step_down: ld a, STEP_SLOW << 2 | DOWN jp SlideStep -; 537d -Movement_slow_slide_step_up: ; 537d +Movement_slow_slide_step_up: ld a, STEP_SLOW << 2 | UP jp SlideStep -; 5382 -Movement_slow_slide_step_left: ; 5382 +Movement_slow_slide_step_left: ld a, STEP_SLOW << 2 | LEFT jp SlideStep -; 5387 -Movement_slow_slide_step_right: ; 5387 +Movement_slow_slide_step_right: ld a, STEP_SLOW << 2 | RIGHT jp SlideStep -; 538c -Movement_slide_step_down: ; 538c +Movement_slide_step_down: ld a, STEP_WALK << 2 | DOWN jp SlideStep -; 5391 -Movement_slide_step_up: ; 5391 +Movement_slide_step_up: ld a, STEP_WALK << 2 | UP jp SlideStep -; 5396 -Movement_slide_step_left: ; 5396 +Movement_slide_step_left: ld a, STEP_WALK << 2 | LEFT jp SlideStep -; 539b -Movement_slide_step_right: ; 539b +Movement_slide_step_right: ld a, STEP_WALK << 2 | RIGHT jp SlideStep -; 53a0 -Movement_fast_slide_step_down: ; 53a0 +Movement_fast_slide_step_down: ld a, STEP_BIKE << 2 | DOWN jp SlideStep -; 53a5 -Movement_fast_slide_step_up: ; 53a5 +Movement_fast_slide_step_up: ld a, STEP_BIKE << 2 | UP jp SlideStep -; 53aa -Movement_fast_slide_step_left: ; 53aa +Movement_fast_slide_step_left: ld a, STEP_BIKE << 2 | LEFT jp SlideStep -; 53af -Movement_fast_slide_step_right: ; 53af +Movement_fast_slide_step_right: ld a, STEP_BIKE << 2 | RIGHT jp SlideStep -; 53b4 -Movement_slow_jump_step_down: ; 53b4 +Movement_slow_jump_step_down: ld a, STEP_SLOW << 2 | DOWN jp JumpStep -; 53b9 -Movement_slow_jump_step_up: ; 53b9 +Movement_slow_jump_step_up: ld a, STEP_SLOW << 2 | UP jp JumpStep -; 53be -Movement_slow_jump_step_left: ; 53be +Movement_slow_jump_step_left: ld a, STEP_SLOW << 2 | LEFT jp JumpStep -; 53c3 -Movement_slow_jump_step_right: ; 53c3 +Movement_slow_jump_step_right: ld a, STEP_SLOW << 2 | RIGHT jp JumpStep -; 53c8 -Movement_jump_step_down: ; 53c8 +Movement_jump_step_down: ld a, STEP_WALK << 2 | DOWN jp JumpStep -; 53cd -Movement_jump_step_up: ; 53cd +Movement_jump_step_up: ld a, STEP_WALK << 2 | UP jp JumpStep -; 53d2 -Movement_jump_step_left: ; 53d2 +Movement_jump_step_left: ld a, STEP_WALK << 2 | LEFT jp JumpStep -; 53d7 -Movement_jump_step_right: ; 53d7 +Movement_jump_step_right: ld a, STEP_WALK << 2 | RIGHT jp JumpStep -; 53dc -Movement_fast_jump_step_down: ; 53dc +Movement_fast_jump_step_down: ld a, STEP_BIKE << 2 | DOWN jp JumpStep -; 53e1 -Movement_fast_jump_step_up: ; 53e1 +Movement_fast_jump_step_up: ld a, STEP_BIKE << 2 | UP jp JumpStep -; 53e6 -Movement_fast_jump_step_left: ; 53e6 +Movement_fast_jump_step_left: ld a, STEP_BIKE << 2 | LEFT jp JumpStep -; 53eb -Movement_fast_jump_step_right: ; 53eb +Movement_fast_jump_step_right: ld a, STEP_BIKE << 2 | RIGHT jp JumpStep -; 53f0 -Movement_turn_step_down: ; 53f0 +Movement_turn_step_down: ld a, OW_DOWN jr TurnStep -Movement_turn_step_up: ; 53f4 +Movement_turn_step_up: ld a, OW_UP jr TurnStep -Movement_turn_step_left: ; 53f8 +Movement_turn_step_left: ld a, OW_LEFT jr TurnStep -Movement_turn_step_right: ; 53fc +Movement_turn_step_right: ld a, OW_RIGHT jr TurnStep -TurnStep: ; 5400 +TurnStep: ld hl, OBJECT_1D ; new facing add hl, bc ld [hl], a @@ -739,9 +663,8 @@ TurnStep: ; 5400 add hl, bc ld [hl], STEP_TYPE_HALF_STEP ret -; 5412 -NormalStep: ; 5412 +NormalStep: call InitStep call UpdateTallGrassFlags ld hl, OBJECT_ACTION @@ -776,9 +699,8 @@ NormalStep: ; 5412 add hl, bc ld [hl], STEP_TYPE_PLAYER_WALK ret -; 5446 -TurningStep: ; 5446 +TurningStep: call InitStep call UpdateTallGrassFlags @@ -801,10 +723,9 @@ TurningStep: ; 5446 add hl, bc ld [hl], STEP_TYPE_PLAYER_WALK ret -; 5468 -SlideStep: ; 5468 +SlideStep: call InitStep call UpdateTallGrassFlags @@ -827,10 +748,9 @@ SlideStep: ; 5468 add hl, bc ld [hl], STEP_TYPE_PLAYER_WALK ret -; 548a -JumpStep: ; 548a +JumpStep: call InitStep ld hl, OBJECT_1F add hl, bc @@ -861,4 +781,3 @@ JumpStep: ; 548a add hl, bc ld [hl], STEP_TYPE_PLAYER_JUMP ret -; 54b8 diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm index 40ced1a5f72..07881a788e5 100644 --- a/engine/overworld/npc_movement.asm +++ b/engine/overworld/npc_movement.asm @@ -1,4 +1,4 @@ -CanObjectMoveInDirection: ; 6ec1 +CanObjectMoveInDirection: ld hl, OBJECT_PALETTE add hl, bc @@ -57,10 +57,9 @@ CanObjectMoveInDirection: ; 6ec1 .move_anywhere and a ret -; 6f07 -WillObjectBumpIntoWater: ; 6f07 +WillObjectBumpIntoWater: call Function6f5f ret c ld hl, OBJECT_NEXT_MAP_X @@ -82,9 +81,8 @@ WillObjectBumpIntoWater: ; 6f07 jr z, WillObjectBumpIntoTile scf ret -; 6f2c -WillObjectBumpIntoLand: ; 6f2c +WillObjectBumpIntoLand: call Function6f5f ret c ld hl, OBJECT_NEXT_TILE @@ -95,9 +93,8 @@ WillObjectBumpIntoLand: ; 6f2c jr z, WillObjectBumpIntoTile scf ret -; 6f3e -WillObjectBumpIntoTile: ; 6f3e +WillObjectBumpIntoTile: ld hl, OBJECT_NEXT_TILE add hl, bc ld a, [hl] @@ -117,13 +114,11 @@ WillObjectBumpIntoTile: ; 6f3e ret z scf ret -; 6f5b .data_6f5b db DOWN_MASK, UP_MASK, RIGHT_MASK, LEFT_MASK -; 6f5f -Function6f5f: ; 6f5f +Function6f5f: ld hl, OBJECT_STANDING_TILE add hl, bc ld a, [hl] @@ -142,13 +137,11 @@ Function6f5f: ; 6f5f ret z scf ret -; 6f7b .data_6f7b db UP_MASK, DOWN_MASK, LEFT_MASK, RIGHT_MASK -; 6f7f -Function6f7f: ; 6f7f +Function6f7f: ld d, a and $f0 cp $b0 @@ -168,14 +161,12 @@ Function6f7f: ; 6f7f ld a, [hl] scf ret -; 6f99 .data_6f99 db 8, 4, 1, 2 db 10, 6, 9, 5 -; 6fa1 -Function6fa1: ; 6fa1 +Function6fa1: ld hl, OBJECT_DIRECTION_WALKING add hl, bc ld a, [hl] @@ -224,11 +215,10 @@ Function6fa1: ; 6fa1 .not_land scf ret -; 6fd9 -CheckFacingObject:: ; 6fd9 +CheckFacingObject:: call GetFacingTileCoord @@ -267,10 +257,9 @@ CheckFacingObject:: ; 6fd9 .standing scf ret -; 7009 -WillObjectBumpIntoSomeoneElse: ; 7009 +WillObjectBumpIntoSomeoneElse: ld hl, OBJECT_NEXT_MAP_X add hl, bc ld d, [hl] @@ -278,7 +267,6 @@ WillObjectBumpIntoSomeoneElse: ; 7009 add hl, bc ld e, [hl] jr IsNPCAtCoord -; 7015 Unreferenced_Function7015: ld a, [hMapObjectIndexBuffer] @@ -287,7 +275,7 @@ Unreferenced_Function7015: call IsNPCAtCoord ret -.CheckWillBeFacingNPC: ; 7021 +.CheckWillBeFacingNPC: ld hl, OBJECT_NEXT_MAP_X add hl, bc ld d, [hl] @@ -315,9 +303,8 @@ Unreferenced_Function7015: .left dec d ret -; 7041 -IsNPCAtCoord: ; 7041 +IsNPCAtCoord: ld bc, wObjectStructs xor a .loop @@ -390,9 +377,8 @@ IsNPCAtCoord: ; 7041 .setcarry scf ret -; 70a4 -HasObjectReachedMovementLimit: ; 70a4 +HasObjectReachedMovementLimit: ld hl, OBJECT_RADIUS add hl, bc ld a, [hl] @@ -450,9 +436,8 @@ HasObjectReachedMovementLimit: ; 70a4 .yes scf ret -; 70ed -IsObjectMovingOffEdgeOfScreen: ; 70ed +IsObjectMovingOffEdgeOfScreen: ld hl, OBJECT_NEXT_MAP_X add hl, bc ld a, [wXCoord] @@ -481,7 +466,6 @@ IsObjectMovingOffEdgeOfScreen: ; 70ed .yes scf ret -; 7113 Unreferenced_Function7113: ld a, [wPlayerStandingMapX] @@ -547,10 +531,9 @@ Unreferenced_Function7113: .yes scf ret -; 7171 -Function7171: ; 7171 +Function7171: ld hl, OBJECT_NEXT_MAP_X add hl, bc ld a, d @@ -571,4 +554,3 @@ Function7171: ; 7171 .nope and a ret -; 718d diff --git a/engine/overworld/overworld.asm b/engine/overworld/overworld.asm index 381c2d89fec..35a79292151 100644 --- a/engine/overworld/overworld.asm +++ b/engine/overworld/overworld.asm @@ -1,13 +1,12 @@ -GetEmote2bpp: ; 1412a +GetEmote2bpp: ld a, $1 ld [rVBK], a call Get2bpp xor a ld [rVBK], a ret -; 14135 -_ReplaceKrisSprite:: ; 14135 +_ReplaceKrisSprite:: call GetPlayerSprite ld a, [wUsedSprites] ld [hUsedSpriteIndex], a @@ -15,7 +14,6 @@ _ReplaceKrisSprite:: ; 14135 ld [hUsedSpriteTile], a call GetUsedSprite ret -; 14146 Function14146: ; mobile ld hl, wSpriteFlags @@ -27,7 +25,6 @@ Function14146: ; mobile pop af ld [wSpriteFlags], a ret -; 14157 Function14157: ; mobile ld hl, wSpriteFlags @@ -39,15 +36,13 @@ Function14157: ; mobile pop af ld [wSpriteFlags], a ret -; 14168 -RefreshSprites:: ; 14168 +RefreshSprites:: call .Refresh call LoadUsedSpritesGFX ret -; 1416f -.Refresh: ; 1416f +.Refresh: xor a ld bc, wUsedSpritesEnd - wUsedSprites ld hl, wUsedSprites @@ -56,9 +51,8 @@ RefreshSprites:: ; 14168 call AddMapSprites call LoadAndSortSprites ret -; 14183 -GetPlayerSprite: ; 14183 +GetPlayerSprite: ; Get Chris or Kris's sprite. ld hl, ChrisStateSprites ld a, [wPlayerSpriteSetupFlags] @@ -98,7 +92,7 @@ GetPlayerSprite: ; 14183 INCLUDE "data/sprites/player_sprites.asm" -AddMapSprites: ; 141c9 +AddMapSprites: call GetMapEnvironment call CheckOutdoorMap jr z, .outdoor @@ -108,10 +102,9 @@ AddMapSprites: ; 141c9 .outdoor call AddOutdoorSprites ret -; 141d9 -AddIndoorSprites: ; 141d9 +AddIndoorSprites: ld hl, wMap1ObjectSprite ld a, 1 .loop @@ -125,10 +118,9 @@ AddIndoorSprites: ; 141d9 cp NUM_OBJECTS jr nz, .loop ret -; 141ee -AddOutdoorSprites: ; 141ee +AddOutdoorSprites: ld a, [wMapGroup] dec a ld c, a @@ -148,18 +140,16 @@ AddOutdoorSprites: ; 141ee dec c jr nz, .loop ret -; 14209 -LoadUsedSpritesGFX: ; 14209 +LoadUsedSpritesGFX: ld a, MAPCALLBACK_SPRITES call RunMapCallback call GetUsedSprites call .LoadMiscTiles ret -; 14215 -.LoadMiscTiles: ; 14215 +.LoadMiscTiles: ld a, [wSpriteFlags] bit 6, a ret nz @@ -174,18 +164,16 @@ LoadUsedSpritesGFX: ; 14209 .outdoor farcall LoadEmote ret -; 14236 -SafeGetSprite: ; 14236 +SafeGetSprite: push hl call GetSprite pop hl ret -; 1423c -GetSprite: ; 1423c +GetSprite: call GetMonSprite ret c @@ -211,10 +199,9 @@ GetSprite: ; 1423c ld l, [hl] ld h, a ret -; 14259 -GetMonSprite: ; 14259 +GetMonSprite: ; Return carry if a monster sprite was loaded. cp SPRITE_POKEMON @@ -275,10 +262,9 @@ GetMonSprite: ; 14259 ld h, 0 and a ret -; 142a7 -_DoesSpriteHaveFacings:: ; 142a7 +_DoesSpriteHaveFacings:: ; Checks to see whether we can apply a facing to a sprite. ; Returns carry unless the sprite is a Pokemon or a Still Sprite. cp SPRITE_POKEMON @@ -303,10 +289,9 @@ _DoesSpriteHaveFacings:: ; 142a7 .only_down and a ret -; 142c4 -_GetSpritePalette:: ; 142c4 +_GetSpritePalette:: ld a, c call GetMonSprite jr c, .is_pokemon @@ -324,18 +309,16 @@ _GetSpritePalette:: ; 142c4 xor a ld c, a ret -; 142db -LoadAndSortSprites: ; 142db +LoadAndSortSprites: call LoadSpriteGFX call SortUsedSprites call ArrangeUsedSprites ret -; 142e5 -AddSpriteGFX: ; 142e5 +AddSpriteGFX: ; Add any new sprite ids to a list of graphics to be loaded. ; Return carry if the list is full. @@ -372,10 +355,9 @@ AddSpriteGFX: ; 142e5 pop hl and a ret -; 14306 -LoadSpriteGFX: ; 14306 +LoadSpriteGFX: ; Bug: b is not preserved, so it's useless as a next count. ; Uncomment the lines below to fix. @@ -401,10 +383,9 @@ LoadSpriteGFX: ; 14306 ; pop bc ld a, l ret -; 1431e -SortUsedSprites: ; 1431e +SortUsedSprites: ; Bubble-sort sprites by type. ; Run backwards through wUsedSprites to find the last one. @@ -473,10 +454,9 @@ SortUsedSprites: ; 1431e .quit ret -; 14355 -ArrangeUsedSprites: ; 14355 +ArrangeUsedSprites: ; Get the length of each sprite and space them out in VRAM. ; Crystal introduces a second table in VRAM bank 0. @@ -533,10 +513,9 @@ ArrangeUsedSprites: ; 14355 .quit ret -; 14386 -GetSpriteLength: ; 14386 +GetSpriteLength: ; Return the length of sprite type a in tiles. cp WALKING_SPRITE @@ -556,10 +535,9 @@ GetSpriteLength: ; 14386 .OneDirection: ld a, 4 ret -; 1439b -GetUsedSprites: ; 1439b +GetUsedSprites: ld hl, wUsedSprites ld c, SPRITE_GFX_LIST_CAPACITY @@ -594,9 +572,8 @@ GetUsedSprites: ; 1439b .done ret -; 143c8 -GetUsedSprite: ; 143c8 +GetUsedSprite: ld a, [hUsedSpriteIndex] call SafeGetSprite ld a, [hUsedSpriteTile] @@ -639,9 +616,8 @@ endr .done ret -; 14406 -.GetTileAddr: ; 14406 +.GetTileAddr: ; Return the address of tile (a) in (hl). and $7f ld l, a @@ -656,9 +632,8 @@ endr adc HIGH(vTiles0) ld h, a ret -; 14418 -.CopyToVram: ; 14418 +.CopyToVram: ld a, [rVBK] push af ld a, [wSpriteFlags] @@ -673,9 +648,8 @@ endr pop af ld [rVBK], a ret -; 1442f -LoadEmote:: ; 1442f +LoadEmote:: ; Get the address of the pointer to emote c. ld a, c ld bc, 6 ; sizeof(emote) @@ -703,7 +677,6 @@ LoadEmote:: ; 1442f ret z call GetEmote2bpp ret -; 1444d INCLUDE "data/sprites/emotes.asm" diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm index f8bbe49524c..0a2674341e4 100644 --- a/engine/overworld/player_movement.asm +++ b/engine/overworld/player_movement.asm @@ -1,4 +1,4 @@ -DoPlayerMovement:: ; 80000 +DoPlayerMovement:: call .GetDPad ld a, movement_step_sleep @@ -30,7 +30,6 @@ DoPlayerMovement:: ; 80000 or D_DOWN ld [wCurInput], a ret -; 8002d .TranslateIntoMovement: ld a, [wPlayerState] @@ -112,9 +111,8 @@ DoPlayerMovement:: ; 80000 call .StandInPlace xor a ret -; 800b7 -.CheckTile: ; 800b7 +.CheckTile: ; Tiles such as waterfalls and warps move the player ; in a given direction, overriding input. @@ -227,9 +225,8 @@ DoPlayerMovement:: ; 80000 ld a, 5 scf ret -; 80147 -.CheckTurning: ; 80147 +.CheckTurning: ; If the player is turning, change direction first. This also lets ; the player change facing without moving by tapping a direction. @@ -257,9 +254,8 @@ DoPlayerMovement:: ; 80000 .not_turning xor a ret -; 8016b -.TryStep: ; 8016b +.TryStep: ; Surfing actually calls .TrySurf directly instead of passing through here. ld a, [wPlayerState] @@ -323,9 +319,8 @@ DoPlayerMovement:: ; 80000 .bump xor a ret -; 801c0 -.TrySurf: ; 801c0 +.TrySurf: call .CheckSurfPerms ld [wd040], a @@ -359,9 +354,8 @@ DoPlayerMovement:: ; 80000 .surf_bump xor a ret -; 801f3 -.TryJump: ; 801f3 +.TryJump: ld a, [wPlayerStandingTile] ld e, a and $f0 @@ -399,9 +393,8 @@ DoPlayerMovement:: ; 80000 db FACE_DOWN | FACE_LEFT ; COLL_HOP_DOWN_LEFT db FACE_UP | FACE_RIGHT ; COLL_HOP_UP_RIGHT db FACE_UP | FACE_LEFT ; COLL_HOP_UP_LEFT -; 80226 -.CheckWarp: ; 80226 +.CheckWarp: ; Bug: Since no case is made for STANDING here, it will check ; [.edgewarps + $ff]. This resolves to $3e at $8035a. @@ -450,7 +443,6 @@ DoPlayerMovement:: ; 80000 db COLL_WARP_CARPET_UP db COLL_WARP_CARPET_LEFT db COLL_WARP_CARPET_RIGHT -; 8025f .DoStep: ld e, a @@ -529,27 +521,24 @@ DoPlayerMovement:: ; 80000 db $80 + UP db $80 + LEFT db $80 + RIGHT -; 802b3 -.StandInPlace: ; 802b3 +.StandInPlace: ld a, 0 ld [wPlayerTurningDirection], a ld a, movement_step_sleep ld [wMovementAnimation], a xor a ret -; 802bf -._WalkInPlace: ; 802bf +._WalkInPlace: ld a, 0 ld [wPlayerTurningDirection], a ld a, movement_step_bump ld [wMovementAnimation], a xor a ret -; 802cb -.CheckForced: ; 802cb +.CheckForced: ; When sliding on ice, input is forced to remain in the same direction. call CheckStandingOnIce @@ -572,9 +561,8 @@ DoPlayerMovement:: ; 80000 .forced_dpad db D_DOWN, D_UP, D_LEFT, D_RIGHT -; 802ec -.GetAction: ; 802ec +.GetAction: ; Poll player input and update movement info. ld hl, .table @@ -631,9 +619,8 @@ DoPlayerMovement:: ; 80000 dw wTileUp db DOWN, FACE_DOWN, 0, 1 dw wTileDown -; 80341 -.CheckNPC: ; 80341 +.CheckNPC: ; Returns 0 if there is an NPC in front that you can't move ; Returns 1 if there is no NPC in front ; Returns 2 if there is a movable NPC in front @@ -668,9 +655,8 @@ DoPlayerMovement:: ; 80000 .no_bump ld a, 2 ret -; 8036f -.CheckStrengthBoulder: ; 8036f +.CheckStrengthBoulder: ld hl, wBikeFlags bit BIKEFLAGS_STRENGTH_ACTIVE_F, [hl] @@ -706,9 +692,8 @@ DoPlayerMovement:: ; 80000 .not_boulder xor a ret -; 8039e -.CheckLandPerms: ; 8039e +.CheckLandPerms: ; Return 0 if walking onto land and tile permissions allow it. ; Otherwise, return carry. @@ -728,9 +713,8 @@ DoPlayerMovement:: ; 80000 .NotWalkable: scf ret -; 803b4 -.CheckSurfPerms: ; 803b4 +.CheckSurfPerms: ; Return 0 if moving in water, or 1 if moving onto land. ; Otherwise, return carry. @@ -750,17 +734,15 @@ DoPlayerMovement:: ; 80000 .NotSurfable: scf ret -; 803ca -.BikeCheck: ; 803ca +.BikeCheck: ld a, [wPlayerState] cp PLAYER_BIKE ret z cp PLAYER_SKATE ret -; 803d3 -.CheckWalkable: ; 803d3 +.CheckWalkable: ; Return 0 if tile a is land. Otherwise, return carry. call GetTileCollision @@ -768,9 +750,8 @@ DoPlayerMovement:: ; 80000 ret z scf ret -; 803da -.CheckSurfable: ; 803da +.CheckSurfable: ; Return 0 if tile a is water, or 1 if land. ; Otherwise, return carry. @@ -796,27 +777,24 @@ DoPlayerMovement:: ; 80000 .Neither: scf ret -; 803ee -.BumpSound: ; 803ee +.BumpSound: call CheckSFX ret c ld de, SFX_BUMP call PlaySFX ret -; 803f9 -.GetOutOfWater: ; 803f9 +.GetOutOfWater: push bc ld a, PLAYER_NORMAL ld [wPlayerState], a call ReplaceKrisSprite ; UpdateSprites pop bc ret -; 80404 -CheckStandingOnIce:: ; 80404 +CheckStandingOnIce:: ld a, [wPlayerTurningDirection] cp 0 jr z, .not_ice @@ -836,9 +814,8 @@ CheckStandingOnIce:: ; 80404 .not_ice and a ret -; 80422 -StopPlayerForEvent:: ; 80422 +StopPlayerForEvent:: ld hl, wPlayerNextMovement ld a, movement_step_sleep cp [hl] @@ -848,4 +825,3 @@ StopPlayerForEvent:: ; 80422 ld a, 0 ld [wPlayerTurningDirection], a ret -; 80430 diff --git a/engine/overworld/player_object.asm b/engine/overworld/player_object.asm index 7d287dedbc9..08a990f4be8 100644 --- a/engine/overworld/player_object.asm +++ b/engine/overworld/player_object.asm @@ -1,4 +1,4 @@ -BlankScreen: ; 8000 +BlankScreen: call DisableSpriteUpdates xor a ld [hBGMapMode], a @@ -16,7 +16,7 @@ BlankScreen: ; 8000 call SetPalettes ret -SpawnPlayer: ; 8029 +SpawnPlayer: ld a, -1 ld [wObjectFollow_Leader], a ld [wObjectFollow_Follower], a @@ -51,13 +51,13 @@ SpawnPlayer: ; 8029 ld [wCenteredObject], a ret -PlayerObjectTemplate: ; 8071 +PlayerObjectTemplate: ; A dummy map object used to initialize the player object. ; Shorter than the actual amount copied by two bytes. ; Said bytes seem to be unused. object_event -4, -4, SPRITE_CHRIS, SPRITEMOVEDATA_PLAYER, 15, 15, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, 0, -1 -CopyDECoordsToMapObject:: ; 807e +CopyDECoordsToMapObject:: push de ld a, b call GetMapObject @@ -70,7 +70,7 @@ CopyDECoordsToMapObject:: ; 807e ld [hl], e ret -PlayerSpawn_ConvertCoords: ; 808f +PlayerSpawn_ConvertCoords: push bc ld a, [wXCoord] add 4 @@ -82,7 +82,7 @@ PlayerSpawn_ConvertCoords: ; 808f call CopyDECoordsToMapObject ret -WriteObjectXY:: ; 80a1 +WriteObjectXY:: ld a, b call CheckObjectVisibility ret c @@ -99,7 +99,7 @@ WriteObjectXY:: ; 80a1 and a ret -RefreshPlayerCoords: ; 80b8 +RefreshPlayerCoords: ld a, [wXCoord] add 4 ld d, a @@ -127,7 +127,7 @@ RefreshPlayerCoords: ; 80b8 ret nz ; wtf ret -CopyObjectStruct:: ; 80e7 +CopyObjectStruct:: call CheckObjectMask and a ret nz ; masked @@ -161,12 +161,12 @@ CopyObjectStruct:: ; 80e7 set 5, [hl] ret -CopyMapObjectToObjectStruct: ; 8116 +CopyMapObjectToObjectStruct: call .CopyMapObjectToTempObject call CopyTempObjectToObjectStruct ret -.CopyMapObjectToTempObject: ; 811d +.CopyMapObjectToTempObject: ld a, [hObjectStructIndexBuffer] ld hl, MAPOBJECT_OBJECT_STRUCT_ID add hl, bc @@ -223,7 +223,7 @@ CopyMapObjectToObjectStruct: ; 8116 ld [wTempObjectCopyRadius], a ret -InitializeVisibleSprites: ; 8177 +InitializeVisibleSprites: ld bc, wMapObjects + OBJECT_LENGTH ld a, 1 .loop @@ -281,10 +281,10 @@ InitializeVisibleSprites: ; 8177 jr nz, .loop ret -.ret ; 81c9 +.ret ret -CheckObjectEnteringVisibleRange:: ; 81ca +CheckObjectEnteringVisibleRange:: nop ld a, [wPlayerStepDirection] cp STANDING @@ -293,21 +293,21 @@ CheckObjectEnteringVisibleRange:: ; 81ca rst JumpTable ret -.dw ; 81d6 +.dw dw .Down dw .Up dw .Left dw .Right -.Up: ; 81de +.Up: ld a, [wYCoord] sub 1 jr .Vertical -.Down: ; 81e5 +.Down: ld a, [wYCoord] add 9 -.Vertical: ; 81ea +.Vertical: ld d, a ld a, [wXCoord] ld e, a @@ -355,15 +355,15 @@ CheckObjectEnteringVisibleRange:: ; 81ca jr nz, .loop_v ret -.Left: ; 8232 +.Left: ld a, [wXCoord] sub 1 jr .Horizontal -.Right: ; 8239 +.Right: ld a, [wXCoord] add 10 -.Horizontal: ; 823e +.Horizontal: ld e, a ld a, [wYCoord] ld d, a @@ -411,7 +411,7 @@ CheckObjectEnteringVisibleRange:: ; 81ca jr nz, .loop_h ret -CopyTempObjectToObjectStruct: ; 8286 +CopyTempObjectToObjectStruct: ld a, [wTempObjectCopyMapObjectIndex] ld hl, OBJECT_MAP_OBJECT_INDEX add hl, de @@ -461,7 +461,7 @@ CopyTempObjectToObjectStruct: ; 8286 and a ret -.InitYCoord: ; 82d5 +.InitYCoord: ld hl, OBJECT_INIT_Y add hl, de ld [hl], a @@ -481,7 +481,7 @@ CopyTempObjectToObjectStruct: ; 8286 ld [hl], a ret -.InitXCoord: ; 82f1 +.InitXCoord: ld hl, OBJECT_INIT_X add hl, de ld [hl], a @@ -499,7 +499,7 @@ CopyTempObjectToObjectStruct: ; 8286 ld [hl], a ret -.InitRadius: ; 830d +.InitRadius: ld h, a inc a and $f @@ -513,7 +513,7 @@ CopyTempObjectToObjectStruct: ; 8286 ld [hl], a ret -TrainerWalkToPlayer: ; 831e +TrainerWalkToPlayer: ld a, [hLastTalked] call InitMovementBuffer ld a, movement_step_sleep @@ -533,7 +533,7 @@ TrainerWalkToPlayer: ; 831e call AppendToMovementBuffer ret -.GetPathToPlayer: ; 8341 +.GetPathToPlayer: push de push bc ; get player object struct, load to de @@ -577,7 +577,7 @@ TrainerWalkToPlayer: ; 831e call ComputePathToWalkToPlayer ret -SurfStartStep: ; 8379 +SurfStartStep: call InitMovementBuffer call .GetMovementData call AppendToMovementBuffer @@ -585,7 +585,7 @@ SurfStartStep: ; 8379 call AppendToMovementBuffer ret -.GetMovementData: ; 8388 +.GetMovementData: ld a, [wPlayerDirection] srl a srl a @@ -603,7 +603,7 @@ SurfStartStep: ; 8379 slow_step LEFT slow_step RIGHT -FollowNotExact:: ; 839e +FollowNotExact:: push bc ld a, c call CheckObjectVisibility @@ -690,7 +690,7 @@ FollowNotExact:: ; 839e ld [hl], STEP_TYPE_00 ret -GetRelativeFacing:: ; 8417 +GetRelativeFacing:: ; Determines which way map object e would have to turn to face map object d. Returns carry if it's impossible for whatever reason. ld a, d call GetMapObject @@ -715,7 +715,7 @@ GetRelativeFacing:: ; 8417 scf ret -.GetFacing_e_relativeto_d: ; 8439 +.GetFacing_e_relativeto_d: ; Determines which way object e would have to turn to face object d. Returns carry if it's impossible. ; load the coordinates of object d into bc ld a, d @@ -796,7 +796,7 @@ GetRelativeFacing:: ; 8417 scf ret -QueueFollowerFirstStep: ; 848a +QueueFollowerFirstStep: call .QueueFirstStep jr c, .same ld [wFollowMovementQueue], a diff --git a/engine/overworld/player_step.asm b/engine/overworld/player_step.asm index 675c6553b52..eba149b57af 100644 --- a/engine/overworld/player_step.asm +++ b/engine/overworld/player_step.asm @@ -1,4 +1,4 @@ -_HandlePlayerStep:: ; d497 (3:5497) +_HandlePlayerStep:: ld a, [wPlayerStepFlags] and a ret z @@ -34,7 +34,7 @@ _HandlePlayerStep:: ; d497 (3:5497) ld [wPlayerBGMapOffsetY], a ret -ScrollScreen:: ; d4d2 (3:54d2) +ScrollScreen:: ld a, [wPlayerStepVectorX] ld d, a ld a, [wPlayerStepVectorY] @@ -47,7 +47,7 @@ ScrollScreen:: ; d4d2 (3:54d2) ld [hSCY], a ret -HandlePlayerStep: ; d4e5 (3:54e5) +HandlePlayerStep: ld hl, wHandlePlayerStep ld a, [hl] and a @@ -58,7 +58,7 @@ HandlePlayerStep: ; d4e5 (3:54e5) rst JumpTable ret -.Jumptable: ; d4f2 (3:54f2) +.Jumptable: dw GetMovementPermissions dw BufferScreen dw .mobile @@ -72,17 +72,17 @@ HandlePlayerStep: ; d4e5 (3:54e5) dw .fail1 dw .fail1 -.fail1 ; d508 (3:5508) +.fail1 ret -.mobile ; d509 (3:5509) +.mobile farcall StubbedTrainerRankings_StepCount ret -.fail2 ; d510 (3:5510) +.fail2 ret -UpdatePlayerCoords: ; d511 (3:5511) +UpdatePlayerCoords: ld a, [wPlayerStepDirection] and a jr nz, .check_step_down @@ -111,7 +111,7 @@ UpdatePlayerCoords: ; d511 (3:5511) inc [hl] ret -UpdateOverworldMap: ; d536 (3:5536) +UpdateOverworldMap: ld a, [wPlayerStepDirection] and a jr z, .step_down @@ -147,7 +147,7 @@ UpdateOverworldMap: ; d536 (3:5536) call ScrollMapLeft ret -.ScrollOverworldMapDown: ; d571 (3:5571) +.ScrollOverworldMapDown: ld a, [wBGMapAnchor] add 2 * BG_MAP_WIDTH ld [wBGMapAnchor], a @@ -168,7 +168,7 @@ UpdateOverworldMap: ; d536 (3:5536) .done_down ret -.Add6ToOverworldMapAnchor: ; d595 (3:5595) +.Add6ToOverworldMapAnchor: ld hl, wOverworldMapAnchor ld a, [wMapWidth] add 6 @@ -178,7 +178,7 @@ UpdateOverworldMap: ; d536 (3:5536) inc [hl] ret -.ScrollOverworldMapUp: ; d5a2 (3:55a2) +.ScrollOverworldMapUp: ld a, [wBGMapAnchor] sub 2 * BG_MAP_WIDTH ld [wBGMapAnchor], a @@ -199,7 +199,7 @@ UpdateOverworldMap: ; d536 (3:5536) .done_up ret -.Sub6FromOverworldMapAnchor: ; d5c6 (3:55c6) +.Sub6FromOverworldMapAnchor: ld hl, wOverworldMapAnchor ld a, [wMapWidth] add 6 @@ -211,7 +211,7 @@ UpdateOverworldMap: ; d536 (3:5536) dec [hl] ret -.ScrollOverworldMapLeft: ; d5d5 (3:55d5) +.ScrollOverworldMapLeft: ld a, [wBGMapAnchor] ld e, a and $e0 @@ -231,7 +231,7 @@ UpdateOverworldMap: ; d536 (3:5536) .done_left ret -.DecrementwOverworldMapAnchor: ; d5f4 (3:55f4) +.DecrementwOverworldMapAnchor: ld hl, wOverworldMapAnchor ld a, [hl] sub 1 @@ -240,7 +240,7 @@ UpdateOverworldMap: ; d536 (3:5536) dec [hl] ret -.ScrollOverworldMapRight: ; d5fe (3:55fe) +.ScrollOverworldMapRight: ld a, [wBGMapAnchor] ld e, a and $e0 @@ -260,7 +260,7 @@ UpdateOverworldMap: ; d536 (3:5536) .done_right ret -.IncrementwOverworldMapAnchor: ; d61d (3:561d) +.IncrementwOverworldMapAnchor: ld hl, wOverworldMapAnchor ld a, [hl] add 1 diff --git a/engine/overworld/select_menu.asm b/engine/overworld/select_menu.asm index 9898afda2ae..069d74f2dfc 100644 --- a/engine/overworld/select_menu.asm +++ b/engine/overworld/select_menu.asm @@ -1,4 +1,4 @@ -SelectMenu:: ; 13327 +SelectMenu:: call CheckRegisteredItem jr c, .NotRegistered @@ -11,16 +11,14 @@ SelectMenu:: ; 13327 call MapTextbox call WaitButton jp CloseText -; 13340 -ItemMayBeRegisteredText: ; 13340 +ItemMayBeRegisteredText: text_jump UnknownText_0x1c1cf3 db "@" -; 13345 -CheckRegisteredItem: ; 13345 +CheckRegisteredItem: ld a, [wWhichRegisteredItem] and a @@ -86,10 +84,9 @@ CheckRegisteredItem: ; 13345 ld [wRegisteredItem], a scf ret -; 133a6 -.CheckRegisteredNo: ; 133a6 +.CheckRegisteredNo: ld a, [wWhichRegisteredItem] and REGISTERED_NUMBER dec a @@ -102,10 +99,9 @@ CheckRegisteredItem: ; 13345 .NotEnoughItems: scf ret -; 133b6 -.IsSameItem: ; 133b6 +.IsSameItem: ld a, [wRegisteredItem] cp [hl] jr nz, .NotSameItem @@ -116,10 +112,9 @@ CheckRegisteredItem: ; 13345 .NotSameItem: scf ret -; 133c3 -UseRegisteredItem: ; 133c3 +UseRegisteredItem: farcall CheckItemMenu ld a, [wItemAttributeParamBuffer] @@ -136,25 +131,22 @@ UseRegisteredItem: ; 133c3 dw .Current dw .Party dw .Overworld -; 133df -.NoFunction: ; 133df +.NoFunction: call OpenText call CantUseItem call CloseText and a ret -; 133ea -.Current: ; 133ea +.Current: call OpenText call DoItemEffect call CloseText and a ret -; 133f5 -.Party: ; 133f5 +.Party: call RefreshScreen call FadeToMenu call DoItemEffect @@ -162,9 +154,8 @@ UseRegisteredItem: ; 133c3 call CloseText and a ret -; 13406 -.Overworld: ; 13406 +.Overworld: call RefreshScreen ld a, 1 ld [wUsingItemWithSelect], a @@ -178,9 +169,8 @@ UseRegisteredItem: ; 133c3 ld a, HMENURETURN_SCRIPT ld [hMenuReturn], a ret -; 13422 -.CantUse: ; 13422 +.CantUse: call RefreshScreen ._cantuse @@ -188,4 +178,3 @@ UseRegisteredItem: ; 133c3 call CloseText and a ret -; 1342d diff --git a/engine/overworld/spawn_points.asm b/engine/overworld/spawn_points.asm index 1a3d1244111..2c673d6b13a 100644 --- a/engine/overworld/spawn_points.asm +++ b/engine/overworld/spawn_points.asm @@ -1,7 +1,7 @@ INCLUDE "data/maps/spawn_points.asm" -LoadSpawnPoint: ; 1531f +LoadSpawnPoint: ; loads the spawn point in wDefaultSpawnpoint push hl push de @@ -26,10 +26,9 @@ LoadSpawnPoint: ; 1531f pop de pop hl ret -; 15344 -IsSpawnPoint: ; 15344 +IsSpawnPoint: ; Checks if the map loaded in de is a spawn point. Returns carry if it's a spawn point. ld hl, SpawnPoints ld c, 0 @@ -59,4 +58,3 @@ IsSpawnPoint: ; 15344 .yes scf ret -; 15363 diff --git a/engine/overworld/tile_events.asm b/engine/overworld/tile_events.asm index 705c0e42736..bb566c99710 100644 --- a/engine/overworld/tile_events.asm +++ b/engine/overworld/tile_events.asm @@ -1,4 +1,4 @@ -CheckWarpCollision:: ; 1499a +CheckWarpCollision:: ; Is this tile a warp? ld a, [wPlayerStandingTile] cp COLL_PIT @@ -14,9 +14,8 @@ CheckWarpCollision:: ; 1499a .warp scf ret -; 149af -CheckDirectionalWarp:: ; 149af +CheckDirectionalWarp:: ; If this is a directional warp, clear carry (press the designated button to warp). ; Else, set carry (immediate warp). ld a, [wPlayerStandingTile] @@ -34,17 +33,15 @@ CheckDirectionalWarp:: ; 149af .directional xor a ret -; 149c6 -CheckWarpFacingDown: ; 149c6 +CheckWarpFacingDown: ld de, 1 ld hl, .blocks ld a, [wPlayerStandingTile] call IsInArray ret -; 149d3 -.blocks ; 149d3 +.blocks db COLL_DOOR db COLL_DOOR_79 db COLL_STAIRCASE @@ -55,17 +52,15 @@ CheckWarpFacingDown: ; 149c6 db COLL_DOOR_75 db COLL_DOOR_7D db -1 -; 149dd -CheckGrassCollision:: ; 149dd +CheckGrassCollision:: ld a, [wPlayerStandingTile] ld hl, .blocks ld de, 1 call IsInArray ret -; 149ea -.blocks ; 149ea +.blocks db COLL_CUT_08 db COLL_TALL_GRASS db COLL_LONG_GRASS @@ -77,17 +72,15 @@ CheckGrassCollision:: ; 149dd db COLL_GRASS_4B db COLL_GRASS_4C db -1 -; 149f5 -CheckCutCollision: ; 149f5 +CheckCutCollision: ld a, c ld hl, .blocks ld de, 1 call IsInArray ret -; 14a00 -.blocks ; 14a00 +.blocks db COLL_CUT_TREE db COLL_CUT_TREE_1A db COLL_TALL_GRASS_10 @@ -95,9 +88,8 @@ CheckCutCollision: ; 149f5 db COLL_LONG_GRASS db COLL_LONG_GRASS_1C db -1 -; 14a07 -GetWarpSFX:: ; 14a07 +GetWarpSFX:: ld a, [wPlayerStandingTile] ld de, SFX_ENTER_DOOR cp COLL_DOOR @@ -107,4 +99,3 @@ GetWarpSFX:: ; 14a07 ret z ld de, SFX_EXIT_BUILDING ret -; 14a1a diff --git a/engine/overworld/time.asm b/engine/overworld/time.asm index 0f83447cc6a..136adb22144 100644 --- a/engine/overworld/time.asm +++ b/engine/overworld/time.asm @@ -1,21 +1,19 @@ -_InitializeStartDay: ; 113d6 +_InitializeStartDay: call InitializeStartDay ret -; 113da -ClearDailyTimers: ; 113da +ClearDailyTimers: xor a ld [wLuckyNumberDayBuffer], a ld [wUnusedTwoDayTimer], a ld [wDailyResetTimer], a ret -; 113e5 -InitCallReceiveDelay:: ; 113e5 +InitCallReceiveDelay:: xor a ld [wTimeCyclesSinceLastCall], a -NextCallReceiveDelay: ; 113e9 +NextCallReceiveDelay: ld a, [wTimeCyclesSinceLastCall] cp 3 jr c, .okay @@ -28,13 +26,11 @@ NextCallReceiveDelay: ; 113e9 add hl, de ld a, [hl] jp RestartReceiveCallDelay -; 113fd .ReceiveCallDelays: db 20, 10, 5, 3 -; 11401 -CheckReceiveCallTimer: ; 11401 +CheckReceiveCallTimer: call CheckReceiveCallDelay ; check timer ret nc ld hl, wTimeCyclesSinceLastCall @@ -47,12 +43,11 @@ CheckReceiveCallTimer: ; 11401 call NextCallReceiveDelay ; restart timer scf ret -; 11413 -InitOneDayCountdown: ; 11413 +InitOneDayCountdown: ld a, 1 -InitNDaysCountdown: ; 11415 +InitNDaysCountdown: ld [hl], a push hl call UpdateTime @@ -60,9 +55,8 @@ InitNDaysCountdown: ; 11415 inc hl call CopyDayToHL ret -; 11420 -CheckDayDependentEventHL: ; 11420 +CheckDayDependentEventHL: inc hl push hl call CalcDaysSince @@ -71,32 +65,28 @@ CheckDayDependentEventHL: ; 11420 dec hl call UpdateTimeRemaining ret -; 1142e -RestartReceiveCallDelay: ; 1142e +RestartReceiveCallDelay: ld hl, wReceiveCallDelay_MinsRemaining ld [hl], a call UpdateTime ld hl, wReceiveCallDelay_StartTime call CopyDayHourMinToHL ret -; 1143c -CheckReceiveCallDelay: ; 1143c +CheckReceiveCallDelay: ld hl, wReceiveCallDelay_StartTime call CalcMinsHoursDaysSince call GetMinutesSinceIfLessThan60 ld hl, wReceiveCallDelay_MinsRemaining call UpdateTimeRemaining ret -; 1144c -RestartDailyResetTimer: ; 1144c +RestartDailyResetTimer: ld hl, wDailyResetTimer jp InitOneDayCountdown -; 11452 -CheckDailyResetTimer:: ; 11452 +CheckDailyResetTimer:: ld hl, wDailyResetTimer call CheckDayDependentEventHL ret nc @@ -128,18 +118,16 @@ endr call SampleKenjiBreakCountdown .DontRestartKenjiBreakCountdown: jr RestartDailyResetTimer -; 11485 -SampleKenjiBreakCountdown: ; 11485 +SampleKenjiBreakCountdown: ; Generate a random number between 3 and 6 call Random and %11 add 3 ld [wKenjiBreakTimer], a ret -; 11490 -StartBugContestTimer: ; 11490 +StartBugContestTimer: ld a, BUG_CONTEST_MINUTES ld [wBugContestMinsRemaining], a ld a, BUG_CONTEST_SECONDS @@ -148,10 +136,9 @@ StartBugContestTimer: ; 11490 ld hl, wBugContestStartTime call CopyDayHourMinSecToHL ret -; 114a4 -CheckBugContestTimer:: ; 114a4 (4:54a4) +CheckBugContestTimer:: ld hl, wBugContestStartTime call CalcSecsMinsHoursDaysSince ld a, [wDaysSince] @@ -186,14 +173,13 @@ CheckBugContestTimer:: ; 114a4 (4:54a4) ret -InitializeStartDay: ; 114dd +InitializeStartDay: call UpdateTime ld hl, wTimerEventStartDay call CopyDayToHL ret -; 114e7 -CheckPokerusTick:: ; 114e7 +CheckPokerusTick:: ld hl, wTimerEventStartDay call CalcDaysSince call GetDaysSince @@ -204,9 +190,8 @@ CheckPokerusTick:: ; 114e7 .done xor a ret -; 114fc -SetUnusedTwoDayTimer: ; 114fc +SetUnusedTwoDayTimer: ld a, 2 ld hl, wUnusedTwoDayTimer ld [hl], a @@ -214,22 +199,19 @@ SetUnusedTwoDayTimer: ; 114fc ld hl, wUnusedTwoDayTimerStartDate call CopyDayToHL ret -; 1150c -CheckUnusedTwoDayTimer: ; 1150c +CheckUnusedTwoDayTimer: ld hl, wUnusedTwoDayTimerStartDate call CalcDaysSince call GetDaysSince ld hl, wUnusedTwoDayTimer call UpdateTimeRemaining ret -; 1151c ; unused ld hl, wDailyFlags set DAILYFLAGS_FISH_SWARM_F, [hl] ret -; 11522 ; unused and a @@ -238,15 +220,13 @@ CheckUnusedTwoDayTimer: ; 1150c ret nz scf ret -; 1152b -RestartLuckyNumberCountdown: ; 1152b +RestartLuckyNumberCountdown: call .GetDaysUntilNextFriday ld hl, wLuckyNumberDayBuffer jp InitNDaysCountdown -; 11534 -.GetDaysUntilNextFriday: ; 11534 +.GetDaysUntilNextFriday: call GetWeekday ld c, a ld a, FRIDAY @@ -259,14 +239,12 @@ RestartLuckyNumberCountdown: ; 1152b .earlier ret -; 11542 -_CheckLuckyNumberShowFlag: ; 11542 +_CheckLuckyNumberShowFlag: ld hl, wLuckyNumberDayBuffer jp CheckDayDependentEventHL -; 11548 -DoMysteryGiftIfDayHasPassed: ; 11548 +DoMysteryGiftIfDayHasPassed: ld a, BANK(sMysteryGiftTimer) call GetSRAMBank ld hl, sMysteryGiftTimer @@ -294,9 +272,8 @@ DoMysteryGiftIfDayHasPassed: ; 11548 ld [sMysteryGiftTimer + 1], a call CloseSRAM ret -; 11586 -UpdateTimeRemaining: ; 11586 +UpdateTimeRemaining: ; If the amount of time elapsed exceeds the capacity of its ; unit, skip this part. cp -1 @@ -318,9 +295,8 @@ UpdateTimeRemaining: ; 11586 ld [hl], a scf ret -; 11599 -GetSecondsSinceIfLessThan60: ; 11599 +GetSecondsSinceIfLessThan60: ld a, [wDaysSince] and a jr nz, GetTimeElapsed_ExceedsUnitLimit @@ -331,9 +307,8 @@ GetSecondsSinceIfLessThan60: ; 11599 jr nz, GetTimeElapsed_ExceedsUnitLimit ld a, [wSecondsSince] ret -; 115ae -GetMinutesSinceIfLessThan60: ; 115ae +GetMinutesSinceIfLessThan60: ld a, [wDaysSince] and a jr nz, GetTimeElapsed_ExceedsUnitLimit @@ -342,45 +317,38 @@ GetMinutesSinceIfLessThan60: ; 115ae jr nz, GetTimeElapsed_ExceedsUnitLimit ld a, [wMinutesSince] ret -; 115be -GetHoursSinceIfLessThan24: ; 115be +GetHoursSinceIfLessThan24: ld a, [wDaysSince] and a jr nz, GetTimeElapsed_ExceedsUnitLimit ld a, [wHoursSince] ret -; 115c8 -GetDaysSince: ; 115c8 +GetDaysSince: ld a, [wDaysSince] ret -; 115cc -GetTimeElapsed_ExceedsUnitLimit: ; 115cc +GetTimeElapsed_ExceedsUnitLimit: ld a, -1 ret -; 115cf -CalcDaysSince: ; 115cf +CalcDaysSince: xor a jr _CalcDaysSince -; 115d2 -CalcHoursDaysSince: ; 115d2 +CalcHoursDaysSince: inc hl xor a jr _CalcHoursDaysSince -; 115d6 -CalcMinsHoursDaysSince: ; 115d6 +CalcMinsHoursDaysSince: inc hl inc hl xor a jr _CalcMinsHoursDaysSince -; 115db -CalcSecsMinsHoursDaysSince: ; 115db +CalcSecsMinsHoursDaysSince: inc hl inc hl inc hl @@ -394,7 +362,7 @@ CalcSecsMinsHoursDaysSince: ; 115db dec hl ld [wSecondsSince], a ; seconds since -_CalcMinsHoursDaysSince: ; 115eb +_CalcMinsHoursDaysSince: ld a, [hMinutes] ld c, a sbc [hl] @@ -405,7 +373,7 @@ _CalcMinsHoursDaysSince: ; 115eb dec hl ld [wMinutesSince], a ; minutes since -_CalcHoursDaysSince: ; 115f8 +_CalcHoursDaysSince: ld a, [hHours] ld c, a sbc [hl] @@ -426,9 +394,8 @@ _CalcDaysSince: ld [hl], c ; current days ld [wDaysSince], a ; days since ret -; 11613 -CopyDayHourMinSecToHL: ; 11613 +CopyDayHourMinSecToHL: ld a, [wCurDay] ld [hli], a ld a, [hHours] @@ -438,23 +405,20 @@ CopyDayHourMinSecToHL: ; 11613 ld a, [hSeconds] ld [hli], a ret -; 11621 -CopyDayToHL: ; 11621 +CopyDayToHL: ld a, [wCurDay] ld [hl], a ret -; 11626 -CopyDayHourToHL: ; 11626 +CopyDayHourToHL: ld a, [wCurDay] ld [hli], a ld a, [hHours] ld [hli], a ret -; 1162e -CopyDayHourMinToHL: ; 1162e +CopyDayHourMinToHL: ld a, [wCurDay] ld [hli], a ld a, [hHours] @@ -462,4 +426,3 @@ CopyDayHourMinToHL: ; 1162e ld a, [hMinutes] ld [hli], a ret -; 11639 diff --git a/engine/overworld/variables.asm b/engine/overworld/variables.asm index 3adf6df33b3..9b5e3846c8e 100644 --- a/engine/overworld/variables.asm +++ b/engine/overworld/variables.asm @@ -1,4 +1,4 @@ -_GetVarAction:: ; 80648 (20:4648) +_GetVarAction:: ld a, c cp NUM_VARS jr c, .valid @@ -28,13 +28,12 @@ _GetVarAction:: ; 80648 (20:4648) call _de_ ret -.loadstringbuffer2 ; 8066c (20:466c) +.loadstringbuffer2 ld de, wStringBuffer2 ld [de], a ret -; 80671 (20:4671) -.VarActionTable: ; 80671 +.VarActionTable: ; entries correspond to VAR_* constants ; RETVAR_STRBUF2: copy [de] to wStringBuffer2 ; RETVAR_ADDR_DE: return address in de @@ -67,51 +66,45 @@ _GetVarAction:: ; 80648 (20:4648) dwb wBuenasPassword, RETVAR_ADDR_DE dwb wKenjiBreakTimer, RETVAR_STRBUF2 dwb NULL, RETVAR_STRBUF2 -; 806c5 -.CountCaughtMons: ; 806c5 +.CountCaughtMons: ; Caught mons. ld hl, wPokedexCaught ld b, wEndPokedexCaught - wPokedexCaught call CountSetBits ld a, [wd265] jp .loadstringbuffer2 -; 806d3 -.CountSeenMons: ; 806d3 +.CountSeenMons: ; Seen mons. ld hl, wPokedexSeen ld b, wEndPokedexSeen - wPokedexSeen call CountSetBits ld a, [wd265] jp .loadstringbuffer2 -; 806e1 -.CountBadges: ; 806e1 +.CountBadges: ; Number of owned badges. ld hl, wBadges ld b, 2 call CountSetBits ld a, [wd265] jp .loadstringbuffer2 -; 806ef -.PlayerFacing: ; 806ef +.PlayerFacing: ; The direction the player is facing. ld a, [wPlayerDirection] and $c rrca rrca jp .loadstringbuffer2 -; 806f9 -.DayOfWeek: ; 806f9 +.DayOfWeek: ; The day of the week. call GetWeekday jp .loadstringbuffer2 -; 806ff -.UnownCaught: ; 806ff +.UnownCaught: ; Number of unique Unown caught. call .count ld a, b @@ -129,9 +122,8 @@ _GetVarAction:: ; 80648 (20:4648) cp NUM_UNOWN jr c, .loop ret -; 80715 -.BoxFreeSpace: ; 80715 +.BoxFreeSpace: ; Remaining slots in the current box. ld a, BANK(sBoxCount) call GetSRAMBank @@ -142,10 +134,8 @@ _GetVarAction:: ; 80648 (20:4648) call CloseSRAM ld a, b jp .loadstringbuffer2 -; 80728 -.BattleResult: ; 80728 +.BattleResult: ld a, [wBattleResult] and $ff ^ BATTLERESULT_BITMASK jp .loadstringbuffer2 -; 80730 diff --git a/engine/overworld/warp_connection.asm b/engine/overworld/warp_connection.asm index 2f5e488ccac..0ab9a6c2db0 100644 --- a/engine/overworld/warp_connection.asm +++ b/engine/overworld/warp_connection.asm @@ -1,5 +1,5 @@ -HandleNewMap: ; 1045b0 +HandleNewMap: call Clearwc7e8 call ResetMapBufferEventFlags call ResetFlashIfOutOfCave @@ -7,7 +7,7 @@ HandleNewMap: ; 1045b0 call ResetBikeFlags ld a, MAPCALLBACK_NEWMAP call RunMapCallback -InitCommandQueue: ; 1045c4 +InitCommandQueue: farcall ClearCmdQueue ld a, MAPCALLBACK_CMDQUEUE call RunMapCallback @@ -16,7 +16,7 @@ InitCommandQueue: ; 1045c4 ret -EnterMapConnection: ; 1045d6 +EnterMapConnection: ; Return carry if a connection has been entered. ld a, [wPlayerStepDirection] and a @@ -150,9 +150,8 @@ EnterMapConnection: ; 1045d6 .done scf ret -; 1046c6 -LoadWarpData: ; 1046c6 +LoadWarpData: call .SaveDigWarp call .SetSpawn ld a, [wNextWarp] @@ -163,7 +162,7 @@ LoadWarpData: ; 1046c6 ld [wMapNumber], a ret -.SaveDigWarp: ; 1046df (41:46df) +.SaveDigWarp: call GetMapEnvironment call CheckOutdoorMap ret nz @@ -195,7 +194,7 @@ LoadWarpData: ; 1046c6 ld [wDigMapNumber], a ret -.SetSpawn: ; 104718 (41:4718) +.SetSpawn: call GetMapEnvironment call CheckOutdoorMap ret nz @@ -227,7 +226,7 @@ LoadWarpData: ; 1046c6 ld [wLastSpawnMapNumber], a ret -LoadMapTimeOfDay: ; 104750 +LoadMapTimeOfDay: ld hl, wVramState res 6, [hl] ld a, $1 @@ -239,7 +238,7 @@ LoadMapTimeOfDay: ; 104750 call .PushAttrMap ret -.ClearBGMap: ; 104770 (41:4770) +.ClearBGMap: ld a, HIGH(vBGMap0) ld [wBGMapAnchor + 1], a xor a ; LOW(vBGMap0) @@ -267,7 +266,7 @@ LoadMapTimeOfDay: ; 104750 call ByteFill ret -.PushAttrMap: ; 1047a3 (41:47a3) +.PushAttrMap: decoord 0, 0 call .copy ld a, [hCGB] @@ -298,7 +297,7 @@ LoadMapTimeOfDay: ; 104750 ld [rVBK], a ret -LoadGraphics: ; 1047cf +LoadGraphics: call LoadTileset call LoadTilesetGFX xor a @@ -310,12 +309,11 @@ LoadGraphics: ; 1047cf farcall LoadOverworldFont ret -LoadMapPalettes: ; 1047eb +LoadMapPalettes: ld b, SCGB_MAPPALS jp GetSGBLayout -; 1047f0 -RefreshMapSprites: ; 1047f0 +RefreshMapSprites: call ClearSprites farcall ReturnFromMapSetupScript call GetMovementPermissions @@ -333,7 +331,7 @@ RefreshMapSprites: ; 1047f0 ld [wPlayerSpriteSetupFlags], a ret -CheckMovingOffEdgeOfMap:: ; 104820 (41:4820) +CheckMovingOffEdgeOfMap:: ld a, [wPlayerStepDirection] cp STANDING ret z @@ -391,7 +389,7 @@ CheckMovingOffEdgeOfMap:: ; 104820 (41:4820) ret -GetCoordOfUpperLeftCorner:: ; 10486d +GetCoordOfUpperLeftCorner:: ld hl, wOverworldMapBlocks ld a, [wXCoord] bit 0, a @@ -436,4 +434,3 @@ GetCoordOfUpperLeftCorner:: ; 10486d and $1 ld [wMetatileStandingX], a ret -; 1048ba diff --git a/engine/overworld/wildmons.asm b/engine/overworld/wildmons.asm index 20375ba6cb4..e28a18f89b2 100644 --- a/engine/overworld/wildmons.asm +++ b/engine/overworld/wildmons.asm @@ -1,4 +1,4 @@ -LoadWildMonData: ; 29ff8 +LoadWildMonData: call _GrassWildmonLookup jr c, .copy ld hl, wMornEncounterRate @@ -25,7 +25,7 @@ LoadWildMonData: ; 29ff8 ld [wWaterEncounterRate], a ret -FindNest: ; 2a01f +FindNest: ; Parameters: ; e: 0 = Johto, 1 = Kanto ; wNamedObjectIndexBuffer: species @@ -51,9 +51,8 @@ FindNest: ; 2a01f call .FindGrass ld hl, KantoWaterWildMons jp .FindWater -; 2a052 -.FindGrass: ; 2a052 +.FindGrass: ld a, [hl] cp -1 ret z @@ -76,9 +75,8 @@ FindNest: ; 2a01f ld bc, GRASS_WILDDATA_LENGTH add hl, bc jr .FindGrass -; 2a06e -.FindWater: ; 2a06e +.FindWater: ld a, [hl] cp -1 ret z @@ -99,9 +97,8 @@ FindNest: ; 2a01f ld bc, 3 * 3 add hl, bc jr .FindWater -; 2a088 -.SearchMapForMon: ; 2a088 +.SearchMapForMon: inc hl .ScanMapLoop: push af @@ -119,9 +116,8 @@ FindNest: ; 2a01f .found pop af jp .AppendNest -; 2a09c -.AppendNest: ; 2a09c +.AppendNest: push de call GetWorldMapLocation ld c, a @@ -144,9 +140,8 @@ FindNest: ; 2a01f pop de and a ret -; 2a0b7 -.RoamMon1: ; 2a0b7 +.RoamMon1: ld a, [wRoamMon1Species] ld b, a ld a, [wNamedObjectIndexBuffer] @@ -161,9 +156,8 @@ FindNest: ; 2a01f ld [de], a inc de ret -; 2a0cf -.RoamMon2: ; 2a0cf +.RoamMon2: ld a, [wRoamMon2Species] ld b, a ld a, [wNamedObjectIndexBuffer] @@ -178,9 +172,8 @@ FindNest: ; 2a01f ld [de], a inc de ret -; 2a0e7 -TryWildEncounter:: ; 2a0e7 +TryWildEncounter:: ; Try to trigger a wild encounter. call .EncounterRate jr nc, .no_battle @@ -198,18 +191,16 @@ TryWildEncounter:: ; 2a0e7 ld a, 1 and a ret -; 2a103 -.EncounterRate: ; 2a103 +.EncounterRate: call GetMapEncounterRate call ApplyMusicEffectOnEncounterRate call ApplyCleanseTagEffectOnEncounterRate call Random cp b ret -; 2a111 -GetMapEncounterRate: ; 2a111 +GetMapEncounterRate: ld hl, wMornEncounterRate call CheckOnWater ld a, wWaterEncounterRate - wMornEncounterRate @@ -221,9 +212,8 @@ GetMapEncounterRate: ; 2a111 add hl, bc ld b, [hl] ret -; 2a124 -ApplyMusicEffectOnEncounterRate:: ; 2a124 +ApplyMusicEffectOnEncounterRate:: ; Pokemon March and Ruins of Alph signal double encounter rate. ; Pokemon Lullaby halves encounter rate. ld a, [wMapMusic] @@ -239,9 +229,8 @@ ApplyMusicEffectOnEncounterRate:: ; 2a124 .double sla b ret -; 2a138 -ApplyCleanseTagEffectOnEncounterRate:: ; 2a138 +ApplyCleanseTagEffectOnEncounterRate:: ; Cleanse Tag halves encounter rate. ld hl, wPartyMon1Item ld de, PARTYMON_STRUCT_LENGTH @@ -259,9 +248,8 @@ ApplyCleanseTagEffectOnEncounterRate:: ; 2a138 .cleansetag srl b ret -; 2a14f -ChooseWildEncounter: ; 2a14f +ChooseWildEncounter: call LoadWildMonDataPointer jp nc, .nowildbattle call CheckEncounterRoamMon @@ -355,11 +343,10 @@ ChooseWildEncounter: ; 2a14f .startwildbattle xor a ret -; 2a1cb INCLUDE "data/wild/probabilities.asm" -CheckRepelEffect:: ; 2a1df +CheckRepelEffect:: ; If there is no active Repel, there's no need to be here. ld a, [wRepelEffect] and a @@ -389,13 +376,12 @@ endr .encounter scf ret -; 2a200 -LoadWildMonDataPointer: ; 2a200 +LoadWildMonDataPointer: call CheckOnWater jr z, _WaterWildmonLookup -_GrassWildmonLookup: ; 2a205 +_GrassWildmonLookup: ld hl, SwarmGrassWildMons ld bc, GRASS_WILDDATA_LENGTH call _SwarmWildmonCheck @@ -406,7 +392,7 @@ _GrassWildmonLookup: ; 2a205 ld bc, GRASS_WILDDATA_LENGTH jr _NormalWildmonOK -_WaterWildmonLookup: ; 2a21d +_WaterWildmonLookup: ld hl, SwarmWaterWildMons ld bc, WATER_WILDDATA_LENGTH call _SwarmWildmonCheck @@ -467,17 +453,15 @@ _NoSwarmWildmon: _NormalWildmonOK: call CopyCurrMapDE jr LookUpWildmonsForMapDE -; 2a27f -CopyCurrMapDE: ; 2a27f +CopyCurrMapDE: ld a, [wMapGroup] ld d, a ld a, [wMapNumber] ld e, a ret -; 2a288 -LookUpWildmonsForMapDE: ; 2a288 +LookUpWildmonsForMapDE: .loop push hl ld a, [hl] @@ -505,10 +489,9 @@ LookUpWildmonsForMapDE: ; 2a288 pop hl scf ret -; 2a2a0 -InitRoamMons: ; 2a2a0 +InitRoamMons: ; initialize wRoamMon structs ; species @@ -540,10 +523,9 @@ InitRoamMons: ; 2a2a0 ld [wRoamMon2HP], a ret -; 2a2ce -CheckEncounterRoamMon: ; 2a2ce +CheckEncounterRoamMon: push hl ; Don't trigger an encounter if we're on water. call CheckOnWater @@ -589,10 +571,9 @@ CheckEncounterRoamMon: ; 2a2ce pop hl and a ret -; 2a30d -UpdateRoamMons: ; 2a30d +UpdateRoamMons: ld a, [wRoamMon1MapGroup] cp GROUP_N_A jr z, .SkipRaikou @@ -633,10 +614,9 @@ UpdateRoamMons: ; 2a30d .Finished: jp _BackUpMapIndices -; 2a355 -.Update: ; 2a355 +.Update: ld hl, RoamMaps .loop ; Are we at the end of the table? @@ -693,7 +673,7 @@ UpdateRoamMons: ; 2a30d ld c, [hl] ret -JumpRoamMons: ; 2a394 +JumpRoamMons: ld a, [wRoamMon1MapGroup] cp GROUP_N_A jr z, .SkipRaikou @@ -726,7 +706,7 @@ JumpRoamMons: ; 2a394 .Finished: jp _BackUpMapIndices -JumpRoamMon: ; 2a3cd +JumpRoamMon: .loop ld hl, RoamMaps .innerloop1 ; This loop happens to be unnecessary. @@ -760,9 +740,8 @@ JumpRoamMon: ; 2a3cd ld b, a ld c, [hl] ret -; 2a3f6 -_BackUpMapIndices: ; 2a3f6 +_BackUpMapIndices: ld a, [wRoamMons_CurrentMapNumber] ld [wRoamMons_LastMapNumber], a ld a, [wRoamMons_CurrentMapGroup] @@ -772,13 +751,12 @@ _BackUpMapIndices: ; 2a3f6 ld a, [wMapGroup] ld [wRoamMons_CurrentMapGroup], a ret -; 2a40f INCLUDE "data/wild/roammon_maps.asm" -ValidateTempWildMonSpecies: ; 2a4a0 +ValidateTempWildMonSpecies: ; Due to a development oversight, this function is called with the wild Pokemon's level, not its species, in a. and a jr z, .nowildmon ; = 0 @@ -790,11 +768,10 @@ ValidateTempWildMonSpecies: ; 2a4a0 .nowildmon scf ret -; 2a4ab ; Finds a rare wild Pokemon in the route of the trainer calling, then checks if it's been Seen already. ; The trainer will then tell you about the Pokemon if you haven't seen it. -RandomUnseenWildMon: ; 2a4ab +RandomUnseenWildMon: farcall GetCallerLocation ld d, b ld e, c @@ -867,7 +844,7 @@ RandomUnseenWildMon: ; 2a4ab db "@" ; 0x2a51f -RandomPhoneWildMon: ; 2a51f +RandomPhoneWildMon: farcall GetCallerLocation ld d, b ld e, c @@ -905,9 +882,8 @@ RandomPhoneWildMon: ; 2a51f ld de, wStringBuffer4 ld bc, MON_NAME_LENGTH jp CopyBytes -; 2a567 -RandomPhoneMon: ; 2a567 +RandomPhoneMon: ; Get a random monster owned by the trainer who's calling. farcall GetCallerLocation ld hl, TrainerGroups @@ -989,7 +965,6 @@ RandomPhoneMon: ; 2a567 ld de, wStringBuffer4 ld bc, MON_NAME_LENGTH jp CopyBytes -; 2a5e9 INCLUDE "data/wild/johto_grass.asm" diff --git a/engine/phone/buenas_password.asm b/engine/phone/buenas_password.asm index 82a69664842..68c5c01b98d 100644 --- a/engine/phone/buenas_password.asm +++ b/engine/phone/buenas_password.asm @@ -165,6 +165,5 @@ BuenaPhoneScript_Random1: .two writetext UnknownText_0xa1e2f end -; a0c28 INCLUDE "data/phone/text/buena.asm" diff --git a/engine/phone/generic_calls.asm b/engine/phone/generic_calls.asm index b3b3eb56a90..359d0146b92 100644 --- a/engine/phone/generic_calls.asm +++ b/engine/phone/generic_calls.asm @@ -1254,7 +1254,6 @@ PhoneScript_MonFlavorText: farwritetext UnknownText_0x1b522b buttonsound farjump PhoneScript_HangupText_Male -; be643 GrandmaString: db "Grandma@" diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm index 41f7bf47f44..019fc7e0784 100644 --- a/engine/phone/phone.asm +++ b/engine/phone/phone.asm @@ -1,4 +1,4 @@ -AddPhoneNumber:: ; 90000 +AddPhoneNumber:: call _CheckCellNum jr c, .cant_add call Phone_FindOpenSlot @@ -10,10 +10,9 @@ AddPhoneNumber:: ; 90000 .cant_add scf ret -; 9000f -DelCellNum:: ; 9000f +DelCellNum:: call _CheckCellNum jr nc, .not_in_list xor a @@ -23,13 +22,11 @@ DelCellNum:: ; 9000f .not_in_list scf ret -; 90019 -CheckCellNum:: ; 90019 +CheckCellNum:: jp _CheckCellNum ; wtf -; 9001c -_CheckCellNum: ; 9001c +_CheckCellNum: ld hl, wPhoneList ld b, CONTACT_LIST_SIZE .loop @@ -45,9 +42,8 @@ _CheckCellNum: ; 9001c dec hl scf ret -; 9002d -Phone_FindOpenSlot: ; 9002d +Phone_FindOpenSlot: call GetRemainingSpaceInPhoneList ld b, a ld hl, wPhoneList @@ -64,9 +60,8 @@ Phone_FindOpenSlot: ; 9002d dec hl scf ret -; 90040 -GetRemainingSpaceInPhoneList: ; 90040 +GetRemainingSpaceInPhoneList: xor a ld [wBuffer1], a ld hl, PermanentNumbers @@ -96,12 +91,11 @@ GetRemainingSpaceInPhoneList: ; 90040 ld hl, wBuffer1 sub [hl] ret -; 90066 INCLUDE "data/phone/permanent_numbers.asm" -FarPlaceString: ; 90069 +FarPlaceString: ld a, [hROMBank] push af ld a, b @@ -112,10 +106,9 @@ FarPlaceString: ; 90069 pop af rst Bankswitch ret -; 90074 -CheckPhoneCall:: ; 90074 (24:4074) +CheckPhoneCall:: ; Check if the phone is ringing in the overworld. call CheckStandingOnEntrance @@ -151,11 +144,11 @@ CheckPhoneCall:: ; 90074 (24:4074) xor a ret -.timecheck ; 900a6 (24:40a6) +.timecheck farcall CheckReceiveCallTimer ret -CheckPhoneContactTimeOfDay: ; 900ad (24:40ad) +CheckPhoneContactTimeOfDay: push hl push bc push de @@ -171,7 +164,7 @@ CheckPhoneContactTimeOfDay: ; 900ad (24:40ad) pop hl ret -ChooseRandomCaller: ; 900bf (24:40bf) +ChooseRandomCaller: ; If no one is available to call, don't return anything. ld a, [wEngineBuffer3] and a @@ -198,7 +191,7 @@ ChooseRandomCaller: ; 900bf (24:40bf) xor a ret -GetAvailableCallers: ; 900de (24:40de) +GetAvailableCallers: farcall CheckTime ld a, c ld [wEngineBuffer1], a @@ -246,7 +239,7 @@ GetAvailableCallers: ; 900de (24:40de) jr nz, .loop ret -CheckSpecialPhoneCall:: ; 90136 (24:4136) +CheckSpecialPhoneCall:: ld a, [wSpecialPhoneCallID] and a jr z, .NoPhoneCall @@ -288,14 +281,13 @@ CheckSpecialPhoneCall:: ; 90136 (24:4136) .NoPhoneCall: xor a ret -; 90173 (24:4173) .script ; 0x90173 pause 30 jump Script_ReceivePhoneCall ; 0x90178 -.DoSpecialPhoneCall: ; 90178 (24:4178) +.DoSpecialPhoneCall: ld a, [wSpecialPhoneCallID] dec a ld c, a @@ -305,7 +297,7 @@ CheckSpecialPhoneCall:: ; 90136 (24:4136) call AddNTimes ret -SpecialCallOnlyWhenOutside: ; 90188 +SpecialCallOnlyWhenOutside: ld a, [wEnvironment] cp TOWN jr z, .outside @@ -318,11 +310,11 @@ SpecialCallOnlyWhenOutside: ; 90188 scf ret -SpecialCallWhereverYouAre: ; 90197 +SpecialCallWhereverYouAre: scf ret -Function90199: ; 90199 (24:4199) +Function90199: ; Don't do the call if you're in a link communication ld a, [wLinkMode] and a @@ -388,7 +380,6 @@ Function90199: ; 90199 (24:4199) ld de, UnknownScript_0x90205 call ExecuteCallbackScript ret -; 90205 (24:4205) UnknownScript_0x90205: ; 0x90205 ptcall wd002 @@ -400,7 +391,7 @@ UnknownScript_0x90209: ; 0x90209 return ; 0x9020d -LoadCallerScript: ; 9020d (24:420d) +LoadCallerScript: nop nop ld a, e @@ -422,9 +413,8 @@ LoadCallerScript: ; 9020d (24:420d) ld bc, 12 call FarCopyBytes ret -; 90233 (24:4233) -WrongNumber: ; 90233 +WrongNumber: db TRAINER_NONE, PHONE_00 dba .script .script @@ -434,7 +424,6 @@ WrongNumber: ; 90233 ; Huh? Sorry, wrong number! text_jump UnknownText_0x1c5565 db "@" -; 90241 Script_ReceivePhoneCall: ; 0x90241 refreshscreen @@ -454,7 +443,6 @@ Script_SpecialBillCall:: ; 0x90255 .LoadBillScript: ld e, PHONE_BILL jp LoadCallerScript -; 90261 UnknownScript_0x90261: ; 0x90261 callasm .LoadElmScript @@ -464,16 +452,14 @@ UnknownScript_0x90261: ; 0x90261 .LoadElmScript: ld e, PHONE_ELM jp LoadCallerScript -; 9026f -RingTwice_StartCall: ; 9026f +RingTwice_StartCall: call .Ring call .Ring farcall StubbedTrainerRankings_PhoneCalls ret -; 9027c -.Ring: ; 9027c (24:427c) +.Ring: call Phone_StartRinging call Phone_Wait20Frames call Phone_CallerTextboxWithName @@ -483,13 +469,13 @@ RingTwice_StartCall: ; 9026f call Phone_CallerTextboxWithName ret -Phone_CallerTextboxWithName: ; 90292 (24:4292) +Phone_CallerTextboxWithName: ld a, [wCurrentCaller] ld b, a call Function90363 ret -PhoneCall:: ; 9029a +PhoneCall:: ld a, b ld [wPhoneScriptBank], a ld a, e @@ -500,9 +486,8 @@ PhoneCall:: ; 9029a call Phone_FirstOfTwoRings farcall StubbedTrainerRankings_PhoneCalls ret -; 902b3 -Phone_FirstOfTwoRings: ; 902b3 +Phone_FirstOfTwoRings: call Phone_StartRinging call Phone_Wait20Frames call Phone_CallerTextboxWithName2 @@ -511,9 +496,8 @@ Phone_FirstOfTwoRings: ; 902b3 call Phone_Wait20Frames call Phone_CallerTextboxWithName2 ret -; 902c9 -Phone_CallerTextboxWithName2: ; 902c9 +Phone_CallerTextboxWithName2: call Phone_CallerTextbox hlcoord 1, 2 ld [hl], "☎" @@ -527,15 +511,14 @@ Phone_CallerTextboxWithName2: ; 902c9 ld d, a call FarPlaceString ret -; 902e3 -Phone_NoSignal: ; 902e3 (24:42e3) +Phone_NoSignal: ld de, SFX_NO_SIGNAL call PlaySFX jr Phone_CallEnd -HangUp:: ; 902eb +HangUp:: call HangUp_Beep call HangUp_Wait20Frames Phone_CallEnd: @@ -552,33 +535,28 @@ Phone_CallEnd: call HangUp_BoopOff call HangUp_Wait20Frames ret -; 90316 -Function90316: ; 90316 +Function90316: ld de, SFX_SHUT_DOWN_PC call PlaySFX ret -; 9031d -HangUp_Beep: ; 9031d +HangUp_Beep: ld hl, UnknownText_0x9032a call PrintText ld de, SFX_HANG_UP call PlaySFX ret -; 9032a -UnknownText_0x9032a: ; 9032a +UnknownText_0x9032a: text_jump UnknownText_0x1c5580 db "@" -; 9032f -HangUp_BoopOn: ; 9032f +HangUp_BoopOn: ld hl, UnknownText_0x90336 call PrintText ret -; 90336 UnknownText_0x90336: ; 0x90336 text_jump UnknownText_0x1c5588 @@ -586,12 +564,11 @@ UnknownText_0x90336: ; 0x90336 ; 0x9033b -HangUp_BoopOff: ; 9033b +HangUp_BoopOff: call SpeechTextBox ret -; 9033f -Phone_StartRinging: ; 9033f +Phone_StartRinging: call WaitSFX ld de, SFX_CALL call PlaySFX @@ -599,9 +576,8 @@ Phone_StartRinging: ; 9033f call UpdateSprites farcall PhoneRing_CopyTilemapAtOnce ret -; 90355 -HangUp_Wait20Frames: ; 90355 +HangUp_Wait20Frames: jr Phone_Wait20Frames Phone_Wait20Frames: @@ -609,10 +585,9 @@ Phone_Wait20Frames: call DelayFrames farcall PhoneRing_CopyTilemapAtOnce ret -; 90363 -Function90363: ; 90363 (24:4363) +Function90363: push bc call Phone_CallerTextbox hlcoord 1, 1 @@ -626,16 +601,15 @@ Function90363: ; 90363 (24:4363) ret -Phone_CallerTextbox: ; 90375 +Phone_CallerTextbox: hlcoord 0, 0 ld b, 2 ld c, SCREEN_WIDTH - 2 call TextBox ret -; 90380 -Function90380: ; 90380 (24:4380) +Function90380: ld h, d ld l, e ld a, b @@ -643,7 +617,7 @@ Function90380: ; 90380 (24:4380) call GetCallerName ret -CheckCanDeletePhoneNumber: ; 9038a (24:438a) +CheckCanDeletePhoneNumber: ld a, c call GetCallerTrainerClass ld a, c @@ -657,7 +631,7 @@ CheckCanDeletePhoneNumber: ; 9038a (24:438a) ld c, $1 ret -GetCallerTrainerClass: ; 9039a +GetCallerTrainerClass: push hl ld hl, PhoneContacts + PHONE_CONTACT_TRAINER_CLASS ld bc, PHONE_TABLE_WIDTH @@ -667,10 +641,9 @@ GetCallerTrainerClass: ; 9039a ld c, a pop hl ret -; 903a9 -GetCallerName: ; 903a9 (24:43a9) +GetCallerName: ld a, c and a jr z, .NotTrainer @@ -702,11 +675,10 @@ GetCallerName: ; 903a9 (24:43a9) pop hl call PlaceString ret -; 903d6 (24:43d6) INCLUDE "data/phone/non_trainer_names.asm" -Phone_GetTrainerName: ; 90423 (24:4423) +Phone_GetTrainerName: push hl push bc farcall GetTrainerName @@ -714,7 +686,7 @@ Phone_GetTrainerName: ; 90423 (24:4423) pop hl ret -Phone_GetTrainerClassName: ; 9042e (24:442e) +Phone_GetTrainerClassName: push hl push bc farcall GetTrainerClassName @@ -722,7 +694,7 @@ Phone_GetTrainerClassName: ; 9042e (24:442e) pop hl ret -GetCallerLocation: ; 90439 +GetCallerLocation: ld a, [wCurrentCaller] call GetCallerTrainerClass ld d, c @@ -742,7 +714,6 @@ GetCallerLocation: ; 90439 pop bc pop de ret -; 9045f INCLUDE "data/phone/phone_contacts.asm" diff --git a/engine/phone/phone_scripts.asm b/engine/phone/phone_scripts.asm index 6a48136341f..45856ad4601 100644 --- a/engine/phone/phone_scripts.asm +++ b/engine/phone/phone_scripts.asm @@ -294,7 +294,6 @@ ElmPhoneScript2: ; 0xbd081 farwritetext ElmPhoneUnusedText specialphonecall SPECIALCALL_NONE end -; bd0d0 ; Jack diff --git a/engine/phone/phonering_copytilemapatonce.asm b/engine/phone/phonering_copytilemapatonce.asm index b0d4ffa1e99..41f92a5e36e 100644 --- a/engine/phone/phonering_copytilemapatonce.asm +++ b/engine/phone/phonering_copytilemapatonce.asm @@ -1,4 +1,4 @@ -PhoneRing_CopyTilemapAtOnce: ; 4d188 +PhoneRing_CopyTilemapAtOnce: ld a, [hCGB] and a jp z, WaitBGMap @@ -41,7 +41,7 @@ PhoneRing_CopyTilemapAtOnce: ; 4d188 ld [hBGMapMode], a ret -.CopyTilemapAtOnce: ; 4d1cb +.CopyTilemapAtOnce: ld [hSPBuffer], sp ld sp, hl ld a, [hBGMapAddress + 1] diff --git a/engine/pokedex/new_pokedex_entry.asm b/engine/pokedex/new_pokedex_entry.asm index 365cf1b7095..765f2f576d2 100644 --- a/engine/pokedex/new_pokedex_entry.asm +++ b/engine/pokedex/new_pokedex_entry.asm @@ -1,4 +1,4 @@ -NewPokedexEntry: ; fb877 +NewPokedexEntry: ld a, [hMapAnims] push af xor a @@ -32,9 +32,8 @@ NewPokedexEntry: ; fb877 pop af ld [hMapAnims], a ret -; fb8c8 -.ReturnFromDexRegistration: ; fb8c8 +.ReturnFromDexRegistration: call ClearTileMap call LoadFontsExtra call LoadStandardFont @@ -49,4 +48,3 @@ NewPokedexEntry: ; fb877 call GetSGBLayout call SetPalettes ret -; fb8f1 diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm index 2e36175ab50..147a0ff15d5 100644 --- a/engine/pokedex/pokedex.asm +++ b/engine/pokedex/pokedex.asm @@ -18,7 +18,7 @@ POKEDEX_SCX EQU 5 GLOBAL POKEDEX_SCX -Pokedex: ; 40000 +Pokedex: ld a, [hWX] ld l, a @@ -77,7 +77,7 @@ Pokedex: ; 40000 ld [hWY], a ret -InitPokedex: ; 40063 +InitPokedex: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -106,7 +106,7 @@ InitPokedex: ; 40063 call Pokedex_ResetBGMapMode ret -Pokedex_CheckUnlockedUnownMode: ; 400a2 +Pokedex_CheckUnlockedUnownMode: ld a, [wStatusFlags] bit STATUSFLAGS_UNOWN_DEX_F, a jr nz, .unlocked @@ -120,7 +120,7 @@ Pokedex_CheckUnlockedUnownMode: ; 400a2 ld [wUnlockedUnownMode], a ret -Pokedex_InitCursorPosition: ; 400b4 +Pokedex_InitCursorPosition: ld hl, wPokedexOrder ld a, [wPrevDexEntry] and a @@ -162,7 +162,7 @@ Pokedex_InitCursorPosition: ; 400b4 .done ret -Pokedex_GetLandmark: ; 400ed +Pokedex_GetLandmark: ld a, [wMapGroup] ld b, a ld a, [wMapNumber] @@ -182,13 +182,13 @@ Pokedex_GetLandmark: ; 400ed ld [wDexCurrentLocation], a ret -Pokedex_RunJumptable: ; 4010b +Pokedex_RunJumptable: ld a, [wJumptableIndex] ld hl, .Jumptable call Pokedex_LoadPointer jp hl -.Jumptable: ; 40115 (10:4115) +.Jumptable: ; entries correspond to DEXSTATE_* constants dw Pokedex_InitMainScreen dw Pokedex_UpdateMainScreen @@ -205,17 +205,17 @@ Pokedex_RunJumptable: ; 4010b dw Pokedex_UpdateUnownMode dw Pokedex_Exit -Pokedex_IncrementDexPointer: ; 40131 (10:4131) +Pokedex_IncrementDexPointer: ld hl, wJumptableIndex inc [hl] ret -Pokedex_Exit: ; 40136 (10:4136) +Pokedex_Exit: ld hl, wJumptableIndex set 7, [hl] ret -Pokedex_InitMainScreen: ; 4013c (10:413c) +Pokedex_InitMainScreen: xor a ld [hBGMapMode], a call ClearSprites @@ -263,7 +263,7 @@ Pokedex_InitMainScreen: ; 4013c (10:413c) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateMainScreen: ; 401ae (10:41ae) +Pokedex_UpdateMainScreen: ld hl, hJoyPressed ld a, [hl] and B_BUTTON @@ -324,7 +324,7 @@ Pokedex_UpdateMainScreen: ; 401ae (10:41ae) ld [wJumptableIndex], a ret -Pokedex_InitDexEntryScreen: ; 40217 (10:4217) +Pokedex_InitDexEntryScreen: call LowVolume xor a ; page 1 ld [wPokedexStatus], a @@ -350,7 +350,7 @@ Pokedex_InitDexEntryScreen: ; 40217 (10:4217) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateDexEntryScreen: ; 40258 (10:4258) +Pokedex_UpdateDexEntryScreen: ld de, DexEntryScreen_ArrowCursorData call Pokedex_MoveArrowCursor ld hl, hJoyPressed @@ -384,7 +384,7 @@ Pokedex_UpdateDexEntryScreen: ; 40258 (10:4258) ld [wJumptableIndex], a ret -Pokedex_Page: ; 40292 +Pokedex_Page: ld a, [wPokedexStatus] xor 1 ; toggle page ld [wPokedexStatus], a @@ -394,7 +394,7 @@ Pokedex_Page: ; 40292 call WaitBGMap ret -Pokedex_ReinitDexEntryScreen: ; 402aa (10:42aa) +Pokedex_ReinitDexEntryScreen: ; Reinitialize the Pokédex entry screen after changing the selected mon. call Pokedex_BlackOutBG xor a ; page 1 @@ -420,7 +420,7 @@ Pokedex_ReinitDexEntryScreen: ; 402aa (10:42aa) dec [hl] ret -DexEntryScreen_ArrowCursorData: ; 402e8 +DexEntryScreen_ArrowCursorData: db D_RIGHT | D_LEFT, 4 dwcoord 1, 17 ; PAGE dwcoord 6, 17 ; AREA @@ -428,13 +428,13 @@ DexEntryScreen_ArrowCursorData: ; 402e8 dwcoord 15, 17 ; PRNT -DexEntryScreen_MenuActionJumptable: ; 402f2 +DexEntryScreen_MenuActionJumptable: dw Pokedex_Page dw .Area dw .Cry dw .Print -.Area: ; 402fa +.Area: call Pokedex_BlackOutBG xor a ld [hSCX], a @@ -465,7 +465,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 call Pokedex_GetSGBLayout ret -.Cry: ; 40340 +.Cry: call Pokedex_GetSelectedMon ld a, [wd265] call GetCryIndex @@ -474,7 +474,7 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 call PlayCry ret -.Print: ; 4034f +.Print: call Pokedex_ApplyPrintPals xor a ld [hSCX], a @@ -502,14 +502,14 @@ DexEntryScreen_MenuActionJumptable: ; 402f2 call Pokedex_ApplyUsualPals ret -Pokedex_RedisplayDexEntry: ; 4038d +Pokedex_RedisplayDexEntry: call Pokedex_DrawDexEntryScreenBG call Pokedex_GetSelectedMon farcall DisplayDexEntry call Pokedex_DrawFootprint ret -Pokedex_InitOptionScreen: ; 4039d (10:439d) +Pokedex_InitOptionScreen: xor a ld [hBGMapMode], a call ClearSprites @@ -524,7 +524,7 @@ Pokedex_InitOptionScreen: ; 4039d (10:439d) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateOptionScreen: ; 403be (10:43be) +Pokedex_UpdateOptionScreen: ld a, [wUnlockedUnownMode] and a jr nz, .okay @@ -556,37 +556,37 @@ Pokedex_UpdateOptionScreen: ; 403be (10:43be) ld [wJumptableIndex], a ret -.NoUnownModeArrowCursorData: ; 403f3 +.NoUnownModeArrowCursorData: db D_UP | D_DOWN, 3 dwcoord 2, 4 ; NEW dwcoord 2, 6 ; OLD dwcoord 2, 8 ; ABC -.ArrowCursorData: ; 403fb +.ArrowCursorData: db D_UP | D_DOWN, 4 dwcoord 2, 4 ; NEW dwcoord 2, 6 ; OLD dwcoord 2, 8 ; ABC dwcoord 2, 10 ; UNOWN -.MenuActionJumptable: ; 40405 (10:4405) +.MenuActionJumptable: dw .MenuAction_NewMode dw .MenuAction_OldMode dw .MenuAction_ABCMode dw .MenuAction_UnownMode -.MenuAction_NewMode: ; 4040d (10:440d) +.MenuAction_NewMode: ld b, DEXMODE_NEW jr .ChangeMode -.MenuAction_OldMode: ; 40411 (10:4411) +.MenuAction_OldMode: ld b, DEXMODE_OLD jr .ChangeMode -.MenuAction_ABCMode: ; 40415 (10:4415) +.MenuAction_ABCMode: ld b, DEXMODE_ABC -.ChangeMode: ; 40417 (10:4417) +.ChangeMode: ld a, [wCurrentDexMode] cp b jr z, .skip_changing_mode ; Skip if new mode is same as current. @@ -606,13 +606,13 @@ Pokedex_UpdateOptionScreen: ; 403be (10:43be) ld [wJumptableIndex], a ret -.MenuAction_UnownMode: ; 4043a (10:443a) +.MenuAction_UnownMode: call Pokedex_BlackOutBG ld a, DEXSTATE_UNOWN_MODE ld [wJumptableIndex], a ret -Pokedex_InitSearchScreen: ; 40443 (10:4443) +Pokedex_InitSearchScreen: xor a ld [hBGMapMode], a call ClearSprites @@ -632,7 +632,7 @@ Pokedex_InitSearchScreen: ; 40443 (10:4443) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateSearchScreen: ; 40471 (10:4471) +Pokedex_UpdateSearchScreen: ld de, .ArrowCursorData call Pokedex_MoveArrowCursor call Pokedex_UpdateSearchMonType @@ -658,25 +658,25 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471) ld [wJumptableIndex], a ret -.ArrowCursorData: ; 4049e +.ArrowCursorData: db D_UP | D_DOWN, 4 dwcoord 2, 4 ; TYPE 1 dwcoord 2, 6 ; TYPE 2 dwcoord 2, 13 ; BEGIN SEARCH dwcoord 2, 15 ; CANCEL -.MenuActionJumptable: ; 404a8 +.MenuActionJumptable: dw .MenuAction_MonSearchType dw .MenuAction_MonSearchType dw .MenuAction_BeginSearch dw .MenuAction_Cancel -.MenuAction_MonSearchType: ; 404b0 +.MenuAction_MonSearchType: call Pokedex_NextSearchMonType call Pokedex_PlaceSearchScreenTypeStrings ret -.MenuAction_BeginSearch: ; 404b7 +.MenuAction_BeginSearch: call Pokedex_SearchForMons farcall AnimateDexSearchSlowpoke ld a, [wDexSearchResultCount] @@ -710,13 +710,13 @@ Pokedex_UpdateSearchScreen: ; 40471 (10:4471) ld [wJumptableIndex], a ret -.MenuAction_Cancel: ; 40501 +.MenuAction_Cancel: call Pokedex_BlackOutBG ld a, DEXSTATE_MAIN_SCR ld [wJumptableIndex], a ret -Pokedex_InitSearchResultsScreen: ; 4050a (10:450a) +Pokedex_InitSearchResultsScreen: xor a ld [hBGMapMode], a xor a @@ -751,7 +751,7 @@ Pokedex_InitSearchResultsScreen: ; 4050a (10:450a) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562) +Pokedex_UpdateSearchResultsScreen: ld hl, hJoyPressed ld a, [hl] and B_BUTTON @@ -797,7 +797,7 @@ Pokedex_UpdateSearchResultsScreen: ; 40562 (10:4562) ld [hWX], a ret -Pokedex_InitUnownMode: ; 405bd (10:45bd) +Pokedex_InitUnownMode: call Pokedex_LoadUnownFont call Pokedex_DrawUnownModeBG xor a @@ -811,7 +811,7 @@ Pokedex_InitUnownMode: ; 405bd (10:45bd) call Pokedex_IncrementDexPointer ret -Pokedex_UpdateUnownMode: ; 405df (10:45df) +Pokedex_UpdateUnownMode: ld hl, hJoyPressed ld a, [hl] and A_BUTTON | B_BUTTON @@ -838,7 +838,7 @@ Pokedex_UpdateUnownMode: ; 405df (10:45df) .done ret -Pokedex_UnownModeHandleDPadInput: ; 40610 (10:4610) +Pokedex_UnownModeHandleDPadInput: ld hl, hJoyLast ld a, [hl] and D_RIGHT @@ -883,15 +883,15 @@ Pokedex_UnownModeHandleDPadInput: ; 40610 (10:4610) call DelayFrame ret -Pokedex_UnownModeEraseCursor: ; 40654 (10:4654) +Pokedex_UnownModeEraseCursor: ld c, " " jr Pokedex_UnownModeUpdateCursorGfx -Pokedex_UnownModePlaceCursor: ; 40658 (10:4658) +Pokedex_UnownModePlaceCursor: ld a, [wDexCurrentUnownIndex] ld c, $5a ; diamond cursor -Pokedex_UnownModeUpdateCursorGfx: ; 4065d (10:465d) +Pokedex_UnownModeUpdateCursorGfx: ld e, a ld d, 0 ld hl, UnownModeLetterAndCursorCoords + 2 @@ -904,7 +904,7 @@ endr ld [hl], c ret -Pokedex_NextOrPreviousDexEntry: ; 4066c (10:466c) +Pokedex_NextOrPreviousDexEntry: ld a, [wDexListingCursor] ld [wBackupDexListingCursor], a ld a, [wDexListingScrollOffset] @@ -955,7 +955,7 @@ Pokedex_NextOrPreviousDexEntry: ; 4066c (10:466c) and a ret -Pokedex_ListingHandleDPadInput: ; 406c5 (10:46c5) +Pokedex_ListingHandleDPadInput: ; Handles D-pad input for a list of Pokémon. ld a, [wDexListingHeight] ld d, a @@ -979,7 +979,7 @@ Pokedex_ListingHandleDPadInput: ; 406c5 (10:46c5) jr nz, Pokedex_ListingMoveDownOnePage jr Pokedex_ListingPosStayedSame -Pokedex_ListingMoveCursorUp: ; 406ea (10:46ea) +Pokedex_ListingMoveCursorUp: ld hl, wDexListingCursor ld a, [hl] and a @@ -994,7 +994,7 @@ Pokedex_ListingMoveCursorUp: ; 406ea (10:46ea) dec [hl] jr Pokedex_ListingPosChanged -Pokedex_ListingMoveCursorDown: ; 406fe (10:46fe) +Pokedex_ListingMoveCursorDown: ld hl, wDexListingCursor ld a, [hl] inc a @@ -1012,7 +1012,7 @@ Pokedex_ListingMoveCursorDown: ; 406fe (10:46fe) inc [hl] jr Pokedex_ListingPosChanged -Pokedex_ListingMoveUpOnePage: ; 40716 (10:4716) +Pokedex_ListingMoveUpOnePage: ld hl, wDexListingScrollOffset ld a, [hl] and a @@ -1028,7 +1028,7 @@ Pokedex_ListingMoveUpOnePage: ; 40716 (10:4716) ld [hl], a jr Pokedex_ListingPosChanged -Pokedex_ListingMoveDownOnePage: ; 40728 (10:4728) +Pokedex_ListingMoveDownOnePage: ; When moving down a page, the return value always report a change in position. ld hl, wDexListingScrollOffset ld a, d @@ -1048,15 +1048,15 @@ Pokedex_ListingMoveDownOnePage: ; 40728 (10:4728) ld [hl], a jr Pokedex_ListingPosChanged -Pokedex_ListingPosStayedSame: ; 4073d (10:473d) +Pokedex_ListingPosStayedSame: and a ret -Pokedex_ListingPosChanged: ; 4073f (10:473f) +Pokedex_ListingPosChanged: scf ret -Pokedex_FillColumn: ; 40741 +Pokedex_FillColumn: ; Fills a column starting at HL, going downwards. ; B is the height of the column and A is the tile it's filled with. push de @@ -1070,7 +1070,7 @@ Pokedex_FillColumn: ; 40741 ret -Pokedex_DrawMainScreenBG: ; 4074c (10:474c) +Pokedex_DrawMainScreenBG: ; Draws the left sidebar and the bottom bar on the main screen. hlcoord 0, 17 ld de, String_START_SEARCH @@ -1127,17 +1127,17 @@ Pokedex_DrawMainScreenBG: ; 4074c (10:474c) call Pokedex_PlaceFrontpicTopLeftCorner ret -String_SEEN: ; 407e1 +String_SEEN: db "SEEN", -1 -String_OWN: ; 407e6 +String_OWN: db "OWN", -1 -String_SELECT_OPTION: ; 407ea +String_SELECT_OPTION: db $3b, $48, $49, $4a, $44, $45, $46, $47 ; SELECT > OPTION ; fallthrough -String_START_SEARCH: ; 407f2 +String_START_SEARCH: db $3c, $3b, $41, $42, $43, $4b, $4c, $4d, $4e, $3c, -1 ; START > SEARCH -Pokedex_DrawDexEntryScreenBG: ; 407fd +Pokedex_DrawDexEntryScreenBG: call Pokedex_FillBackgroundColor2 hlcoord 0, 0 lb bc, 15, 18 @@ -1169,16 +1169,16 @@ Pokedex_DrawDexEntryScreenBG: ; 407fd call Pokedex_PlaceFrontpicTopLeftCorner ret -.Unused: ; 4084f +.Unused: db $5c, $5d, -1 ; No. -.Height: ; 40852 +.Height: db "HT ?", $5e, "??", $5f, -1 ; HT ?'??" -.Weight: ; 4085c +.Weight: db "WT ???lb", -1 ; WT ???lb -.MenuItems: ; 40867 +.MenuItems: db $3b, " PAGE AREA CRY PRNT", -1 -Pokedex_DrawOptionScreenBG: ; 4087c (10:487c) +Pokedex_DrawOptionScreenBG: call Pokedex_FillBackgroundColor2 hlcoord 0, 2 lb bc, 8, 18 @@ -1200,19 +1200,19 @@ Pokedex_DrawOptionScreenBG: ; 4087c (10:487c) call PlaceString ret -.Title: ; 408b2 +.Title: db $3b, " OPTION ", $3c, -1 -.Modes: ; 408bd +.Modes: db "NEW #DEX MODE" next "OLD #DEX MODE" next "A to Z MODE" db "@" -.UnownMode: ; 408e5 +.UnownMode: db "UNOWN MODE@" -Pokedex_DrawSearchScreenBG: ; 408f0 (10:48f0) +Pokedex_DrawSearchScreenBG: call Pokedex_FillBackgroundColor2 hlcoord 0, 2 lb bc, 14, 18 @@ -1234,23 +1234,23 @@ Pokedex_DrawSearchScreenBG: ; 408f0 (10:48f0) call PlaceString ret -.Title: ; 4092a +.Title: db $3b, " SEARCH ", $3c, -1 -.TypeLeftRightArrows: ; 40935 +.TypeLeftRightArrows: db $3d, " ", $3e, -1 -.Types: ; 40940 +.Types: db "TYPE1" next "TYPE2" db "@" -.Menu: ; 4094c +.Menu: db "BEGIN SEARCH!!" next "CANCEL" db "@" -Pokedex_DrawSearchResultsScreenBG: ; 40962 (10:4962) +Pokedex_DrawSearchResultsScreenBG: call Pokedex_FillBackgroundColor2 hlcoord 0, 0 lb bc, 7, 7 @@ -1280,13 +1280,13 @@ Pokedex_DrawSearchResultsScreenBG: ; 40962 (10:4962) call Pokedex_PlaceFrontpicTopLeftCorner ret -.BottomWindowText: ; 409ae +.BottomWindowText: db "SEARCH RESULTS" next " TYPE" next " FOUND!" db "@" -Pokedex_PlaceSearchResultsTypeStrings: ; 409cf (10:49cf) +Pokedex_PlaceSearchResultsTypeStrings: ld a, [wDexSearchMonType1] hlcoord 0, 14 call Pokedex_PlaceTypeString @@ -1304,7 +1304,7 @@ Pokedex_PlaceSearchResultsTypeStrings: ; 409cf (10:49cf) .done ret -Pokedex_DrawUnownModeBG: ; 409f1 (10:49f1) +Pokedex_DrawUnownModeBG: call Pokedex_FillBackgroundColor2 hlcoord 2, 1 lb bc, 10, 13 @@ -1347,7 +1347,7 @@ endr ld [wDexUnownCount], a ret -UnownModeLetterAndCursorCoords: ; 40a3e +UnownModeLetterAndCursorCoords: ; entries correspond to Unown forms ; letter, cursor dwcoord 4,11, 3,11 ; A @@ -1377,16 +1377,16 @@ UnownModeLetterAndCursorCoords: ; 40a3e dwcoord 14, 9, 15, 9 ; Y dwcoord 14,10, 15,10 ; Z -Pokedex_FillBackgroundColor2: ; 40aa6 +Pokedex_FillBackgroundColor2: hlcoord 0, 0 ld a, $32 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call ByteFill ret -Pokedex_PlaceFrontpicTopLeftCorner: ; 40ab2 +Pokedex_PlaceFrontpicTopLeftCorner: hlcoord 1, 1 -Pokedex_PlaceFrontpicAtHL: ; 40ab5 +Pokedex_PlaceFrontpicAtHL: xor a ld b, $7 .row @@ -1407,7 +1407,7 @@ Pokedex_PlaceFrontpicAtHL: ; 40ab5 jr nz, .row ret -Pokedex_PlaceString: ; 40acd +Pokedex_PlaceString: .loop ld a, [de] cp -1 @@ -1417,7 +1417,7 @@ Pokedex_PlaceString: ; 40acd jr .loop -Pokedex_PlaceBorder: ; 40ad5 +Pokedex_PlaceBorder: push hl ld a, $33 ld [hli], a @@ -1449,7 +1449,7 @@ Pokedex_PlaceBorder: ; 40ad5 ld [hl], a ret -.FillRow: ; 40b06 +.FillRow: ld e, c .row_loop ld a, e @@ -1461,7 +1461,7 @@ Pokedex_PlaceBorder: ; 40ad5 jr .row_loop -Pokedex_PrintListing: ; 40b0f (10:4b0f) +Pokedex_PrintListing: ; Prints the list of Pokémon on the main Pokédex screen. ; This check is completely useless. @@ -1512,7 +1512,7 @@ Pokedex_PrintListing: ; 40b0f (10:4b0f) call Pokedex_LoadSelectedMonTiles ret -.PrintEntry: ; 40b55 (10:4b55) +.PrintEntry: ; Prints one entry in the list of Pokémon on the main Pokédex screen. and a ret z @@ -1526,7 +1526,7 @@ Pokedex_PrintListing: ; 40b0f (10:4b0f) call PlaceString ret -Pokedex_PrintNumberIfOldMode: ; 40b6a (10:4b6a) +Pokedex_PrintNumberIfOldMode: ld a, [wCurrentDexMode] cp DEXMODE_OLD jr z, .printnum @@ -1542,7 +1542,7 @@ Pokedex_PrintNumberIfOldMode: ; 40b6a (10:4b6a) pop hl ret -Pokedex_PlaceCaughtSymbolIfCaught: ; 40b82 (10:4b82) +Pokedex_PlaceCaughtSymbolIfCaught: call Pokedex_CheckCaught jr nz, .place_caught_symbol inc hl @@ -1553,7 +1553,7 @@ Pokedex_PlaceCaughtSymbolIfCaught: ; 40b82 (10:4b82) ld [hli], a ret -Pokedex_PlaceDefaultStringIfNotSeen: ; 40b8d (10:4b8d) +Pokedex_PlaceDefaultStringIfNotSeen: call Pokedex_CheckSeen ret nz inc hl @@ -1562,10 +1562,10 @@ Pokedex_PlaceDefaultStringIfNotSeen: ; 40b8d (10:4b8d) scf ret -.NameNotSeen: ; 40b9a +.NameNotSeen: db "-----@" -Pokedex_DrawFootprint: ; 40ba0 +Pokedex_DrawFootprint: hlcoord 18, 1 ld a, $62 ld [hli], a @@ -1579,7 +1579,7 @@ Pokedex_DrawFootprint: ; 40ba0 ret -Pokedex_GetSelectedMon: ; 40bb1 +Pokedex_GetSelectedMon: ; Gets the species of the currently selected Pokémon. This corresponds to the ; position of the cursor in the main listing, but this function can be used ; on all Pokédex screens. @@ -1595,7 +1595,7 @@ Pokedex_GetSelectedMon: ; 40bb1 ret -Pokedex_CheckCaught: ; 40bc4 (10:4bc4) +Pokedex_CheckCaught: push de push hl ld a, [wd265] @@ -1606,7 +1606,7 @@ Pokedex_CheckCaught: ; 40bc4 (10:4bc4) ret -Pokedex_CheckSeen: ; 40bd0 +Pokedex_CheckSeen: push de push hl ld a, [wd265] @@ -1618,7 +1618,7 @@ Pokedex_CheckSeen: ; 40bd0 -Pokedex_OrderMonsByMode: ; 40bdc +Pokedex_OrderMonsByMode: ld hl, wPokedexOrder ld bc, wPokedexOrderEnd - wPokedexOrder xor a @@ -1628,12 +1628,12 @@ Pokedex_OrderMonsByMode: ; 40bdc call Pokedex_LoadPointer jp hl -.Jumptable: ; 40bf0 (10:4bf0) +.Jumptable: dw .NewMode dw .OldMode dw Pokedex_ABCMode -.NewMode: ; 40bf6 (10:4bf6) +.NewMode: ld de, NewPokedexOrder ld hl, wPokedexOrder ld c, NUM_POKEMON @@ -1646,7 +1646,7 @@ Pokedex_OrderMonsByMode: ; 40bdc call .FindLastSeen ret -.OldMode: ; 40c08 (10:4c08) +.OldMode: ld hl, wPokedexOrder ld a, $1 ld c, NUM_POKEMON @@ -1658,7 +1658,7 @@ Pokedex_OrderMonsByMode: ; 40bdc call .FindLastSeen ret -.FindLastSeen: ; 40c18 (10:4c18) +.FindLastSeen: ld hl, wPokedexOrder + NUM_POKEMON - 1 ld d, NUM_POKEMON ld e, d @@ -1675,7 +1675,7 @@ Pokedex_OrderMonsByMode: ; 40bdc ld [wDexListingEnd], a ret -Pokedex_ABCMode: ; 40c30 +Pokedex_ABCMode: xor a ld [wDexListingEnd], a ld hl, wPokedexOrder @@ -1717,7 +1717,7 @@ INCLUDE "data/pokemon/dex_order_alpha.asm" INCLUDE "data/pokemon/dex_order_new.asm" -Pokedex_DisplayModeDescription: ; 40e5b +Pokedex_DisplayModeDescription: xor a ld [hBGMapMode], a hlcoord 0, 12 @@ -1734,29 +1734,29 @@ Pokedex_DisplayModeDescription: ; 40e5b ld [hBGMapMode], a ret -.Modes: ; 40e7d +.Modes: dw .NewMode dw .OldMode dw .ABCMode dw .UnownMode -.NewMode: ; 40e85 +.NewMode: db " are listed by" next "evolution type.@" -.OldMode: ; 40ea6 +.OldMode: db " are listed by" next "official type.@" -.ABCMode: ; 40ec6 +.ABCMode: db " are listed" next "alphabetically.@" -.UnownMode: ; 40ee4 +.UnownMode: db "UNOWN are listed" next "in catching order.@" -Pokedex_DisplayChangingModesMessage: ; 40f08 (10:4f08) +Pokedex_DisplayChangingModesMessage: xor a ld [hBGMapMode], a hlcoord 0, 12 @@ -1775,11 +1775,11 @@ Pokedex_DisplayChangingModesMessage: ; 40f08 (10:4f08) call DelayFrames ret -String_ChangingModesPleaseWait: ; 40f32 +String_ChangingModesPleaseWait: db "Changing modes." next "Please wait.@" -Pokedex_UpdateSearchMonType: ; 40f4f (10:4f4f) +Pokedex_UpdateSearchMonType: ld a, [wDexArrowCursorPosIndex] cp 2 jr nc, .no_change @@ -1794,7 +1794,7 @@ Pokedex_UpdateSearchMonType: ; 40f4f (10:4f4f) and a ret -Pokedex_PrevSearchMonType: ; 40f65 +Pokedex_PrevSearchMonType: ld a, [wDexArrowCursorPosIndex] and a jr nz, .type2 @@ -1821,7 +1821,7 @@ Pokedex_PrevSearchMonType: ; 40f65 scf ret -Pokedex_NextSearchMonType: ; 40f84 +Pokedex_NextSearchMonType: ld a, [wDexArrowCursorPosIndex] and a jr nz, .type2 @@ -1850,7 +1850,7 @@ Pokedex_NextSearchMonType: ; 40f84 scf ret -Pokedex_PlaceSearchScreenTypeStrings: ; 40fa8 (10:4fa8) +Pokedex_PlaceSearchScreenTypeStrings: xor a ld [hBGMapMode], a hlcoord 9, 3 @@ -1867,7 +1867,7 @@ Pokedex_PlaceSearchScreenTypeStrings: ; 40fa8 (10:4fa8) ld [hBGMapMode], a ret -Pokedex_PlaceTypeString: ; 40fcd (10:4fcd) +Pokedex_PlaceTypeString: push hl ld e, a ld d, 0 @@ -1883,7 +1883,7 @@ endr INCLUDE "data/types/search_strings.asm" -Pokedex_SearchForMons: ; 41086 +Pokedex_SearchForMons: ld a, [wDexSearchMonType2] and a call nz, .Search @@ -1892,7 +1892,7 @@ Pokedex_SearchForMons: ; 41086 call nz, .Search ret -.Search: ; 41095 +.Search: dec a ld e, a ld d, 0 @@ -1960,7 +1960,7 @@ Pokedex_SearchForMons: ; 41086 INCLUDE "data/types/search_types.asm" -Pokedex_DisplayTypeNotFoundMessage: ; 41107 +Pokedex_DisplayTypeNotFoundMessage: xor a ld [hBGMapMode], a hlcoord 0, 12 @@ -1975,11 +1975,11 @@ Pokedex_DisplayTypeNotFoundMessage: ; 41107 call DelayFrames ret -.TypeNotFound: ; 41126 +.TypeNotFound: db "The specified type" next "was not found.@" -Pokedex_UpdateCursorOAM: ; 41148 (10:5148) +Pokedex_UpdateCursorOAM: ld a, [wCurrentDexMode] cp DEXMODE_OLD jp z, Pokedex_PutOldModeCursorOAM @@ -1987,7 +1987,7 @@ Pokedex_UpdateCursorOAM: ; 41148 (10:5148) call Pokedex_PutScrollbarOAM ret -Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157) +Pokedex_PutOldModeCursorOAM: ld hl, .CursorOAM ld a, [wDexListingCursor] or a @@ -1997,7 +1997,7 @@ Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157) call Pokedex_LoadCursorOAM ret -.CursorOAM: ; 41167 +.CursorOAM: dsprite 3, 0, 9, -1, $30, 7 dsprite 2, 0, 9, -1, $31, 7 dsprite 2, 0, 10, -1, $32, 7 @@ -2024,7 +2024,7 @@ Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157) dsprite 4, 0, 20, -2, $30, 7 | X_FLIP | Y_FLIP db -1 -.CursorAtTopOAM: ; 411c8 +.CursorAtTopOAM: ; OAM data for when the cursor is at the top of the list. The tiles at the top ; are cut off so they don't show up outside the list area. dsprite 3, 0, 9, -1, $30, 7 @@ -2053,12 +2053,12 @@ Pokedex_PutOldModeCursorOAM: ; 41157 (10:5157) dsprite 4, 0, 20, -2, $30, 7 | X_FLIP | Y_FLIP db -1 -Pokedex_PutNewModeABCModeCursorOAM: ; 41229 (10:5229) +Pokedex_PutNewModeABCModeCursorOAM: ld hl, .CursorOAM call Pokedex_LoadCursorOAM ret -.CursorOAM: ; 41230 +.CursorOAM: dsprite 3, 3, 9, -1, $30, 7 dsprite 2, 3, 9, -1, $31, 7 dsprite 2, 3, 10, -1, $32, 7 @@ -2081,7 +2081,7 @@ Pokedex_PutNewModeABCModeCursorOAM: ; 41229 (10:5229) dsprite 4, 3, 19, 0, $30, 7 | X_FLIP | Y_FLIP db -1 -Pokedex_UpdateSearchResultsCursorOAM: ; 41281 (10:5281) +Pokedex_UpdateSearchResultsCursorOAM: ld a, [wCurrentDexMode] cp DEXMODE_OLD jp z, Pokedex_PutOldModeCursorOAM @@ -2089,7 +2089,7 @@ Pokedex_UpdateSearchResultsCursorOAM: ; 41281 (10:5281) call Pokedex_LoadCursorOAM ret -.CursorOAM: ; 41290 +.CursorOAM: dsprite 3, 3, 9, -1, $30, 7 dsprite 2, 3, 9, -1, $31, 7 dsprite 2, 3, 10, -1, $32, 7 @@ -2116,7 +2116,7 @@ Pokedex_UpdateSearchResultsCursorOAM: ; 41281 (10:5281) dsprite 4, 3, 20, -2, $30, 7 | X_FLIP | Y_FLIP db -1 -Pokedex_LoadCursorOAM: ; 412f1 (10:52f1) +Pokedex_LoadCursorOAM: ld de, wVirtualOAMSprite00 .loop ld a, [hl] @@ -2140,7 +2140,7 @@ Pokedex_LoadCursorOAM: ; 412f1 (10:52f1) inc de jr .loop -Pokedex_PutScrollbarOAM: ; 4130e (10:530e) +Pokedex_PutScrollbarOAM: ; Writes the OAM data for the scrollbar in the new mode and ABC mode. push de ld a, [wDexListingEnd] @@ -2186,14 +2186,14 @@ Pokedex_PutScrollbarOAM: ; 4130e (10:530e) ld [hl], $0 ret -Pokedex_InitArrowCursor: ; 4134f (10:534f) +Pokedex_InitArrowCursor: xor a ld [wDexArrowCursorPosIndex], a ld [wDexArrowCursorDelayCounter], a ld [wDexArrowCursorBlinkCounter], a ret -Pokedex_MoveArrowCursor: ; 4135a (10:535a) +Pokedex_MoveArrowCursor: ; bc = [de] - 1 ld a, [de] ld b, a @@ -2275,7 +2275,7 @@ Pokedex_MoveArrowCursor: ; 4135a (10:535a) ld [wDexArrowCursorPosIndex], a jr .update_cursor_pos -Pokedex_GetArrowCursorPos: ; 413d4 (10:53d4) +Pokedex_GetArrowCursorPos: ld a, [wDexArrowCursorPosIndex] add a ld l, a @@ -2286,7 +2286,7 @@ Pokedex_GetArrowCursorPos: ; 413d4 (10:53d4) ld l, a ret -Pokedex_BlinkArrowCursor: ; 413e0 (10:53e0) +Pokedex_BlinkArrowCursor: ld hl, wDexArrowCursorBlinkCounter ld a, [hl] inc [hl] @@ -2301,7 +2301,7 @@ Pokedex_BlinkArrowCursor: ; 413e0 (10:53e0) ld [hl], "▶" ret -Pokedex_ArrowCursorDelay: ; 413f5 (10:53f5) +Pokedex_ArrowCursorDelay: ; Updates the delay counter set when moving the arrow cursor. ; Returns whether the delay is active in carry. ld hl, wDexArrowCursorDelayCounter @@ -2313,10 +2313,10 @@ Pokedex_ArrowCursorDelay: ; 413f5 (10:53f5) scf ret -Pokedex_FillBox: ; 413fe (10:53fe) +Pokedex_FillBox: jp FillBoxWithByte -Pokedex_BlackOutBG: ; 41401 (10:5401) +Pokedex_BlackOutBG: ; Make BG palettes black so that the BG becomes all black. ld a, [rSVBK] push af @@ -2329,7 +2329,7 @@ Pokedex_BlackOutBG: ; 41401 (10:5401) pop af ld [rSVBK], a -Pokedex_ApplyPrintPals: ; 41415 +Pokedex_ApplyPrintPals: ld a, $ff call DmgToCgbBGPals ld a, $ff @@ -2337,11 +2337,11 @@ Pokedex_ApplyPrintPals: ; 41415 call DelayFrame ret -Pokedex_GetSGBLayout: ; 41423 +Pokedex_GetSGBLayout: ld b, a call GetSGBLayout -Pokedex_ApplyUsualPals: ; 41427 +Pokedex_ApplyUsualPals: ; This applies the palettes used for most Pokédex screens. ld a, $e4 call DmgToCgbBGPals @@ -2350,7 +2350,7 @@ Pokedex_ApplyUsualPals: ; 41427 ret -Pokedex_LoadPointer: ; 41432 +Pokedex_LoadPointer: ld e, a ld d, 0 add hl, de @@ -2360,7 +2360,7 @@ Pokedex_LoadPointer: ; 41432 ld l, a ret -Pokedex_LoadSelectedMonTiles: ; 4143b +Pokedex_LoadSelectedMonTiles: ; Loads the tiles of the currently selected Pokémon. call Pokedex_GetSelectedMon call Pokedex_CheckSeen @@ -2388,10 +2388,10 @@ Pokedex_LoadSelectedMonTiles: ; 4143b ret -Pokedex_LoadCurrentFootprint: ; 41478 (10:5478) +Pokedex_LoadCurrentFootprint: call Pokedex_GetSelectedMon -Pokedex_LoadAnyFootprint: ; 4147b +Pokedex_LoadAnyFootprint: ld a, [wd265] dec a and %11111000 @@ -2432,7 +2432,7 @@ Pokedex_LoadAnyFootprint: ; 4147b ret -Pokedex_LoadGFX: ; 414b7 +Pokedex_LoadGFX: call DisableLCD ld hl, vTiles2 ld bc, $31 tiles @@ -2462,12 +2462,12 @@ Pokedex_LoadGFX: ; 414b7 call EnableLCD ret -Pokedex_LoadInvertedFont: ; 414fb +Pokedex_LoadInvertedFont: call LoadStandardFont ld hl, vTiles1 ld bc, $80 tiles -Pokedex_InvertTiles: ; 41504 +Pokedex_InvertTiles: .loop ld a, [hl] xor $ff @@ -2478,13 +2478,13 @@ Pokedex_InvertTiles: ; 41504 jr nz, .loop ret -PokedexLZ: ; 4150e +PokedexLZ: INCBIN "gfx/pokedex/pokedex.2bpp.lz" -PokedexSlowpokeLZ: ; 416b0 +PokedexSlowpokeLZ: INCBIN "gfx/pokedex/slowpoke.2bpp.lz" -Pokedex_CheckSGB: ; 41a24 +Pokedex_CheckSGB: ld a, [hCGB] or a ret nz @@ -2492,7 +2492,7 @@ Pokedex_CheckSGB: ; 41a24 dec a ret -Pokedex_LoadUnownFont: ; 41a2c +Pokedex_LoadUnownFont: ld a, BANK(sScratch) call GetSRAMBank ld hl, UnownFont @@ -2510,7 +2510,7 @@ Pokedex_LoadUnownFont: ; 41a2c call CloseSRAM ret -Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58) +Pokedex_LoadUnownFrontpicTiles: ld a, [wUnownLetter] push af ld a, [wDexCurrentUnownIndex] @@ -2529,7 +2529,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58) ld [wUnownLetter], a ret -_NewPokedexEntry: ; 41a7f +_NewPokedexEntry: xor a ld [hBGMapMode], a farcall DrawDexEntryScreenRightEdge @@ -2562,21 +2562,21 @@ _NewPokedexEntry: ; 41a7f ret -Pokedex_SetBGMapMode3: ; 41ad7 (10:5ad7) +Pokedex_SetBGMapMode3: ld a, $3 ld [hBGMapMode], a ld c, 4 call DelayFrames ret -Pokedex_SetBGMapMode4: ; 41ae1 (10:5ae1) +Pokedex_SetBGMapMode4: ld a, $4 ld [hBGMapMode], a ld c, 4 call DelayFrames ret -Pokedex_SetBGMapMode_3ifDMG_4ifCGB: ; 41aeb (10:5aeb) +Pokedex_SetBGMapMode_3ifDMG_4ifCGB: ld a, [hCGB] and a jr z, .DMG @@ -2586,7 +2586,7 @@ Pokedex_SetBGMapMode_3ifDMG_4ifCGB: ; 41aeb (10:5aeb) ret -Pokedex_ResetBGMapMode: ; 41af7 +Pokedex_ResetBGMapMode: xor a ld [hBGMapMode], a ret diff --git a/engine/pokedex/pokedex_2.asm b/engine/pokedex/pokedex_2.asm index cca246ec794..21aea61b443 100644 --- a/engine/pokedex/pokedex_2.asm +++ b/engine/pokedex/pokedex_2.asm @@ -1,4 +1,4 @@ -AnimateDexSearchSlowpoke: ; 441cf +AnimateDexSearchSlowpoke: ld hl, .FrameIDs ld b, 25 .loop @@ -29,7 +29,7 @@ AnimateDexSearchSlowpoke: ; 441cf call DelayFrames ret -.FrameIDs: ; 441fc +.FrameIDs: ; frame ID, duration db 0, 7 db 1, 7 @@ -38,7 +38,7 @@ AnimateDexSearchSlowpoke: ; 441cf db 4, 7 db -2 -DoDexSearchSlowpokeFrame: ; 44207 +DoDexSearchSlowpokeFrame: ld a, [wDexSearchSlowpokeFrame] ld hl, .SlowpokeSpriteData ld de, wVirtualOAMSprite00 @@ -64,7 +64,7 @@ DoDexSearchSlowpokeFrame: ; 44207 inc de jr .loop -.SlowpokeSpriteData: ; 44228 +.SlowpokeSpriteData: dsprite 11, 0, 9, 0, $00, 0 dsprite 11, 0, 10, 0, $01, 0 dsprite 11, 0, 11, 0, $02, 0 @@ -76,7 +76,7 @@ DoDexSearchSlowpokeFrame: ; 44207 dsprite 13, 0, 11, 0, $22, 0 db -1 -DisplayDexEntry: ; 4424d +DisplayDexEntry: call GetPokemonName hlcoord 9, 3 call PlaceString ; mon species @@ -211,11 +211,11 @@ DisplayDexEntry: ; 4424d call FarString ret -UnreferencedPOKeString: ; 44331 +UnreferencedPOKeString: ; unused db "#@" -GetDexEntryPointer: ; 44333 +GetDexEntryPointer: ; return dex entry pointer b:de push hl ld hl, PokedexDataPointerTable @@ -247,8 +247,8 @@ GetDexEntryPointer: ; 44333 db BANK("Pokedex Entries 129-192") db BANK("Pokedex Entries 193-251") -GetDexEntryPagePointer: ; 44355 - call GetDexEntryPointer ; b:de +GetDexEntryPagePointer: + call GetDexEntryPointer push hl ld h, d ld l, e diff --git a/engine/pokedex/pokedex_3.asm b/engine/pokedex/pokedex_3.asm index 51399f434be..d11c18fc69c 100644 --- a/engine/pokedex/pokedex_3.asm +++ b/engine/pokedex/pokedex_3.asm @@ -1,29 +1,29 @@ -LoadSGBPokedexGFX: ; 1ddf1c +LoadSGBPokedexGFX: ld hl, SGBPokedexGFX_LZ ld de, vTiles2 tile $31 call Decompress ret -LoadSGBPokedexGFX2: ; 1ddf26 (77:5f26) +LoadSGBPokedexGFX2: ld hl, SGBPokedexGFX_LZ ld de, vTiles2 tile $31 lb bc, BANK(SGBPokedexGFX_LZ), 58 call DecompressRequest2bpp ret -SGBPokedexGFX_LZ: ; 1ddf33 +SGBPokedexGFX_LZ: INCBIN "gfx/pokedex/sgb.2bpp.lz" -LoadQuestionMarkPic: ; 1de0d7 +LoadQuestionMarkPic: ld hl, .QuestionMarkLZ ld de, sScratch call Decompress ret -.QuestionMarkLZ: ; 1de0e1 +.QuestionMarkLZ: INCBIN "gfx/pokedex/question_mark.2bpp.lz" -DrawPokedexListWindow: ; 1de171 (77:6171) +DrawPokedexListWindow: ld a, $32 hlcoord 0, 17 ld bc, 12 @@ -68,7 +68,7 @@ DrawPokedexListWindow: ; 1de171 (77:6171) .Done: ret -DrawPokedexSearchResultsWindow: ; 1de1d1 (77:61d1) +DrawPokedexSearchResultsWindow: ld a, $34 hlcoord 0, 0 ld bc, 11 @@ -111,14 +111,14 @@ DrawPokedexSearchResultsWindow: ; 1de1d1 (77:61d1) call PlaceString ret -.esults_D ; 1de23c +.esults_D ; (SEARCH R) db "ESULTS" next "" ; (### FOUN) next "D!@" -DrawDexEntryScreenRightEdge: ; 1de247 +DrawDexEntryScreenRightEdge: ld a, [hBGMapAddress] ld l, a ld a, [hBGMapAddress + 1] @@ -150,7 +150,7 @@ DrawDexEntryScreenRightEdge: ; 1de247 ld [hBGMapAddress + 1], a ret -Bank77_FillColumn: ; 1de27f +Bank77_FillColumn: push de ld de, SCREEN_WIDTH .loop diff --git a/engine/pokedex/unown_dex.asm b/engine/pokedex/unown_dex.asm index a35a266b757..93f9d3d814e 100644 --- a/engine/pokedex/unown_dex.asm +++ b/engine/pokedex/unown_dex.asm @@ -1,4 +1,4 @@ -UpdateUnownDex: ; fba18 +UpdateUnownDex: ld a, [wUnownLetter] ld c, a ld b, NUM_UNOWN @@ -17,9 +17,8 @@ UpdateUnownDex: ; fba18 dec hl ld [hl], c ret -; fba2e -PrintUnownWord: ; fba2e (3e:7a2e) +PrintUnownWord: hlcoord 4, 15 ld bc, 12 ld a, " " @@ -46,7 +45,6 @@ PrintUnownWord: ; fba2e (3e:7a2e) inc de ld [hli], a jr .loop -; fba5a (3e:7a5a) INCLUDE "data/pokemon/unown_words.asm" diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm index aabc4262f2f..4bea5fbd5fe 100644 --- a/engine/pokegear/pokegear.asm +++ b/engine/pokegear/pokegear.asm @@ -22,7 +22,7 @@ NUM_POKEGEAR_CARDS EQU const_value const POKEGEARSTATE_RADIOINIT ; b const POKEGEARSTATE_RADIOJOYPAD ; c -PokeGear: ; 90b8d (24:4b8d) +PokeGear: ld hl, wOptions ld a, [hl] push af @@ -68,7 +68,7 @@ PokeGear: ; 90b8d (24:4b8d) call ExitPokegearRadio_HandleMusic ret -.InitTilemap: ; 90bea (24:4bea) +.InitTilemap: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -109,7 +109,7 @@ PokeGear: ; 90b8d (24:4b8d) call DmgToCgbObjPal0 ret -Pokegear_LoadGFX: ; 90c4e +Pokegear_LoadGFX: call ClearVBank1 ld hl, TownMapGFX ld de, vTiles2 @@ -157,13 +157,11 @@ Pokegear_LoadGFX: ; 90c4e call CopyBytes ret -; 90cb2 -FastShipGFX: ; 90cb2 +FastShipGFX: INCBIN "gfx/pokegear/fast_ship.2bpp" -; 90d32 -InitPokegearModeIndicatorArrow: ; 90d32 (24:4d32) +InitPokegearModeIndicatorArrow: depixel 4, 2, 4, 0 ld a, SPRITE_ANIM_INDEX_POKEGEAR_ARROW call _InitSpriteAnimStruct @@ -172,7 +170,7 @@ InitPokegearModeIndicatorArrow: ; 90d32 (24:4d32) ld [hl], $0 ret -AnimatePokegearModeIndicatorArrow: ; 90d41 (24:4d41) +AnimatePokegearModeIndicatorArrow: ld hl, wPokegearCard ld e, [hl] ld d, 0 @@ -184,16 +182,14 @@ AnimatePokegearModeIndicatorArrow: ; 90d41 (24:4d41) ld [hl], a ret -; 90d52 (24:4d52) -.XCoords: ; 90d52 +.XCoords: db $00 ; POKEGEARCARD_CLOCK db $10 ; POKEGEARCARD_MAP db $20 ; POKEGEARCARD_PHONE db $30 ; POKEGEARCARD_RADIO -; 90d56 -TownMap_GetCurrentLandmark: ; 90d56 +TownMap_GetCurrentLandmark: ld a, [wMapGroup] ld b, a ld a, [wMapNumber] @@ -208,9 +204,8 @@ TownMap_GetCurrentLandmark: ; 90d56 call GetWorldMapLocation ret -; 90d70 -TownMap_InitCursorAndPlayerIconPositions: ; 90d70 (24:4d70) +TownMap_InitCursorAndPlayerIconPositions: ld a, [wMapGroup] ld b, a ld a, [wMapNumber] @@ -236,14 +231,14 @@ TownMap_InitCursorAndPlayerIconPositions: ; 90d70 (24:4d70) ld [wPokegearMapCursorLandmark], a ret -Pokegear_InitJumptableIndices: ; 90d9e (24:4d9e) +Pokegear_InitJumptableIndices: ld a, POKEGEARSTATE_CLOCKINIT ld [wJumptableIndex], a xor a ; POKEGEARCARD_CLOCK ld [wPokegearCard], a ret -InitPokegearTilemap: ; 90da8 (24:4da8) +InitPokegearTilemap: xor a ld [hBGMapMode], a hlcoord 0, 0 @@ -294,7 +289,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8) ld [wPokegearMapRegion], a ret -.UpdateBGMap: ; 90e00 (24:4e00) +.UpdateBGMap: ld a, [hCGB] and a jr z, .dmg @@ -306,17 +301,15 @@ InitPokegearTilemap: ; 90da8 (24:4da8) call WaitBGMap ret -; 90e12 (24:4e12) -.Jumptable: ; 90e12 +.Jumptable: ; entries correspond to POKEGEARCARD_* constants dw .Clock dw .Map dw .Phone dw .Radio -; 90e1a -.Clock: ; 90e1a +.Clock: ld de, ClockTilemapRLE call Pokegear_LoadTilemapRLE hlcoord 12, 1 @@ -328,13 +321,11 @@ InitPokegearTilemap: ; 90da8 (24:4da8) call Pokegear_UpdateClock ret -; 90e36 (24:4e36) .switch db " SWITCH▶@" -; 90e3f -.Map: ; 90e3f +.Map: ld a, [wPokegearMapPlayerIconLandmark] cp FAST_SHIP jr z, .johto @@ -360,9 +351,8 @@ InitPokegearTilemap: ; 90da8 (24:4da8) call PokegearMap_UpdateLandmarkName ret -; 90e72 -.Radio: ; 90e72 +.Radio: ld de, RadioTilemapRLE call Pokegear_LoadTilemapRLE hlcoord 0, 12 @@ -370,9 +360,8 @@ InitPokegearTilemap: ; 90da8 (24:4da8) call TextBox ret -; 90e82 -.Phone: ; 90e82 +.Phone: ld de, PhoneTilemapRLE call Pokegear_LoadTilemapRLE hlcoord 0, 12 @@ -382,9 +371,8 @@ InitPokegearTilemap: ; 90da8 (24:4da8) call PokegearPhone_UpdateDisplayList ret -; 90e98 -.PlacePhoneBars: ; 90e98 (24:4e98) +.PlacePhoneBars: hlcoord 17, 1 ld a, $3c ld [hli], a @@ -400,7 +388,7 @@ InitPokegearTilemap: ; 90da8 (24:4da8) ld [hl], $3f ret -Pokegear_FinishTilemap: ; 90eb0 (24:4eb0) +Pokegear_FinishTilemap: hlcoord 0, 0 ld bc, $8 ld a, $4f @@ -424,20 +412,20 @@ Pokegear_FinishTilemap: ; 90eb0 (24:4eb0) call .PlacePokegearCardIcon ret -.PlaceMapIcon: ; 90ee4 (24:4ee4) +.PlaceMapIcon: hlcoord 2, 0 ld a, $40 jr .PlacePokegearCardIcon -.PlacePhoneIcon: ; 90eeb (24:4eeb) +.PlacePhoneIcon: hlcoord 4, 0 ld a, $44 jr .PlacePokegearCardIcon -.PlaceRadioIcon: ; 90ef2 (24:4ef2) +.PlaceRadioIcon: hlcoord 6, 0 ld a, $42 -.PlacePokegearCardIcon: ; 90ef7 (24:4ef7) +.PlacePokegearCardIcon: ld [hli], a inc a ld [hld], a @@ -449,7 +437,7 @@ Pokegear_FinishTilemap: ; 90eb0 (24:4eb0) ld [hld], a ret -PokegearJumptable: ; 90f04 (24:4f04) +PokegearJumptable: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -461,7 +449,7 @@ PokegearJumptable: ; 90f04 (24:4f04) ld l, a jp hl -.Jumptable: ; 90f13 (24:4f13) +.Jumptable: ; entries correspond to POKEGEARSTATE_* constants dw PokegearClock_Init dw PokegearClock_Joypad @@ -477,7 +465,7 @@ PokegearJumptable: ; 90f04 (24:4f04) dw PokegearRadio_Init dw PokegearRadio_Joypad -PokegearClock_Init: ; 90f2d (24:4f2d) +PokegearClock_Init: call InitPokegearTilemap ld hl, PokegearText_PressAnyButtonToExit call PrintText @@ -486,7 +474,7 @@ PokegearClock_Init: ; 90f2d (24:4f2d) call ExitPokegearRadio_HandleMusic ret -PokegearClock_Joypad: ; 90f3e (24:4f3e) +PokegearClock_Joypad: call .UpdateClock ld hl, hJoyLast ld a, [hl] @@ -525,7 +513,7 @@ PokegearClock_Joypad: ; 90f3e (24:4f3e) set 7, [hl] ret -.UpdateClock: ; 90f7b (24:4f7b) +.UpdateClock: xor a ld [hBGMapMode], a call Pokegear_UpdateClock @@ -533,7 +521,7 @@ PokegearClock_Joypad: ; 90f3e (24:4f3e) ld [hBGMapMode], a ret -Pokegear_UpdateClock: ; 90f86 (24:4f86) +Pokegear_UpdateClock: hlcoord 3, 5 lb bc, 5, 14 call ClearBox @@ -548,7 +536,6 @@ Pokegear_UpdateClock: ; 90f86 (24:4f86) call PlaceHLTextAtBC ret -; 90fa8 (24:4fa8) db "ごぜん@" db "ごご@" @@ -558,7 +545,7 @@ Pokegear_UpdateClock: ; 90f86 (24:4f86) ; 0x90fb4 -PokegearMap_CheckRegion: ; 90fb4 (24:4fb4) +PokegearMap_CheckRegion: ld a, [wPokegearMapPlayerIconLandmark] cp FAST_SHIP jr z, .johto @@ -576,7 +563,7 @@ PokegearMap_CheckRegion: ; 90fb4 (24:4fb4) call ExitPokegearRadio_HandleMusic ret -PokegearMap_Init: ; 90fcd (24:4fcd) +PokegearMap_Init: call InitPokegearTilemap ld a, [wPokegearMapPlayerIconLandmark] call PokegearMap_InitPlayerIcon @@ -590,14 +577,14 @@ PokegearMap_Init: ; 90fcd (24:4fcd) inc [hl] ret -PokegearMap_KantoMap: ; 90fe9 (24:4fe9) +PokegearMap_KantoMap: call TownMap_GetKantoLandmarkLimits jr PokegearMap_ContinueMap -PokegearMap_JohtoMap: ; 90fee (24:4fee) +PokegearMap_JohtoMap: ld d, SILVER_CAVE ld e, NEW_BARK_TOWN -PokegearMap_ContinueMap: ; 90ff2 (24:4ff2) +PokegearMap_ContinueMap: ld hl, hJoyLast ld a, [hl] and B_BUTTON @@ -639,7 +626,7 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2) set 7, [hl] ret -.DPad: ; 9102f (24:502f) +.DPad: ld hl, hJoyLast ld a, [hl] and D_UP @@ -682,7 +669,7 @@ PokegearMap_ContinueMap: ; 90ff2 (24:4ff2) call PokegearMap_UpdateCursorPosition ret -PokegearMap_InitPlayerIcon: ; 9106a +PokegearMap_InitPlayerIcon: push af depixel 0, 0 ld b, SPRITE_ANIM_INDEX_RED_WALK @@ -709,9 +696,8 @@ PokegearMap_InitPlayerIcon: ; 9106a ld [hl], d ret -; 91098 -PokegearMap_InitCursor: ; 91098 +PokegearMap_InitCursor: push af depixel 0, 0 ld a, SPRITE_ANIM_INDEX_POKEGEAR_ARROW @@ -728,9 +714,8 @@ PokegearMap_InitCursor: ; 91098 pop bc ret -; 910b4 -PokegearMap_UpdateLandmarkName: ; 910b4 +PokegearMap_UpdateLandmarkName: push af hlcoord 8, 0 lb bc, 2, 12 @@ -745,9 +730,8 @@ PokegearMap_UpdateLandmarkName: ; 910b4 ld [hl], $34 ret -; 910d4 -PokegearMap_UpdateCursorPosition: ; 910d4 +PokegearMap_UpdateCursorPosition: push bc ld e, a farcall GetLandmarkCoords @@ -760,9 +744,8 @@ PokegearMap_UpdateCursorPosition: ; 910d4 ld [hl], d ret -; 910e8 -TownMap_GetKantoLandmarkLimits: ; 910e8 +TownMap_GetKantoLandmarkLimits: ld a, [wStatusFlags] bit STATUSFLAGS_HALL_OF_FAME_F, a jr z, .not_hof @@ -775,9 +758,8 @@ TownMap_GetKantoLandmarkLimits: ; 910e8 ld e, VICTORY_ROAD ret -; 910f9 -PokegearRadio_Init: ; 910f9 (24:50f9) +PokegearRadio_Init: call InitPokegearTilemap depixel 4, 10, 4, 4 ld a, SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB @@ -790,7 +772,7 @@ PokegearRadio_Init: ; 910f9 (24:50f9) inc [hl] ret -PokegearRadio_Joypad: ; 91112 (24:5112) +PokegearRadio_Joypad: ld hl, hJoyLast ld a, [hl] and B_BUTTON @@ -836,7 +818,7 @@ PokegearRadio_Joypad: ; 91112 (24:5112) set 7, [hl] ret -PokegearPhone_Init: ; 91156 (24:5156) +PokegearPhone_Init: ld hl, wJumptableIndex inc [hl] xor a @@ -849,7 +831,7 @@ PokegearPhone_Init: ; 91156 (24:5156) call PrintText ret -PokegearPhone_Joypad: ; 91171 (24:5171) +PokegearPhone_Joypad: ld hl, hJoyPressed ld a, [hl] and B_BUTTON @@ -925,7 +907,7 @@ PokegearPhone_Joypad: ; 91171 (24:5171) ld [wJumptableIndex], a ret -PokegearPhone_MakePhoneCall: ; 911eb (24:51eb) +PokegearPhone_MakePhoneCall: call GetMapPhoneService and a jr nz, .no_service @@ -967,7 +949,6 @@ PokegearPhone_MakePhoneCall: ; 911eb (24:51eb) call PrintText ret -; 9124c (24:524c) .dotdotdot ; 0x9124c ; @@ -983,7 +964,7 @@ PokegearPhone_MakePhoneCall: ; 911eb (24:51eb) ; 0x91256 -PokegearPhone_FinishPhoneCall: ; 91256 (24:5256) +PokegearPhone_FinishPhoneCall: ld a, [hJoyPressed] and A_BUTTON | B_BUTTON ret z @@ -994,7 +975,7 @@ PokegearPhone_FinishPhoneCall: ; 91256 (24:5256) call PrintText ret -PokegearPhone_GetDPad: ; 9126d (24:526d) +PokegearPhone_GetDPad: ld hl, hJoyLast ld a, [hl] and D_UP @@ -1050,7 +1031,7 @@ PokegearPhone_GetDPad: ; 9126d (24:526d) call WaitBGMap ret -PokegearPhone_UpdateCursor: ; 912b7 (24:52b7) +PokegearPhone_UpdateCursor: ld a, " " hlcoord 1, 4 ld [hl], a @@ -1067,7 +1048,7 @@ PokegearPhone_UpdateCursor: ; 912b7 (24:52b7) ld [hl], "▶" ret -PokegearPhone_UpdateDisplayList: ; 912d8 (24:52d8) +PokegearPhone_UpdateDisplayList: hlcoord 1, 3 ld b, 9 ld a, " " @@ -1110,9 +1091,8 @@ PokegearPhone_UpdateDisplayList: ; 912d8 (24:52d8) call PokegearPhone_UpdateCursor ret -; 9131e (24:531e) -PokegearPhone_DeletePhoneNumber: ; 9131e +PokegearPhone_DeletePhoneNumber: ld hl, wPhoneList ld a, [wPokegearPhoneScrollPosition] ld e, a @@ -1137,9 +1117,8 @@ PokegearPhone_DeletePhoneNumber: ; 9131e jr nz, .loop ret -; 91342 -PokegearPhoneContactSubmenu: ; 91342 (24:5342) +PokegearPhoneContactSubmenu: ld hl, wPhoneList ld a, [wPokegearPhoneScrollPosition] ld e, a @@ -1248,15 +1227,14 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342) ld l, a jp hl -.Cancel: ; 913f1 +.Cancel: ld hl, PokegearText_WhomToCall call PrintText scf ret -; 913f9 (24:53f9) -.Delete: ; 913f9 +.Delete: ld hl, PokegearText_DeleteStoredNumber call MenuTextBox call YesNoBox @@ -1273,15 +1251,13 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342) scf ret -; 9141b -.Call: ; 9141b +.Call: and a ret -; 9141d -.UpdateCursor: ; 9141d (24:541d) +.UpdateCursor: push de ld a, [de] inc de @@ -1307,37 +1283,32 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342) pop de ret -; 9143f (24:543f) -.CallDeleteCancelStrings: ; 9143f +.CallDeleteCancelStrings: dwcoord 10, 6 db 3 db "CALL" next "DELETE" next "CANCEL" db "@" -; 91455 -.CallDeleteCancelJumptable: ; 91455 +.CallDeleteCancelJumptable: dw .Call dw .Delete dw .Cancel -; 9145b -.CallCancelStrings: ; 9145b +.CallCancelStrings: dwcoord 10, 8 db 2 db "CALL" next "CANCEL" db "@" -; 9146a -.CallCancelJumptable: ; 9146a +.CallCancelJumptable: dw .Call dw .Cancel -; 9146e ; unused ld a, [hHours] @@ -1353,9 +1324,8 @@ PokegearPhoneContactSubmenu: ; 91342 (24:5342) and a ret -; 91480 -Pokegear_SwitchPage: ; 91480 (24:5480) +Pokegear_SwitchPage: ld de, SFX_READ_TEXT_2 call PlaySFX ld a, c @@ -1365,7 +1335,7 @@ Pokegear_SwitchPage: ; 91480 (24:5480) call DeleteSpriteAnimStruct2ToEnd ret -ExitPokegearRadio_HandleMusic: ; 91492 +ExitPokegearRadio_HandleMusic: ld a, [wPokegearRadioMusicPlaying] cp RESTART_MAP_MUSIC jr z, .restart_map_music @@ -1381,9 +1351,8 @@ ExitPokegearRadio_HandleMusic: ; 91492 ld [wPokegearRadioMusicPlaying], a ret -; 914ab -DeleteSpriteAnimStruct2ToEnd: ; 914ab (24:54ab) +DeleteSpriteAnimStruct2ToEnd: ld hl, wSpriteAnim2 ld bc, wSpriteAnimationStructsEnd - wSpriteAnim2 xor a @@ -1392,7 +1361,7 @@ DeleteSpriteAnimStruct2ToEnd: ; 914ab (24:54ab) ld [wSpriteAnimCount], a ret -Pokegear_LoadTilemapRLE: ; 914bb (24:54bb) +Pokegear_LoadTilemapRLE: ; Format: repeat count, tile ID ; Terminated with -1 hlcoord 0, 0 @@ -1412,7 +1381,6 @@ Pokegear_LoadTilemapRLE: ; 914bb (24:54bb) jr nz, .load jr .loop -; 914ce (24:54ce) PokegearText_WhomToCall: ; 0x914ce ; Whom do you want to call? @@ -1435,24 +1403,22 @@ PokegearText_DeleteStoredNumber: ; 0x914d8 ; 0x914dd -PokegearSpritesGFX: ; 914dd +PokegearSpritesGFX: INCBIN "gfx/pokegear/pokegear_sprites.2bpp.lz" -; 9150d -RadioTilemapRLE: ; 9150d +RadioTilemapRLE: INCBIN "gfx/pokegear/radio.tilemap.rle" -PhoneTilemapRLE: ; 9158a +PhoneTilemapRLE: INCBIN "gfx/pokegear/phone.tilemap.rle" -ClockTilemapRLE: ; 915db +ClockTilemapRLE: INCBIN "gfx/pokegear/clock.tilemap.rle" -; 9163e -_UpdateRadioStation: ; 9163e (24:563e) +_UpdateRadioStation: jr UpdateRadioStation ; called from engine/sprite_anims.asm -AnimateTuningKnob: ; 91640 (24:5640) +AnimateTuningKnob: push bc call .TuningKnob pop bc @@ -1462,7 +1428,7 @@ AnimateTuningKnob: ; 91640 (24:5640) ld [hl], a ret -.TuningKnob: ; 9164e (24:564e) +.TuningKnob: ld hl, hJoyLast ld a, [hl] and D_DOWN @@ -1489,7 +1455,7 @@ AnimateTuningKnob: ; 91640 (24:5640) inc [hl] inc [hl] .update -UpdateRadioStation: ; 9166f (24:566f) +UpdateRadioStation: ld hl, wRadioTuningKnob ld d, [hl] ld hl, RadioChannels @@ -1527,7 +1493,6 @@ UpdateRadioStation: ; 9166f (24:566f) ld [hBGMapMode], a ret -; 916a1 (24:56a1) ; unused ld [wPokegearRadioChannelBank], a @@ -1537,7 +1502,6 @@ UpdateRadioStation: ; 9166f (24:566f) ld [wPokegearRadioChannelAddr + 1], a ret -; 916ad RadioChannels: ; entries correspond to constants/radio_constants.asm @@ -1646,7 +1610,7 @@ RadioChannels: scf ret -LoadStation_OaksPokemonTalk: ; 91753 (24:5753) +LoadStation_OaksPokemonTalk: xor a ; OAKS_POKEMON_TALK ld [wCurrentRadioLine], a ld [wNumRadioLinesPrinted], a @@ -1656,7 +1620,7 @@ LoadStation_OaksPokemonTalk: ; 91753 (24:5753) ld de, OaksPKMNTalkName ret -LoadStation_PokedexShow: ; 91766 (24:5766) +LoadStation_PokedexShow: ld a, POKEDEX_SHOW ld [wCurrentRadioLine], a xor a @@ -1667,7 +1631,7 @@ LoadStation_PokedexShow: ; 91766 (24:5766) ld de, PokedexShowName ret -LoadStation_PokemonMusic: ; 9177b (24:577b) +LoadStation_PokemonMusic: ld a, POKEMON_MUSIC ld [wCurrentRadioLine], a xor a @@ -1678,7 +1642,7 @@ LoadStation_PokemonMusic: ; 9177b (24:577b) ld de, PokemonMusicName ret -LoadStation_LuckyChannel: ; 91790 (24:5790) +LoadStation_LuckyChannel: ld a, LUCKY_CHANNEL ld [wCurrentRadioLine], a xor a @@ -1689,7 +1653,7 @@ LoadStation_LuckyChannel: ; 91790 (24:5790) ld de, LuckyChannelName ret -LoadStation_BuenasPassword: ; 917a5 (24:57a5) +LoadStation_BuenasPassword: ld a, BUENAS_PASSWORD ld [wCurrentRadioLine], a xor a @@ -1704,12 +1668,11 @@ LoadStation_BuenasPassword: ; 917a5 (24:57a5) ld de, BuenasPasswordName ret -; 917c3 (24:57c3) BuenasPasswordName: db "BUENA'S PASSWORD@" NotBuenasPasswordName: db "@" -LoadStation_UnownRadio: ; 917d5 (24:57d5) +LoadStation_UnownRadio: ld a, UNOWN_RADIO ld [wCurrentRadioLine], a xor a @@ -1720,7 +1683,7 @@ LoadStation_UnownRadio: ; 917d5 (24:57d5) ld de, UnownStationName ret -LoadStation_PlacesAndPeople: ; 917ea (24:57ea) +LoadStation_PlacesAndPeople: ld a, PLACES_AND_PEOPLE ld [wCurrentRadioLine], a xor a @@ -1731,7 +1694,7 @@ LoadStation_PlacesAndPeople: ; 917ea (24:57ea) ld de, PlacesAndPeopleName ret -LoadStation_LetsAllSing: ; 917ff (24:57ff) +LoadStation_LetsAllSing: ld a, LETS_ALL_SING ld [wCurrentRadioLine], a xor a @@ -1742,9 +1705,8 @@ LoadStation_LetsAllSing: ; 917ff (24:57ff) ld de, LetsAllSingName ret -; 91814 (24:5814) -LoadStation_RocketRadio: ; 91814 +LoadStation_RocketRadio: ld a, ROCKET_RADIO ld [wCurrentRadioLine], a xor a @@ -1755,9 +1717,8 @@ LoadStation_RocketRadio: ; 91814 ld de, LetsAllSingName ret -; 91829 -LoadStation_PokeFluteRadio: ; 91829 (24:5829) +LoadStation_PokeFluteRadio: ld a, POKE_FLUTE_RADIO ld [wCurrentRadioLine], a xor a @@ -1768,7 +1729,7 @@ LoadStation_PokeFluteRadio: ; 91829 (24:5829) ld de, PokeFluteStationName ret -LoadStation_EvolutionRadio: ; 9183e (24:583e) +LoadStation_EvolutionRadio: ld a, EVOLUTION_RADIO ld [wCurrentRadioLine], a xor a @@ -1779,12 +1740,11 @@ LoadStation_EvolutionRadio: ; 9183e (24:583e) ld de, UnownStationName ret -; 91853 (24:5853) -Unreferenced_LoadStation: ; 91853 +Unreferenced_LoadStation: ret -RadioMusicRestartDE: ; 91854 (24:5854) +RadioMusicRestartDE: push de ld a, e ld [wPokegearRadioMusicPlaying], a @@ -1796,7 +1756,7 @@ RadioMusicRestartDE: ; 91854 (24:5854) call PlayMusic ret -RadioMusicRestartPokemonChannel: ; 91868 (24:5868) +RadioMusicRestartPokemonChannel: push de ld a, RESTART_MAP_MUSIC ld [wPokegearRadioMusicPlaying], a @@ -1807,7 +1767,7 @@ RadioMusicRestartPokemonChannel: ; 91868 (24:5868) call PlayMusic ret -Radio_BackUpFarCallParams: ; 9187c (24:587c) +Radio_BackUpFarCallParams: ld [wPokegearRadioChannelBank], a ld a, l ld [wPokegearRadioChannelAddr], a @@ -1815,7 +1775,7 @@ Radio_BackUpFarCallParams: ; 9187c (24:587c) ld [wPokegearRadioChannelAddr + 1], a ret -NoRadioStation: ; 91888 (24:5888) +NoRadioStation: call NoRadioMusic call NoRadioName xor a @@ -1826,14 +1786,14 @@ NoRadioStation: ; 91888 (24:5888) ld [hBGMapMode], a ret -NoRadioMusic: ; 9189d (24:589d) +NoRadioMusic: ld de, MUSIC_NONE call PlayMusic ld a, ENTER_MAP_MUSIC ld [wPokegearRadioMusicPlaying], a ret -NoRadioName: ; 918a9 (24:58a9) +NoRadioName: xor a ld [hBGMapMode], a hlcoord 1, 8 @@ -1844,7 +1804,6 @@ NoRadioName: ; 918a9 (24:58a9) call TextBox ret -; 918bf OaksPKMNTalkName: db "OAK's Talk@" PokedexShowName: db "#DEX Show@" @@ -1855,9 +1814,8 @@ UnownStationName: db "?????@" PlacesAndPeopleName: db "Places & People@" LetsAllSingName: db "Let's All Sing!@" PokeFluteStationName: db "# FLUTE@" -; 9191c -_TownMap: ; 9191c +_TownMap: ld hl, wOptions ld a, [hl] push af @@ -1990,9 +1948,8 @@ _TownMap: ; 9191c call PokegearMap_UpdateCursorPosition pop de jr .loop2 -; 91a04 -.InitTilemap: ; 91a04 +.InitTilemap: ld a, [wTownMapPlayerIconLandmark] cp KANTO_LANDMARK jr nc, .kanto2 @@ -2025,9 +1982,8 @@ _TownMap: ; 9191c call PokegearMap_UpdateLandmarkName farcall TownMapPals ret -; 91a53 -PlayRadio: ; 91a53 +PlayRadio: ld hl, wOptions ld a, [hl] push af @@ -2058,9 +2014,8 @@ PlayRadio: ; 91a53 call ExitPokegearRadio_HandleMusic ret -; 91a87 -.PlayStation: ; 91a87 +.PlayStation: ld a, ENTER_MAP_MUSIC ld [wPokegearRadioMusicPlaying], a ld hl, .StationPointers @@ -2090,9 +2045,8 @@ PlayRadio: ; 91a53 call WaitBGMap ret -; 91ab9 -.StationPointers: ; 91ab9 +.StationPointers: ; entries correspond to MAPRADIO_* constants dw .OakOrPnP dw LoadStation_OaksPokemonTalk @@ -2104,9 +2058,8 @@ PlayRadio: ; 91a53 dw LoadStation_LetsAllSing dw LoadStation_RocketRadio -; 91acb -.OakOrPnP: ; 91acb +.OakOrPnP: call IsInJohto and a jr nz, .kanto @@ -2119,9 +2072,8 @@ PlayRadio: ; 91a53 .kanto jp LoadStation_PlacesAndPeople -; 91ae1 -PokegearMap: ; 91ae1 +PokegearMap: ld a, e and a jr nz, .kanto @@ -2134,9 +2086,8 @@ PokegearMap: ; 91ae1 call FillKantoMap ret -; 91af3 -_FlyMap: ; 91af3 +_FlyMap: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -2199,9 +2150,8 @@ _FlyMap: ; 91af3 ld e, a ret -; 91b73 -FlyMapScroll: ; 91b73 +FlyMapScroll: ld a, [wStartFlypoint] ld e, a ld a, [wEndFlypoint] @@ -2248,9 +2198,8 @@ FlyMapScroll: ; 91b73 ld [hBGMapMode], a ret -; 91bb5 -TownMapBubble: ; 91bb5 +TownMapBubble: ; Draw the bubble containing the location text in the town map HUD ; Top-left corner @@ -2312,9 +2261,8 @@ TownMapBubble: ; 91bb5 call PlaceString ret -; 91c17 -GetMapCursorCoordinates: ; 91c17 +GetMapCursorCoordinates: ld a, [wTownMapPlayerIconLandmark] ld l, a ld h, 0 @@ -2335,9 +2283,8 @@ GetMapCursorCoordinates: ; 91c17 ld [hl], d ret -; 91c3c -CheckIfVisitedFlypoint: ; 91c3c +CheckIfVisitedFlypoint: ; Check if the flypoint loaded in [hl] has been visited yet. push bc push de @@ -2355,9 +2302,8 @@ CheckIfVisitedFlypoint: ; 91c3c and a ret -; 91c50 -HasVisitedSpawn: ; 91c50 +HasVisitedSpawn: ; Check if spawn point c has been visited. ld hl, wVisitedSpawns ld b, CHECK_FLAG @@ -2366,16 +2312,14 @@ HasVisitedSpawn: ; 91c50 ld a, c ret -; 91c5e INCLUDE "data/maps/flypoints.asm" -ret_91c8f: ; 91c8f +ret_91c8f: ret -; 91c90 -FlyMap: ; 91c90 +FlyMap: ld a, [wMapGroup] ld b, a ld a, [wMapNumber] @@ -2469,9 +2413,8 @@ FlyMap: ; 91c90 ld [wTownMapCursorCoordinates + 1], a ret -; 91d11 -Pokedex_GetArea: ; 91d11 +Pokedex_GetArea: ; e: Current landmark ld a, [wTownMapPlayerIconLandmark] push af @@ -2537,9 +2480,8 @@ Pokedex_GetArea: ; 91d11 ld [wTownMapPlayerIconLandmark], a ret -; 91d9b -.LeftRightInput: ; 91d9b +.LeftRightInput: ld a, [hl] and D_LEFT jr nz, .left @@ -2573,9 +2515,8 @@ Pokedex_GetArea: ; 91d11 call .GetAndPlaceNest ret -; 91dcd -.BlinkNestIcons: ; 91dcd +.BlinkNestIcons: ld a, [hVBlankCounter] ld e, a and $f @@ -2593,9 +2534,8 @@ Pokedex_GetArea: ; 91d11 call CopyBytes ret -; 91de9 -.PlaceString_MonsNest: ; 91de9 +.PlaceString_MonsNest: hlcoord 0, 0 ld bc, SCREEN_WIDTH ld a, " " @@ -2616,13 +2556,11 @@ Pokedex_GetArea: ; 91d11 call PlaceString ret -; 91e16 .String_SNest: db "'S NEST@" -; 91e1e -.GetAndPlaceNest: ; 91e1e +.GetAndPlaceNest: ld [wTownMapCursorLandmark], a ld e, a farcall FindNest ; load nest landmarks into wTileMap[0,0] @@ -2660,9 +2598,8 @@ Pokedex_GetArea: ; 91d11 call CopyBytes ret -; 91e5a -.HideNestsShowPlayer: ; 91e5a +.HideNestsShowPlayer: call .CheckPlayerLocation ret c ld a, [wTownMapPlayerIconLandmark] @@ -2706,18 +2643,16 @@ Pokedex_GetArea: ; 91d11 call ByteFill ret -; 91e9c -.PlayerOAM: ; 91e9c +.PlayerOAM: ; y pxl, x pxl, tile offset db -1 * 8, -1 * 8, 0 ; top left db -1 * 8, 0 * 8, 1 ; top right db 0 * 8, -1 * 8, 2 ; bottom left db 0 * 8, 0 * 8, 3 ; bottom right db $80 ; terminator -; 91ea9 -.CheckPlayerLocation: ; 91ea9 +.CheckPlayerLocation: ; Don't show the player's sprite if you're ; not in the same region as what's currently ; on the screen. @@ -2748,9 +2683,8 @@ Pokedex_GetArea: ; 91d11 scf ret -; 91ed0 -.GetPlayerOrFastShipIcon: ; 91ed0 +.GetPlayerOrFastShipIcon: ld a, [wTownMapPlayerIconLandmark] cp FAST_SHIP jr z, .FastShip @@ -2762,9 +2696,8 @@ Pokedex_GetArea: ; 91d11 ld b, BANK(FastShipGFX) ret -; 91ee4 -TownMapBGUpdate: ; 91ee4 +TownMapBGUpdate: ; Update BG Map tiles and attributes ; BG Map address @@ -2792,15 +2725,14 @@ TownMapBGUpdate: ; 91ee4 ld [hBGMapMode], a ret -; 91eff -FillJohtoMap: ; 91eff +FillJohtoMap: ld de, JohtoMap jr FillTownMap -FillKantoMap: ; 91f04 +FillKantoMap: ld de, KantoMap -FillTownMap: ; 91f07 +FillTownMap: hlcoord 0, 0 .loop ld a, [de] @@ -2811,9 +2743,8 @@ FillTownMap: ; 91f07 inc de jr .loop -; 91f13 -TownMapPals: ; 91f13 +TownMapPals: ; Assign palettes based on tile ids hlcoord 0, 0 decoord 0, 0, wAttrMap @@ -2866,9 +2797,8 @@ TownMapPals: ; 91f13 .PalMap: INCLUDE "gfx/pokegear/town_map_palette_map.asm" -; 91f7b -TownMapMon: ; 91f7b +TownMapMon: ; Draw the FlyMon icon at town map location ; Get FlyMon species @@ -2894,9 +2824,8 @@ TownMapMon: ; 91f7b ld [hl], SPRITE_ANIM_SEQ_NULL ret -; 91fa6 -TownMapPlayerIcon: ; 91fa6 +TownMapPlayerIcon: ; Draw the player icon at town map location in a push af farcall GetPlayerIcon @@ -2941,26 +2870,23 @@ TownMapPlayerIcon: ; 91fa6 ; 0x91ff2 -LoadTownMapGFX: ; 91ff2 +LoadTownMapGFX: ld hl, TownMapGFX ld de, vTiles2 lb bc, BANK(TownMapGFX), 48 call DecompressRequest2bpp ret -; 91fff -JohtoMap: ; 91fff +JohtoMap: INCBIN "gfx/pokegear/johto.bin" -; 92168 -KantoMap: ; 92168 +KantoMap: INCBIN "gfx/pokegear/kanto.bin" -; 922d1 -PokedexNestIconGFX: ; 922d1 +PokedexNestIconGFX: INCBIN "gfx/pokegear/dexmap_nest_icon.2bpp" -FlyMapLabelBorderGFX: ; 922e1 +FlyMapLabelBorderGFX: INCBIN "gfx/pokegear/flymap_label_border.1bpp" Unreferenced_Function92311: @@ -3041,9 +2967,8 @@ Unreferenced_Function92311: ld e, a ret -; 923b8 -.HandleDPad: ; 923b8 +.HandleDPad: ld hl, hJoyLast ld a, [hl] and D_DOWN | D_RIGHT @@ -3094,4 +3019,3 @@ Unreferenced_Function92311: ld [hBGMapMode], a ret -; 92402 diff --git a/engine/pokegear/townmap_convertlinebreakcharacters.asm b/engine/pokegear/townmap_convertlinebreakcharacters.asm index 6ccd79aae24..e0ed55131df 100644 --- a/engine/pokegear/townmap_convertlinebreakcharacters.asm +++ b/engine/pokegear/townmap_convertlinebreakcharacters.asm @@ -1,4 +1,4 @@ -TownMap_ConvertLineBreakCharacters: ; 1de2c5 +TownMap_ConvertLineBreakCharacters: ld hl, wStringBuffer1 .loop ld a, [hl] diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm index 75cc3fe3556..312164b4900 100644 --- a/engine/pokemon/bills_pc.asm +++ b/engine/pokemon/bills_pc.asm @@ -1,4 +1,4 @@ -_DepositPKMN: ; e2391 (38:6391) +_DepositPKMN: ld hl, wOptions ld a, [hl] push af @@ -35,20 +35,20 @@ _DepositPKMN: ; e2391 (38:6391) ld [wOptions], a ret -.RunJumptable: ; e23d5 (38:63d5) +.RunJumptable: ld a, [wJumptableIndex] ld hl, .Jumptable call BillsPC_Jumptable jp hl -.Jumptable: ; e23df (38:63df) +.Jumptable: dw .Init dw .HandleJoypad dw .WhatsUp dw .Submenu dw BillsPC_EndJumptableLoop -.Init: ; e23e9 (38:63e9) +.Init: xor a ld [hBGMapMode], a call ClearSprites @@ -69,7 +69,7 @@ _DepositPKMN: ; e2391 (38:6391) call BillsPC_IncrementJumptableIndex ret -.HandleJoypad: ; e241a (38:641a) +.HandleJoypad: ld hl, hJoyPressed ; $ffa7 ld a, [hl] and B_BUTTON @@ -100,7 +100,6 @@ _DepositPKMN: ; e2391 (38:6391) ld a, $2 ld [wJumptableIndex], a ret -; e2452 (38:6452) .go_back ld hl, wJumptableIndex @@ -112,7 +111,7 @@ _DepositPKMN: ; e2391 (38:6391) ld [wJumptableIndex], a ret -.WhatsUp: ; e245d (38:645d) +.WhatsUp: xor a ld [hBGMapMode], a call ClearSprites @@ -127,7 +126,7 @@ _DepositPKMN: ; e2391 (38:6391) call BillsPC_IncrementJumptableIndex ret -.Submenu: ; e247d (38:647d) +.Submenu: ld hl, BillsPCDepositMenuHeader call CopyMenuHeader ld a, [wMenuCursorY] @@ -147,14 +146,14 @@ _DepositPKMN: ; e2391 (38:6391) ld l, a jp hl -BillsPCDepositJumptable: ; e24a1 (38:64a1) +BillsPCDepositJumptable: dw BillsPCDepositFuncDeposit ; Deposit Pokemon dw BillsPCDepositFuncStats ; Pokemon Stats dw BillsPCDepositFuncRelease ; Release Pokemon dw BillsPCDepositFuncCancel ; Cancel -BillsPCDepositFuncDeposit: ; e24a9 (38:64a9) +BillsPCDepositFuncDeposit: call BillsPC_CheckMail_PreventBlackout jp c, BillsPCDepositFuncCancel call DepositPokemon @@ -171,7 +170,7 @@ BillsPCDepositFuncDeposit: ; e24a9 (38:64a9) call BillsPC_PlaceString ret -BillsPCDepositFuncStats: ; e24c8 (38:64c8) +BillsPCDepositFuncStats: call LoadStandardMenuHeader call BillsPC_StatsScreen call ExitMenu @@ -182,7 +181,7 @@ BillsPCDepositFuncStats: ; e24c8 (38:64c8) call BillsPC_ApplyPalettes ret -BillsPCDepositFuncRelease: ; e24e0 (38:64e0) +BillsPCDepositFuncRelease: call BillsPC_CheckMail_PreventBlackout jr c, BillsPCDepositFuncCancel call BillsPC_IsMonAnEgg @@ -222,11 +221,10 @@ BillsPCDepositFuncRelease: ; e24e0 (38:64e0) ld [wMenuCursorY], a ret -BillsPCDepositFuncCancel: ; e2537 (38:6537) +BillsPCDepositFuncCancel: ld a, $0 ld [wJumptableIndex], a ret -; e253d (38:653d) BillsPCDepositMenuHeader: ; 0xe253d (38:653d) db MENU_BACKUP_TILES ; flags @@ -244,7 +242,7 @@ BillsPCDepositMenuHeader: ; 0xe253d (38:653d) db "CANCEL@" ; 0xe2564 (38:6564) -Unreferenced_BillsPCClearThreeBoxes: ; e2564 +Unreferenced_BillsPCClearThreeBoxes: hlcoord 0, 0 ld b, 4 ld c, 8 @@ -258,9 +256,8 @@ Unreferenced_BillsPCClearThreeBoxes: ; e2564 ld c, 8 call ClearBox ret -; e2583 -_WithdrawPKMN: ; e2583 (38:6583) +_WithdrawPKMN: ld hl, wOptions ld a, [hl] push af @@ -297,20 +294,20 @@ _WithdrawPKMN: ; e2583 (38:6583) ld [wOptions], a ret -.RunJumptable: ; e25c8 (38:65c8) +.RunJumptable: ld a, [wJumptableIndex] ld hl, .Jumptable call BillsPC_Jumptable jp hl -.Jumptable: ; e25d2 (38:65d2) +.Jumptable: dw .Init dw .Joypad dw .PrepSubmenu dw BillsPC_Withdraw dw BillsPC_EndJumptableLoop -.Init: ; e25dc (38:65dc) +.Init: ld a, NUM_BOXES + 1 ld [wBillsPC_LoadedBox], a xor a @@ -333,7 +330,7 @@ _WithdrawPKMN: ; e2583 (38:6583) call BillsPC_IncrementJumptableIndex ret -.Joypad: ; e2612 (38:6612) +.Joypad: ld hl, hJoyPressed ; $ffa7 ld a, [hl] and B_BUTTON @@ -362,7 +359,7 @@ _WithdrawPKMN: ; e2583 (38:6583) jr z, .b_button ld a, $2 ld [wJumptableIndex], a - ret ; e264a (38:664a) + ret .unused ld hl, wJumptableIndex @@ -373,9 +370,8 @@ _WithdrawPKMN: ; e2583 (38:6583) ld a, $4 ld [wJumptableIndex], a ret -; e2655 -.PrepSubmenu: ; e2655 (38:6655) +.PrepSubmenu: xor a ld [hBGMapMode], a call ClearSprites @@ -390,7 +386,7 @@ _WithdrawPKMN: ; e2583 (38:6583) call BillsPC_IncrementJumptableIndex ret -BillsPC_Withdraw: ; e2675 (38:6675) +BillsPC_Withdraw: ld hl, .MenuHeader call CopyMenuHeader ld a, [wMenuCursorY] @@ -417,7 +413,7 @@ BillsPC_Withdraw: ; e2675 (38:6675) dw .cancel ; Cancel -.withdraw ; e26a1 (38:66a1) +.withdraw call BillsPC_CheckMail_PreventBlackout jp c, .cancel call TryWithdrawPokemon @@ -433,7 +429,7 @@ BillsPC_Withdraw: ; e2675 (38:6675) call BillsPC_PlaceString ret -.stats ; e26c0 (38:66c0) +.stats call LoadStandardMenuHeader call BillsPC_StatsScreen call ExitMenu @@ -444,7 +440,7 @@ BillsPC_Withdraw: ; e2675 (38:6675) call BillsPC_ApplyPalettes ret -.release ; e26d8 (38:66d8) +.release ld a, [wMenuCursorY] push af call BillsPC_IsMonAnEgg @@ -481,11 +477,10 @@ BillsPC_Withdraw: ; e2675 (38:6675) ld [wMenuCursorY], a ret -.cancel ; e272b (38:672b) +.cancel ld a, $0 ld [wJumptableIndex], a ret -; e2731 (38:6731) .MenuHeader: ; 0xe2731 db MENU_BACKUP_TILES ; flags @@ -503,7 +498,7 @@ BillsPC_Withdraw: ; e2675 (38:6675) db "CANCEL@" ; 0xe2759 -_MovePKMNWithoutMail: ; e2759 +_MovePKMNWithoutMail: ld hl, wOptions ld a, [hl] push af @@ -542,16 +537,14 @@ _MovePKMNWithoutMail: ; e2759 pop af ld [wOptions], a ret -; e27a2 -.RunJumptable: ; e27a2 +.RunJumptable: ld a, [wJumptableIndex] ld hl, .Jumptable call BillsPC_Jumptable jp hl -; e27ac -.Jumptable: ; e27ac +.Jumptable: dw .Init dw .Joypad dw .PrepSubmenu @@ -559,9 +552,8 @@ _MovePKMNWithoutMail: ; e2759 dw .PrepInsertCursor dw .Joypad2 dw BillsPC_EndJumptableLoop -; e27ba -.Init: ; e27ba +.Init: xor a ld [hBGMapMode], a call ClearSprites @@ -581,9 +573,8 @@ _MovePKMNWithoutMail: ; e2759 call BillsPC_UpdateSelectionCursor call BillsPC_IncrementJumptableIndex ret -; e27eb -.Joypad: ; e27eb +.Joypad: ld hl, hJoyPressed ld a, [hl] and B_BUTTON @@ -633,9 +624,8 @@ _MovePKMNWithoutMail: ; e2759 ld a, $6 ld [wJumptableIndex], a ret -; e283d -.PrepSubmenu: ; e283d +.PrepSubmenu: xor a ld [hBGMapMode], a call ClearSprites @@ -649,9 +639,8 @@ _MovePKMNWithoutMail: ; e2759 ld [wMenuCursorY], a call BillsPC_IncrementJumptableIndex ret -; e285d -.MoveMonWOMailSubmenu: ; e285d +.MoveMonWOMailSubmenu: ld hl, .MenuHeader call CopyMenuHeader ld a, [wMenuCursorY] @@ -670,15 +659,13 @@ _MovePKMNWithoutMail: ; e2759 ld h, [hl] ld l, a jp hl -; e2881 -.Jumptable2: ; e2881 +.Jumptable2: dw .Move dw .Stats dw .Cancel -; e2887 -.Move: ; e2887 +.Move: call BillsPC_CheckMail_PreventBlackout jp c, .Cancel ld a, [wBillsPC_ScrollPosition] @@ -690,9 +677,8 @@ _MovePKMNWithoutMail: ; e2759 ld a, $4 ld [wJumptableIndex], a ret -; e28a5 -.Stats: ; e28a5 +.Stats: call LoadStandardMenuHeader call BillsPC_StatsScreen call ExitMenu @@ -702,13 +688,11 @@ _MovePKMNWithoutMail: ; e2759 ld a, SCGB_BILLS_PC call BillsPC_ApplyPalettes ret -; e28bd -.Cancel: ; e28bd +.Cancel: ld a, $0 ld [wJumptableIndex], a ret -; e28c3 .MenuHeader: ; 0xe28c3 db MENU_BACKUP_TILES ; flags @@ -725,7 +709,7 @@ _MovePKMNWithoutMail: ; e2759 db "CANCEL@" ; 0xe28df -.PrepInsertCursor: ; e28df +.PrepInsertCursor: xor a ld [hBGMapMode], a call CopyBoxmonSpecies @@ -740,9 +724,8 @@ _MovePKMNWithoutMail: ; e2759 call WaitBGMap call BillsPC_IncrementJumptableIndex ret -; e2903 -.Joypad2: ; e2903 +.Joypad2: ld hl, hJoyPressed ld a, [hl] and B_BUTTON @@ -795,9 +778,8 @@ _MovePKMNWithoutMail: ; e2759 ld a, $0 ld [wJumptableIndex], a ret -; e2963 -BillsPC_InitRAM: ; e2963 (38:6963) +BillsPC_InitRAM: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -815,17 +797,17 @@ BillsPC_InitRAM: ; e2963 (38:6963) ld [wBillsPC_ScrollPosition], a ret -BillsPC_IncrementJumptableIndex: ; e298d (38:698d) +BillsPC_IncrementJumptableIndex: ld hl, wJumptableIndex inc [hl] ret -BillsPC_EndJumptableLoop: ; e2992 (38:6992) +BillsPC_EndJumptableLoop: ld hl, wJumptableIndex set 7, [hl] ret -_StatsScreenDPad: ; e2998 (38:6998) +_StatsScreenDPad: ld a, [wBillsPC_NumMonsOnScreen] ld d, a ld a, [wBillsPC_NumMonsInBox] @@ -844,7 +826,7 @@ _StatsScreenDPad: ; e2998 (38:6998) .empty jp BillsPC_JoypadDidNothing -Withdraw_UpDown: ; e29b5 (38:69b5) +Withdraw_UpDown: ld hl, hJoyLast ld a, [wBillsPC_NumMonsOnScreen] ld d, a @@ -860,9 +842,8 @@ Withdraw_UpDown: ; e29b5 (38:69b5) jr nz, BillsPC_PressDown .empty jp BillsPC_JoypadDidNothing -; e29d0 (38:69d0) -MoveMonWithoutMail_DPad: ; e29d0 +MoveMonWithoutMail_DPad: ld hl, hJoyLast ld a, [wBillsPC_NumMonsOnScreen] ld d, a @@ -886,7 +867,7 @@ MoveMonWithoutMail_DPad: ; e29d0 jr nz, BillsPC_PressRight jr BillsPC_JoypadDidNothing -MoveMonWithoutMail_DPad_2: ; e29f4 +MoveMonWithoutMail_DPad_2: ld hl, hJoyLast ld a, [wBillsPC_NumMonsOnScreen] ld d, a @@ -911,7 +892,7 @@ MoveMonWithoutMail_DPad_2: ; e29f4 jr nz, BillsPC_PressRight jr BillsPC_JoypadDidNothing -BillsPC_PressUp: ; e2a18 (38:6a18) +BillsPC_PressUp: ld hl, wBillsPC_CursorPosition ld a, [hl] and a @@ -927,7 +908,7 @@ BillsPC_PressUp: ; e2a18 (38:6a18) dec [hl] jr BillsPC_UpDownDidSomething -BillsPC_PressDown: ; e2a2c (38:6a2c) +BillsPC_PressDown: ld a, [wBillsPC_CursorPosition] ld hl, wBillsPC_ScrollPosition add [hl] @@ -947,9 +928,8 @@ BillsPC_PressDown: ; e2a2c (38:6a2c) ld hl, wBillsPC_ScrollPosition inc [hl] jr BillsPC_UpDownDidSomething -; e2a48 (38:6a48) -BillsPC_PressLeft: ; e2a48 +BillsPC_PressLeft: ld hl, wBillsPC_LoadedBox ld a, [hl] and a @@ -961,7 +941,7 @@ BillsPC_PressLeft: ; e2a48 ld [hl], NUM_BOXES jr BillsPC_LeftRightDidSomething -BillsPC_PressRight: ; e2a56 +BillsPC_PressRight: ld hl, wBillsPC_LoadedBox ld a, [hl] cp NUM_BOXES @@ -973,23 +953,21 @@ BillsPC_PressRight: ; e2a56 ld [hl], 0 jr BillsPC_LeftRightDidSomething -BillsPC_JoypadDidNothing: ; e2a65 (38:6a65) +BillsPC_JoypadDidNothing: xor a and a ret -BillsPC_UpDownDidSomething: ; e2a68 (38:6a68) +BillsPC_UpDownDidSomething: ld a, TRUE and a ret -; e2a6c (38:6a6c) -BillsPC_LeftRightDidSomething: ; e2a6c +BillsPC_LeftRightDidSomething: scf ret -; e2a6e -BillsPC_PlaceString: ; e2a6e (38:6a6e) +BillsPC_PlaceString: push de hlcoord 0, 15 lb bc, 1, 18 @@ -998,18 +976,16 @@ BillsPC_PlaceString: ; e2a6e (38:6a6e) hlcoord 1, 16 call PlaceString ret -; e2a80 (38:6a80) -BillsPC_MoveMonWOMail_BoxNameAndArrows: ; e2a80 +BillsPC_MoveMonWOMail_BoxNameAndArrows: call BillsPC_BoxName hlcoord 8, 1 ld [hl], $5f hlcoord 19, 1 ld [hl], $5e ret -; e2a8e -BillsPC_BoxName: ; e2a8e (38:6a8e) +BillsPC_BoxName: hlcoord 8, 0 lb bc, 1, 10 call TextBox @@ -1038,13 +1014,11 @@ BillsPC_BoxName: ; e2a8e (38:6a8e) hlcoord 10, 1 call PlaceString ret -; e2abd (38:6abd) .PartyPKMN: db "PARTY @" -; e2ac6 -PCMonInfo: ; e2ac6 (38:6ac6) +PCMonInfo: ; Display a monster's pic and ; attributes when highlighting ; it in a PC menu. @@ -1143,7 +1117,7 @@ PCMonInfo: ; e2ac6 (38:6ac6) ld [hl], a ret -BillsPC_LoadMonStats: ; e2b6d (38:6b6d) +BillsPC_LoadMonStats: ld a, [wBillsPC_CursorPosition] ld hl, wBillsPC_ScrollPosition add [hl] @@ -1250,7 +1224,7 @@ BillsPC_LoadMonStats: ; e2b6d (38:6b6d) call CloseSRAM ret -BillsPC_RefreshTextboxes: ; e2c2c (38:6c2c) +BillsPC_RefreshTextboxes: hlcoord 8, 2 lb bc, 10, 10 call TextBox @@ -1287,13 +1261,11 @@ BillsPC_RefreshTextboxes: ; e2c2c (38:6c2c) dec a jr nz, .loop ret -; e2c67 (38:6c67) .CancelString: db "CANCEL@" -; e2c6e -.PlaceNickname: ; e2c6e (38:6c6e) +.PlaceNickname: ld a, [de] and a ret z @@ -1402,11 +1374,9 @@ BillsPC_RefreshTextboxes: ; e2c2c (38:6c2c) ld de, .Placeholder call PlaceString ret -; e2d2a (38:6d2a) .Placeholder: db "-----@" -; e2d30 copy_box_data: MACRO .loop\@ @@ -1442,7 +1412,7 @@ endc ld [wBillsPC_NumMonsInBox], a ENDM -CopyBoxmonSpecies: ; e2d30 (38:6d30) +CopyBoxmonSpecies: xor a ld hl, wBillsPCPokemonList ld bc, 3 * 30 @@ -1476,7 +1446,7 @@ CopyBoxmonSpecies: ; e2d30 (38:6d30) copy_box_data 1 ret -BillsPC_GetSelectedPokemonSpecies: ; e2def (38:6def) +BillsPC_GetSelectedPokemonSpecies: ld a, [wBillsPC_CursorPosition] ld hl, wBillsPC_ScrollPosition add [hl] @@ -1489,7 +1459,7 @@ BillsPC_GetSelectedPokemonSpecies: ; e2def (38:6def) ld a, [hl] ret -BillsPC_UpdateSelectionCursor: ; e2e01 (38:6e01) +BillsPC_UpdateSelectionCursor: ld a, [wBillsPC_NumMonsInBox] and a jr nz, .place_cursor @@ -1516,9 +1486,8 @@ rept SPRITEOAMSTRUCT_LENGTH + -1 inc de endr jr .loop -; e2e2b (38:6e2b) -.OAM: ; e2e2b +.OAM: dsprite 4, 6, 10, 0, $00, 0 dsprite 4, 6, 11, 0, $00, 0 dsprite 4, 6, 12, 0, $00, 0 @@ -1544,9 +1513,8 @@ endr dsprite 5, 6, 19, 1, $01, 0 | X_FLIP dsprite 6, 1, 19, 1, $01, 0 | X_FLIP | Y_FLIP db -1 -; e2e8c -BillsPC_UpdateInsertCursor: ; e2e8c +BillsPC_UpdateInsertCursor: ld hl, .OAM ld de, wVirtualOAMSprite00 .loop @@ -1566,9 +1534,8 @@ rept SPRITEOAMSTRUCT_LENGTH + -1 inc de endr jr .loop -; e2eac -.OAM: ; e2eac +.OAM: dsprite 4, 7, 10, 0, $06, 0 dsprite 5, 3, 11, 0, $00, 0 | Y_FLIP dsprite 5, 3, 12, 0, $00, 0 | Y_FLIP @@ -1580,9 +1547,8 @@ endr dsprite 5, 3, 18, 0, $00, 0 | Y_FLIP dsprite 4, 7, 19, 0, $07, 0 db -1 -; e2ed5 -Unreferenced_BillsPC_FillBox: ; e2ed5 +Unreferenced_BillsPC_FillBox: .row push bc push hl @@ -1597,9 +1563,8 @@ Unreferenced_BillsPC_FillBox: ; e2ed5 dec b jr nz, .row ret -; e2ee5 -BillsPC_CheckSpaceInDestination: ; e2ee5 +BillsPC_CheckSpaceInDestination: ; If moving within a box, no need to be here. ld hl, wBillsPC_LoadedBox ld a, [wBillsPC_BackupLoadedBox] @@ -1633,9 +1598,8 @@ BillsPC_CheckSpaceInDestination: ; e2ee5 call DelayFrames scf ret -; e2f18 -BillsPC_CheckMail_PreventBlackout: ; e2f18 (38:6f18) +BillsPC_CheckMail_PreventBlackout: ld a, [wBillsPC_LoadedBox] and a jr nz, .Okay @@ -1675,7 +1639,7 @@ BillsPC_CheckMail_PreventBlackout: ; e2f18 (38:6f18) scf ret -BillsPC_IsMonAnEgg: ; e2f5f (38:6f5f) +BillsPC_IsMonAnEgg: ld a, [wCurPartySpecies] cp EGG jr z, .egg @@ -1693,7 +1657,7 @@ BillsPC_IsMonAnEgg: ; e2f5f (38:6f5f) scf ret -BillsPC_StatsScreen: ; e2f7e (38:6f7e) +BillsPC_StatsScreen: call LowVolume call BillsPC_CopyMon ld a, $3 @@ -1703,7 +1667,7 @@ BillsPC_StatsScreen: ; e2f7e (38:6f7e) call MaxVolume ret -StatsScreenDPad: ; e2f95 (38:6f95) +StatsScreenDPad: ld hl, hJoyPressed ; $ffa7 ld a, [hl] and A_BUTTON | B_BUTTON | D_RIGHT | D_LEFT @@ -1737,7 +1701,7 @@ StatsScreenDPad: ; e2f95 (38:6f95) ld [wMenuJoypad], a ret -BillsPC_CopyMon: ; e2fd6 (38:6fd6) +BillsPC_CopyMon: ld a, [wBillsPC_CursorPosition] ld hl, wBillsPC_ScrollPosition add [hl] @@ -1809,7 +1773,7 @@ BillsPC_CopyMon: ; e2fd6 (38:6fd6) farcall CalcBufferMonStats ret -DepositPokemon: ; e307c (38:707c) +DepositPokemon: ld a, [wBillsPC_CursorPosition] ld hl, wBillsPC_ScrollPosition add [hl] @@ -1861,7 +1825,7 @@ DepositPokemon: ; e307c (38:707c) scf ret -TryWithdrawPokemon: ; e30fa (38:70fa) +TryWithdrawPokemon: ld a, [wBillsPC_CursorPosition] ld hl, wBillsPC_ScrollPosition add [hl] @@ -1917,7 +1881,7 @@ TryWithdrawPokemon: ; e30fa (38:70fa) ret -ReleasePKMN_ByePKMN: ; e3180 (38:7180) +ReleasePKMN_ByePKMN: hlcoord 0, 0 lb bc, 15, 8 call ClearBox @@ -1962,9 +1926,8 @@ ReleasePKMN_ByePKMN: ; e3180 (38:7180) ld c, 50 call DelayFrames ret -; e31e7 (38:71e7) -MovePKMNWitoutMail_InsertMon: ; e31e7 +MovePKMNWitoutMail_InsertMon: push hl push de push bc @@ -2005,27 +1968,23 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld de, .dw_return push de jp hl -; e322a -.dw_return ; e322a +.dw_return pop af ld e, a farcall MoveMonWOMail_InsertMon_SaveGame ret -; e3233 .Saving_LeaveOn: db "Saving… Leave ON!@" -; e3245 -.Jumptable: ; e3245 +.Jumptable: dw .BoxToBox dw .PartyToBox dw .BoxToParty dw .PartyToParty -; e324d -.BoxToBox: ; e324d +.BoxToBox: ld hl, wBillsPC_BackupLoadedBox ld a, [wBillsPC_LoadedBox] cp [hl] @@ -2039,9 +1998,8 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 call .CheckTrivialMove call .CopyToBox ret -; e3267 -.PartyToBox: ; e3267 +.PartyToBox: call .CopyFromParty ld a, $1 ld [wGameLogicPaused], a @@ -2050,22 +2008,19 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld [wGameLogicPaused], a call .CopyToBox ret -; e327d -.BoxToParty: ; e327d +.BoxToParty: call .CopyFromBox call .CopyToParty ret -; e3284 -.PartyToParty: ; e3284 +.PartyToParty: call .CopyFromParty call .CheckTrivialMove call .CopyToParty ret -; e328e -.CheckTrivialMove: ; e328e +.CheckTrivialMove: ld a, [wBillsPC_CursorPosition] ld hl, wBillsPC_ScrollPosition add [hl] @@ -2089,9 +2044,8 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ret z dec [hl] ret -; e32b0 -.CopyFromBox: ; e32b0 +.CopyFromBox: ld a, [wBillsPC_BackupLoadedBox] dec a ld e, a @@ -2117,9 +2071,8 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld [wPokemonWithdrawDepositParameter], a farcall RemoveMonFromPartyOrBox ret -; e32fa -.CopyToBox: ; e32fa +.CopyToBox: ld a, [wBillsPC_LoadedBox] dec a ld e, a @@ -2130,9 +2083,8 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld [wCurPartyMon], a farcall InsertPokemonIntoBox ret -; e3316 -.CopyFromParty: ; e3316 +.CopyFromParty: ld a, [wBillsPC_BackupCursorPosition] ld hl, wBillsPC_BackupScrollPosition add [hl] @@ -2150,18 +2102,16 @@ MovePKMNWitoutMail_InsertMon: ; e31e7 ld [wPokemonWithdrawDepositParameter], a farcall RemoveMonFromPartyOrBox ret -; e3346 -.CopyToParty: ; e3346 +.CopyToParty: ld a, [wBillsPC_CursorPosition] ld hl, wBillsPC_ScrollPosition add [hl] ld [wCurPartyMon], a farcall InsertPokemonIntoParty ret -; e3357 -CopySpeciesToTemp: ; e3357 (38:7357) +CopySpeciesToTemp: ld a, [wCurPartyMon] ld c, a ld b, $0 @@ -2170,7 +2120,7 @@ CopySpeciesToTemp: ; e3357 (38:7357) ld [wCurPartySpecies], a ret -CopyNicknameToTemp: ; e3363 (38:7363) +CopyNicknameToTemp: ld bc, MON_NAME_LENGTH ld a, [wCurPartyMon] call AddNTimes @@ -2179,7 +2129,7 @@ CopyNicknameToTemp: ; e3363 (38:7363) call CopyBytes ret -CopyOTNameToTemp: ; e3376 (38:7376) +CopyOTNameToTemp: ld bc, NAME_LENGTH ld a, [wCurPartyMon] call AddNTimes @@ -2188,14 +2138,14 @@ CopyOTNameToTemp: ; e3376 (38:7376) call CopyBytes ret -CopyMonToTemp: ; e3389 (38:7389) +CopyMonToTemp: ld a, [wCurPartyMon] call AddNTimes ld de, wBufferMon call CopyBytes ret -GetBoxPointer: ; e3396 (38:7396) +GetBoxPointer: dec b ld c, b ld b, 0 @@ -2209,9 +2159,8 @@ GetBoxPointer: ; e3396 (38:7396) ld h, [hl] ld l, a ret -; e33a6 (38:73a6) -.boxes ; e33a6 +.boxes ; bank, address dba sBox1 dba sBox2 @@ -2227,9 +2176,8 @@ GetBoxPointer: ; e3396 (38:7396) dba sBox12 dba sBox13 dba sBox14 -; e33d0 -BillsPC_ApplyPalettes: ; e33d0 (38:73d0) +BillsPC_ApplyPalettes: ld b, a call GetSGBLayout ld a, %11100100 @@ -2238,7 +2186,7 @@ BillsPC_ApplyPalettes: ; e33d0 (38:73d0) call DmgToCgbObjPal0 ret -BillsPC_Jumptable: ; e33df (38:73df) +BillsPC_Jumptable: ld e, a ld d, $0 add hl, de @@ -2248,7 +2196,7 @@ BillsPC_Jumptable: ; e33df (38:73df) ld l, a ret -BillsPC_InitGFX: ; e33e8 (38:73e8) +BillsPC_InitGFX: call DisableLCD ld hl, vTiles2 tile $00 ld bc, $31 tiles @@ -2267,11 +2215,9 @@ BillsPC_InitGFX: ; e33e8 (38:73e8) call SkipMusic call EnableLCD ret -; e3419 (38:7419) PCSelectLZ: INCBIN "gfx/pc/pc.2bpp.lz" PCMailGFX: INCBIN "gfx/pc/pc_mail.2bpp" -; e34dd PCString_ChooseaPKMN: db "Choose a .@" PCString_WhatsUp: db "What's up?@" @@ -2289,10 +2235,9 @@ PCString_Non: db "Non.@" PCString_BoxFull: db "The BOX is full.@" PCString_PartyFull: db "The party's full!@" PCString_NoReleasingEGGS: db "No releasing EGGS!@" -; e35aa -_ChangeBox: ; e35aa (38:75aa) +_ChangeBox: call LoadStandardMenuHeader call BillsPC_ClearTilemap .loop @@ -2318,7 +2263,7 @@ _ChangeBox: ; e35aa (38:75aa) call CloseWindow ret -BillsPC_ClearTilemap: ; e35e2 (38:75e2) +BillsPC_ClearTilemap: xor a ld [hBGMapMode], a hlcoord 0, 0 @@ -2326,7 +2271,6 @@ BillsPC_ClearTilemap: ; e35e2 (38:75e2) ld a, " " call ByteFill ret -; e35f1 (38:75f1) _ChangeBox_MenuHeader: ; 0xe35f1 db MENU_BACKUP_TILES ; flags @@ -2343,9 +2287,8 @@ _ChangeBox_MenuHeader: ; 0xe35f1 dba .boxnames dba NULL dba BillsPC_PrintBoxCountAndCapacity -; e3609 -.boxes ; e3609 +.boxes db NUM_BOXES x = 1 rept NUM_BOXES @@ -2353,9 +2296,8 @@ rept NUM_BOXES x = x + 1 endr db -1 -; e3619 -.boxnames ; e3619 +.boxnames push de ld a, [wMenuSelection] dec a @@ -2363,18 +2305,16 @@ endr pop hl call PlaceString ret -; e3626 -GetBoxName: ; e3626 (38:7626) +GetBoxName: ld bc, BOX_NAME_LENGTH ld hl, wBoxNames call AddNTimes ld d, h ld e, l ret -; e3632 (38:7632) -BillsPC_PrintBoxCountAndCapacity: ; e3632 +BillsPC_PrintBoxCountAndCapacity: hlcoord 11, 7 lb bc, 5, 7 call TextBox @@ -2393,21 +2333,18 @@ BillsPC_PrintBoxCountAndCapacity: ; e3632 ld de, .out_of_20 call PlaceString ret -; e3663 -.Pokemon: ; e3663 +.Pokemon: db "#MON@" -; e3668 -.out_of_20 ; e3668 +.out_of_20 ; db "/20@" db "/" db "0" + MONS_PER_BOX / 10 ; "2" db "0" + MONS_PER_BOX % 10 ; "0" db "@" -; e366c -GetBoxCount: ; e366c (38:766c) +GetBoxCount: ld a, [wCurBox] ld c, a ld a, [wMenuSelection] @@ -2447,9 +2384,8 @@ GetBoxCount: ; e366c (38:766c) ld a, [hl] call CloseSRAM ret -; e36a5 (38:76a5) -.boxbanks ; e36a5 +.boxbanks dba sBox1 dba sBox2 dba sBox3 @@ -2464,9 +2400,8 @@ GetBoxCount: ; e366c (38:766c) dba sBox12 dba sBox13 dba sBox14 -; e36cf -BillsPC_PrintBoxName: ; e36cf (38:76cf) +BillsPC_PrintBoxName: hlcoord 0, 0 ld b, 2 ld c, 18 @@ -2480,13 +2415,11 @@ BillsPC_PrintBoxName: ; e36cf (38:76cf) hlcoord 11, 2 call PlaceString ret -; e36f1 (38:76f1) -.Current: ; e36f1 +.Current: db "CURRENT@" -; e36f9 -BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9) +BillsPC_ChangeBoxSubmenu: ld hl, .MenuHeader call LoadMenuHeader call VerticalMenu @@ -2552,7 +2485,6 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9) ld de, wd002 call CopyName2 ret -; e3778 (38:7778) hlcoord 11, 7 ; unused @@ -2572,25 +2504,21 @@ BillsPC_ChangeBoxSubmenu: ; e36f9 (38:76f9) db "QUIT@" ; 0xe379c -BillsPC_PlaceChooseABoxString: ; e379c (38:779c) +BillsPC_PlaceChooseABoxString: ld de, .ChooseABox jr BillsPC_PlaceChangeBoxString -; e37a1 (38:77a1) -.ChooseABox: ; e37a1 +.ChooseABox: db "Choose a BOX.@" -; e37af -BillsPC_PlaceWhatsUpString: ; e37af (38:77af) +BillsPC_PlaceWhatsUpString: ld de, .WhatsUp jr BillsPC_PlaceChangeBoxString -; e37b4 (38:77b4) -.WhatsUp: ; e37b4 +.WhatsUp: db "What's up?@" -; e37be -BillsPC_PlaceEmptyBoxString_SFX: ; e37be (38:77be) +BillsPC_PlaceEmptyBoxString_SFX: ld de, .NoMonString call BillsPC_PlaceChangeBoxString ld de, SFX_WRONG @@ -2599,13 +2527,11 @@ BillsPC_PlaceEmptyBoxString_SFX: ; e37be (38:77be) ld c, 50 call DelayFrames ret -; e37d3 (38:77d3) -.NoMonString: ; e37d3 +.NoMonString: db "There's no #MON.@" -; e37e3 -BillsPC_PlaceChangeBoxString: ; e37e3 (38:77e3) +BillsPC_PlaceChangeBoxString: push de hlcoord 0, 14 lb bc, 2, 18 diff --git a/engine/pokemon/bills_pc_top.asm b/engine/pokemon/bills_pc_top.asm index e25381e29df..d3b55ccce06 100644 --- a/engine/pokemon/bills_pc_top.asm +++ b/engine/pokemon/bills_pc_top.asm @@ -1,11 +1,11 @@ -_BillsPC: ; e3fd +_BillsPC: call .CheckCanUsePC ret c call .LogIn call .UseBillsPC jp .LogOut -.CheckCanUsePC: ; e40a (3:640a) +.CheckCanUsePC: ld a, [wPartyCount] and a ret nz @@ -19,7 +19,7 @@ _BillsPC: ; e3fd text_jump UnknownText_0x1c1006 db "@" -.LogIn: ; e41c (3:641c) +.LogIn: xor a ld [hBGMapMode], a call LoadStandardMenuHeader @@ -40,11 +40,11 @@ _BillsPC: ; e3fd text_jump UnknownText_0x1c1024 db "@" -.LogOut: ; e43f (3:643f) +.LogOut: call CloseSubmenu ret -.UseBillsPC: ; e443 (3:6443) +.UseBillsPC: ld hl, .MenuHeader call LoadMenuHeader ld a, $1 @@ -81,21 +81,21 @@ _BillsPC: ; e3fd dw PlaceMenuStrings dw .strings -.strings ; e47f +.strings db "WITHDRAW @" db "DEPOSIT @" db "CHANGE BOX@" db "MOVE W/O MAIL@" db "SEE YA!@" -.Jumptable: ; e4ba (3:64ba) +.Jumptable: dw BillsPC_WithdrawMenu dw BillsPC_DepositMenu dw BillsPC_ChangeBoxMenu dw BillsPC_MovePKMNMenu dw BillsPC_SeeYa -.items ; e4c4 +.items db 5 ; # items db 0 ; WITHDRAW db 1 ; DEPOSIT @@ -104,11 +104,11 @@ _BillsPC: ; e3fd db 4 ; SEE YA! db -1 -BillsPC_SeeYa: ; e4cb +BillsPC_SeeYa: scf ret -BillsPC_MovePKMNMenu: ; e4cd +BillsPC_MovePKMNMenu: call LoadStandardMenuHeader farcall IsAnyMonHoldingMail jr nc, .no_mail @@ -133,7 +133,7 @@ BillsPC_MovePKMNMenu: ; e4cd text_jump UnknownText_0x1c102b db "@" -BillsPC_DepositMenu: ; e4fe (3:64fe) +BillsPC_DepositMenu: call LoadStandardMenuHeader farcall _DepositPKMN call ReturnToMapFromSubmenu @@ -173,7 +173,7 @@ Unreferenced_Functione512: text_jump UnknownText_0x1c1080 db "@" -CheckCurPartyMonFainted: ; e538 +CheckCurPartyMonFainted: ld hl, wPartyMon1HP ld de, PARTYMON_STRUCT_LENGTH ld b, $0 @@ -202,7 +202,7 @@ CheckCurPartyMonFainted: ; e538 and a ret -BillsPC_WithdrawMenu: ; e559 (3:6559) +BillsPC_WithdrawMenu: call LoadStandardMenuHeader farcall _WithdrawPKMN call ReturnToMapFromSubmenu @@ -229,12 +229,12 @@ UnknownText_0xe57e: ; 0xe57e text_jump UnknownText_0x1c10a2 db "@" -BillsPC_ChangeBoxMenu: ; e583 (3:6583) +BillsPC_ChangeBoxMenu: farcall _ChangeBox and a ret -ClearPCItemScreen: ; e58b +ClearPCItemScreen: call DisableSpriteUpdates xor a ld [hBGMapMode], a @@ -254,7 +254,7 @@ ClearPCItemScreen: ; e58b call SetPalettes ; load regular palettes? ret -CopyBoxmonToTempMon: ; e5bb +CopyBoxmonToTempMon: ld a, [wCurPartyMon] ld hl, sBoxMon1Species ld bc, BOXMON_STRUCT_LENGTH @@ -370,7 +370,7 @@ Unreferenced_Functione5d9: call CloseSRAM ret -.BoxAddrs: ; e66e +.BoxAddrs: dba sBox1 dba sBox2 dba sBox3 diff --git a/engine/pokemon/breeding.asm b/engine/pokemon/breeding.asm index cc32122a7cd..4f4319be1eb 100644 --- a/engine/pokemon/breeding.asm +++ b/engine/pokemon/breeding.asm @@ -1,4 +1,4 @@ -CheckBreedmonCompatibility: ; 16e1d +CheckBreedmonCompatibility: call .CheckBreedingGroupCompatibility ld c, $0 jp nc, .done @@ -83,10 +83,9 @@ CheckBreedmonCompatibility: ; 16e1d ld a, c ld [wd265], a ret -; 16ebc -.CheckDVs: ; 16ebc (5:6ebc) +.CheckDVs: ; If Defense DVs match and the lower 3 bits of the Special DVs match, ; avoid breeding ld a, [wBreedMon1DVs] @@ -103,9 +102,8 @@ CheckBreedmonCompatibility: ; 16e1d and %111 cp b ret -; 16ed6 -.CheckBreedingGroupCompatibility: ; 16ed6 +.CheckBreedingGroupCompatibility: ; If either mon is in the No Eggs group, ; they are not compatible. ld a, [wBreedMon2Species] @@ -173,9 +171,8 @@ CheckBreedmonCompatibility: ; 16e1d .Compatible: scf ret -; 16f3e -DoEggStep:: ; 16f3e +DoEggStep:: ld de, wPartySpecies ld hl, wPartyMon1Happiness ld c, 0 @@ -198,24 +195,22 @@ DoEggStep:: ; 16f3e add hl, de pop de jr .loop -; 16f5e -OverworldHatchEgg:: ; 16f5e +OverworldHatchEgg:: call RefreshScreen call LoadStandardMenuHeader call HatchEggs call ExitAllMenus call RestartMapMusic jp CloseText -; 16f70 -HatchEggs: ; 16f70 (5:6f70) +HatchEggs: ld de, wPartySpecies ld hl, wPartyMon1Happiness xor a ld [wCurPartyMon], a -.loop ; 16f7a (5:6f7a) +.loop ld a, [de] inc de cp -1 @@ -348,7 +343,7 @@ HatchEggs: ; 16f70 (5:6f70) ld bc, MON_NAME_LENGTH call CopyBytes -.next ; 1707d (5:707d) +.next ld hl, wCurPartyMon inc [hl] pop hl @@ -357,9 +352,8 @@ HatchEggs: ; 16f70 (5:6f70) pop de jp .loop -.done ; 1708a (5:708a) +.done ret -; 1708b (5:708b) .Text_HatchEgg: ; 0x1708b ; Huh? @ @ @@ -382,7 +376,6 @@ HatchEggs: ; 16f70 (5:6f70) pop hl ld hl, .CameOutOfItsEgg ret -; 170b0 (5:70b0) .ClearTextbox: ; 0x170b0 ; @@ -402,7 +395,7 @@ HatchEggs: ; 16f70 (5:6f70) db "@" ; 0x170bf -InitEggMoves: ; 170bf +InitEggMoves: call GetHeritableMoves ld d, h ld e, l @@ -431,9 +424,8 @@ InitEggMoves: ; 170bf .done ret -; 170e4 -GetEggMove: ; 170e4 +GetEggMove: push bc ld a, [wEggMonSpecies] dec a @@ -526,9 +518,8 @@ GetEggMove: ; 170e4 pop bc and a ret -; 17169 -LoadEggMove: ; 17169 +LoadEggMove: push de push bc ld a, [de] @@ -561,9 +552,8 @@ LoadEggMove: ; 17169 pop bc pop de ret -; 17197 -GetHeritableMoves: ; 17197 +GetHeritableMoves: ld hl, wBreedMon2Moves ld a, [wBreedMon1Species] cp DITTO @@ -619,9 +609,8 @@ GetHeritableMoves: ; 17197 pop af ld [wCurPartySpecies], a ret -; 1720b -GetBreedmonMovePointer: ; 1720b +GetBreedmonMovePointer: ld hl, wBreedMon1Moves ld a, [wBreedMon1Species] cp DITTO @@ -636,10 +625,9 @@ GetBreedmonMovePointer: ; 1720b .ditto ld hl, wBreedMon2Moves ret -; 17224 -GetEggFrontpic: ; 17224 (5:7224) +GetEggFrontpic: push de ld [wCurPartySpecies], a ld [wCurSpecies], a @@ -649,7 +637,7 @@ GetEggFrontpic: ; 17224 (5:7224) pop de predef_jump GetMonFrontpic -GetHatchlingFrontpic: ; 1723c (5:723c) +GetHatchlingFrontpic: push de ld [wCurPartySpecies], a ld [wCurSpecies], a @@ -659,7 +647,7 @@ GetHatchlingFrontpic: ; 1723c (5:723c) pop de predef_jump GetAnimatedFrontpic -Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) +Hatch_UpdateFrontpicBGMapCenter: push af call WaitTop push hl @@ -681,7 +669,7 @@ Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254) call SetPalettes jp WaitBGMap -EggHatch_DoAnimFrame: ; 1727f (5:727f) +EggHatch_DoAnimFrame: push hl push de push bc @@ -692,7 +680,7 @@ EggHatch_DoAnimFrame: ; 1727f (5:727f) pop hl ret -EggHatch_AnimationSequence: ; 1728f (5:728f) +EggHatch_AnimationSequence: ld a, [wd265] ld [wJumptableIndex], a ld a, [wCurSpecies] @@ -782,13 +770,13 @@ EggHatch_AnimationSequence: ; 1728f (5:728f) ld [wCurSpecies], a ret -Hatch_LoadFrontpicPal: ; 17363 (5:7363) +Hatch_LoadFrontpicPal: ld [wPlayerHPPal], a ld b, SCGB_EVOLUTION ld c, $0 jp GetSGBLayout -EggHatch_CrackShell: ; 1736d (5:736d) +EggHatch_CrackShell: ld a, [wFrameCounter] dec a and $7 @@ -808,13 +796,11 @@ EggHatch_CrackShell: ; 1736d (5:736d) ld [hl], $0 ld de, SFX_EGG_CRACK jp PlaySFX -; 17393 (5:7393) -EggHatchGFX: ; 17393 +EggHatchGFX: INCBIN "gfx/evo/egg_hatch.2bpp" -; 173b3 -Hatch_InitShellFragments: ; 173b3 (5:73b3) +Hatch_InitShellFragments: farcall ClearSpriteAnims ld hl, .SpriteData .loop @@ -856,14 +842,13 @@ Hatch_InitShellFragments: ; 173b3 (5:73b3) call PlaySFX call EggHatch_DoAnimFrame ret -; 173ef (5:73ef) shell_fragment: MACRO ; y tile, y pxl, x tile, x pxl, frameset offset, ??? db (\1 * 8) % $100 + \2, (\3 * 8) % $100 + \4, \5 - SPRITE_ANIM_FRAMESET_EGG_HATCH_1, \6 ENDM -.SpriteData: ; 173ef +.SpriteData: shell_fragment 10, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $3c shell_fragment 11, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $04 shell_fragment 10, 4, 10, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $30 @@ -875,9 +860,8 @@ ENDM shell_fragment 10, 0, 10, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_3, $2a shell_fragment 12, 0, 10, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_4, $16 db -1 -; 17418 -Hatch_ShellFragmentLoop: ; 17418 (5:7418) +Hatch_ShellFragmentLoop: ld c, 129 .loop call EggHatch_DoAnimFrame @@ -885,7 +869,7 @@ Hatch_ShellFragmentLoop: ; 17418 (5:7418) jr nz, .loop ret -DayCareMon1: ; 17421 +DayCareMon1: ld hl, DayCareMon1Text call PrintText ld a, [wBreedMon1Species] @@ -898,7 +882,7 @@ DayCareMon1: ; 17421 call DayCareMonCompatibilityText jp PrintText -DayCareMon2: ; 17440 +DayCareMon2: ld hl, DayCareMon2Text call PrintText ld a, [wBreedMon2Species] @@ -911,9 +895,8 @@ DayCareMon2: ; 17440 call DayCareMonCompatibilityText jp PrintText -DayCareMonCursor: ; 1745f +DayCareMonCursor: jp WaitPressAorB_BlinkCursor -; 17462 DayCareMon2Text: ; 0x17462 ; It's @ that was left with the DAY-CARE LADY. @@ -927,7 +910,7 @@ DayCareMon1Text: ; 0x17467 db "@" ; 0x1746c -DayCareMonCompatibilityText: ; 1746c +DayCareMonCompatibilityText: push bc ld de, wStringBuffer1 ld bc, NAME_LENGTH @@ -951,7 +934,6 @@ DayCareMonCompatibilityText: ; 1746c .done ret -; 1749c .AllAlone: ; 0x1749c ; It's brimming with energy. @@ -983,12 +965,10 @@ DayCareMonCompatibilityText: ; 1746c db "@" ; 0x174b5 -Unreferenced_DayCareMonPrintEmptyString: ; 174b5 +Unreferenced_DayCareMonPrintEmptyString: ld hl, .string ret -; 174b9 -.string ; 174b9 +.string db "@" -; 174ba diff --git a/engine/pokemon/breedmon_level_growth.asm b/engine/pokemon/breedmon_level_growth.asm index dc22db7985e..c6356dd6ee3 100644 --- a/engine/pokemon/breedmon_level_growth.asm +++ b/engine/pokemon/breedmon_level_growth.asm @@ -1,4 +1,4 @@ -GetBreedMon1LevelGrowth: ; e698 +GetBreedMon1LevelGrowth: ld hl, wBreedMon1Stats ld de, wTempMon ld bc, BOXMON_STRUCT_LENGTH @@ -12,7 +12,7 @@ GetBreedMon1LevelGrowth: ; e698 ld d, a ret -GetBreedMon2LevelGrowth: ; e6b3 +GetBreedMon2LevelGrowth: ld hl, wBreedMon2Stats ld de, wTempMon ld bc, BOXMON_STRUCT_LENGTH diff --git a/engine/pokemon/caught_data.asm b/engine/pokemon/caught_data.asm index 3bfacf53913..a3edecb2d21 100644 --- a/engine/pokemon/caught_data.asm +++ b/engine/pokemon/caught_data.asm @@ -1,4 +1,4 @@ -CheckPartyFullAfterContest: ; 4d9e5 +CheckPartyFullAfterContest: ld a, [wContestMon] and a jp z, .DidntCatchAnything @@ -85,7 +85,7 @@ CheckPartyFullAfterContest: ; 4d9e5 ld [wScriptVar], a ret -.TryAddToBox: ; 4daa3 +.TryAddToBox: ld a, BANK(sBoxCount) call GetSRAMBank ld hl, sBoxCount @@ -146,12 +146,12 @@ CheckPartyFullAfterContest: ; 4d9e5 ld [wScriptVar], a ret -.DidntCatchAnything: ; 4db35 +.DidntCatchAnything: ld a, BUGCONTEST_NO_CATCH ld [wScriptVar], a ret -GiveANickname_YesNo: ; 4db3b +GiveANickname_YesNo: ld hl, TextJump_GiveANickname call PrintText jp YesNoBox @@ -161,12 +161,12 @@ TextJump_GiveANickname: ; 0x4db44 text_jump UnknownText_0x1c12fc db "@" -SetCaughtData: ; 4db49 +SetCaughtData: ld a, [wPartyCount] dec a ld hl, wPartyMon1CaughtLevel call GetPartyLocation -SetBoxmonOrEggmonCaughtData: ; 4db53 +SetBoxmonOrEggmonCaughtData: ld a, [wTimeOfDay] inc a rrca @@ -199,7 +199,7 @@ SetBoxmonOrEggmonCaughtData: ; 4db53 ld [hl], a ret -SetBoxMonCaughtData: ; 4db83 +SetBoxMonCaughtData: ld a, BANK(sBoxMon1CaughtLevel) call GetSRAMBank ld hl, sBoxMon1CaughtLevel @@ -207,7 +207,7 @@ SetBoxMonCaughtData: ; 4db83 call CloseSRAM ret -SetGiftBoxMonCaughtData: ; 4db92 +SetGiftBoxMonCaughtData: push bc ld a, BANK(sBoxMon1CaughtLevel) call GetSRAMBank @@ -217,14 +217,14 @@ SetGiftBoxMonCaughtData: ; 4db92 call CloseSRAM ret -SetGiftPartyMonCaughtData: ; 4dba3 +SetGiftPartyMonCaughtData: ld a, [wPartyCount] dec a ld hl, wPartyMon1CaughtLevel push bc call GetPartyLocation pop bc -SetGiftMonCaughtData: ; 4dbaf +SetGiftMonCaughtData: xor a ld [hli], a ld a, GIFT_LOCATION @@ -233,7 +233,7 @@ SetGiftMonCaughtData: ; 4dbaf ld [hl], a ret -SetEggMonCaughtData: ; 4dbb8 (13:5bb8) +SetEggMonCaughtData: ld a, [wCurPartyMon] ld hl, wPartyMon1CaughtLevel call GetPartyLocation diff --git a/engine/pokemon/correct_nick_errors.asm b/engine/pokemon/correct_nick_errors.asm index 5d44846bfd6..335540cfec9 100644 --- a/engine/pokemon/correct_nick_errors.asm +++ b/engine/pokemon/correct_nick_errors.asm @@ -1,4 +1,4 @@ -CorrectNickErrors:: ; 669f +CorrectNickErrors:: ; error-check monster nick before use ; must be a peace offering to gamesharkers @@ -60,7 +60,7 @@ CorrectNickErrors:: ; 669f pop bc ret -.textcommands ; 66cf +.textcommands ; table defining which characters are actually text commands ; format: ; ≥ < diff --git a/engine/pokemon/correct_party_errors.asm b/engine/pokemon/correct_party_errors.asm index cf60115ee17..50a9f35623e 100644 --- a/engine/pokemon/correct_party_errors.asm +++ b/engine/pokemon/correct_party_errors.asm @@ -201,13 +201,11 @@ Unreferenced_CorrectPartyErrors: dec b jr nz, .loop5 ret -; 13b6b -.TAMAGO: ; 13b6b +.TAMAGO: db "タマゴ@@@" -; 13b71 -.GetLengthOfStringWith6CharCap: ; 13b71 +.GetLengthOfStringWith6CharCap: push de ld c, 1 ld b, NAME_LENGTH_JAPANESE @@ -226,4 +224,3 @@ Unreferenced_CorrectPartyErrors: .done pop de ret -; 13b87 diff --git a/engine/pokemon/european_mail.asm b/engine/pokemon/european_mail.asm index 8f037cc43b6..38c542d359b 100644 --- a/engine/pokemon/european_mail.asm +++ b/engine/pokemon/european_mail.asm @@ -1,4 +1,4 @@ -IsMailEuropean: ; 1de5c8 +IsMailEuropean: ; return 1 if French ; return 2 if German ; return 3 if Italian @@ -27,18 +27,18 @@ IsMailEuropean: ; 1de5c8 ret ; The regular font. -StandardEnglishFont: ; 1de5e6 +StandardEnglishFont: INCBIN "gfx/font/english.1bpp" ; An extended font. -FrenchGermanFont: ; 1de9e6 +FrenchGermanFont: INCBIN "gfx/font/french_german.1bpp" ; An even more extended font. -SpanishItalianFont: ; 1dede6 +SpanishItalianFont: INCBIN "gfx/font/spanish_italian.1bpp" -HandleFrenchGermanMail: ; 1df1e6 +HandleFrenchGermanMail: ; called if mail is french or german ; fix 's 't 'v ld b, sPartyMon1MailAuthor - sPartyMon1Mail @@ -68,7 +68,7 @@ HandleFrenchGermanMail: ; 1df1e6 ret LireLeCourrierAnglais: -DeutenEnglischenPost: ; 1df203 +DeutenEnglischenPost: ; Cette fonction convertit certains des caractères anglais pour ; leur équivalent dans le jeu de caractères français. ; Diese Funktion wandelt bestimmte englische Zeichen, um ihre @@ -99,7 +99,7 @@ DeutenEnglischenPost: ; 1df203 jr nz, .loop ret -HandleSpanishItalianMail: ; 1df220 +HandleSpanishItalianMail: LeerCorreosIngleses: LeggiPostaInglese: ; This function converts certain characters between diff --git a/engine/pokemon/evolve.asm b/engine/pokemon/evolve.asm index 291bd79b06f..ad17ca43eba 100644 --- a/engine/pokemon/evolve.asm +++ b/engine/pokemon/evolve.asm @@ -1,4 +1,4 @@ -EvolvePokemon: ; 421d8 +EvolvePokemon: ld hl, wEvolvableFlags xor a ld [hl], a @@ -6,7 +6,7 @@ EvolvePokemon: ; 421d8 ld c, a ld b, SET_FLAG call EvoFlagAction -EvolveAfterBattle: ; 421e6 +EvolveAfterBattle: xor a ld [wMonTriedToEvolve], a dec a @@ -323,7 +323,6 @@ EvolveAfterBattle_MasterLoop: ld l, e ld h, d jp EvolveAfterBattle_MasterLoop -; 423f8 .dont_evolve_1 inc hl @@ -349,9 +348,8 @@ EvolveAfterBattle_MasterLoop: and a call nz, RestartMapMusic ret -; 42414 -UpdateSpeciesNameIfNotNicknamed: ; 42414 +UpdateSpeciesNameIfNotNicknamed: ld a, [wCurSpecies] push af ld a, [wBaseDexNo] @@ -382,17 +380,15 @@ UpdateSpeciesNameIfNotNicknamed: ; 42414 pop de ld bc, MON_NAME_LENGTH jp CopyBytes -; 42454 -CancelEvolution: ; 42454 +CancelEvolution: ld hl, Text_StoppedEvolving call PrintText call ClearTileMap pop hl jp EvolveAfterBattle_MasterLoop -; 42461 -IsMonHoldingEverstone: ; 42461 +IsMonHoldingEverstone: push hl ld a, [wCurPartyMon] ld hl, wPartyMon1Item @@ -402,7 +398,6 @@ IsMonHoldingEverstone: ; 42461 cp EVERSTONE pop hl ret -; 42473 Text_CongratulationsYourPokemon: ; 0x42473 ; Congratulations! Your @ @ @@ -429,7 +424,7 @@ Text_WhatEvolving: ; 0x42482 ; 0x42487 -LearnLevelMoves: ; 42487 +LearnLevelMoves: ld a, [wd265] ld [wCurPartySpecies], a dec a @@ -492,10 +487,9 @@ LearnLevelMoves: ; 42487 ld a, [wCurPartySpecies] ld [wd265], a ret -; 424e1 -FillMoves: ; 424e1 +FillMoves: ; Fill in moves at de for wCurPartySpecies at wCurPartyLevel push hl @@ -604,9 +598,8 @@ FillMoves: ; 424e1 pop de pop hl ret -; 4256e -ShiftMoves: ; 4256e +ShiftMoves: ld c, NUM_MOVES - 1 .loop inc de @@ -615,18 +608,16 @@ ShiftMoves: ; 4256e dec c jr nz, .loop ret -; 42577 -EvoFlagAction: ; 42577 +EvoFlagAction: push de ld d, $0 predef SmallFarFlagAction pop de ret -; 42581 -GetPreEvolution: ; 42581 +GetPreEvolution: ; Find the first mon to evolve into wCurPartySpecies. ; Return carry and the new species in wCurPartySpecies @@ -673,4 +664,3 @@ GetPreEvolution: ; 42581 ld [wCurPartySpecies], a scf ret -; 425b1 diff --git a/engine/pokemon/experience.asm b/engine/pokemon/experience.asm index 6b94ed3573d..3c3b1043941 100644 --- a/engine/pokemon/experience.asm +++ b/engine/pokemon/experience.asm @@ -1,4 +1,4 @@ -CalcLevel: ; 50e1b +CalcLevel: ld a, [wTempMonSpecies] ld [wCurSpecies], a call GetBaseData @@ -30,7 +30,7 @@ CalcLevel: ; 50e1b dec d ret -CalcExpAtLevel: ; 50e47 +CalcExpAtLevel: ; (a/b)*n**3 + c*n**2 + d*n - e ld a, [wBaseGrowthRate] add a @@ -150,7 +150,7 @@ CalcExpAtLevel: ; 50e47 ld [hMultiplicand], a ret -.LevelSquared: ; 50eed +.LevelSquared: xor a ld [hMultiplicand + 0], a ld [hMultiplicand + 1], a diff --git a/engine/pokemon/health.asm b/engine/pokemon/health.asm index cc47e825222..229da1e19c2 100644 --- a/engine/pokemon/health.asm +++ b/engine/pokemon/health.asm @@ -1,4 +1,4 @@ -HealParty: ; c658 +HealParty: xor a ld [wCurPartyMon], a ld hl, wPartySpecies @@ -22,7 +22,7 @@ HealParty: ; c658 .done ret -HealPartyMon: ; c677 +HealPartyMon: ld a, MON_SPECIES call GetPartyParamLocation ld d, h @@ -52,7 +52,7 @@ HealPartyMon: ; c677 farcall RestoreAllPP ret -ComputeHPBarPixels: ; c699 +ComputeHPBarPixels: ; e = bc * (6 * 8) / de ld a, b or c @@ -103,7 +103,7 @@ ComputeHPBarPixels: ; c699 ld e, 0 ret -AnimateHPBar: ; c6e0 +AnimateHPBar: call WaitBGMap call _AnimateHPBar call WaitBGMap diff --git a/engine/pokemon/knows_move.asm b/engine/pokemon/knows_move.asm index 4ec3da34787..16021450f48 100644 --- a/engine/pokemon/knows_move.asm +++ b/engine/pokemon/knows_move.asm @@ -1,4 +1,4 @@ -KnowsMove: ; f9ea +KnowsMove: ld a, MON_MOVES call GetPartyParamLocation ld a, [wPutativeTMHMMove] diff --git a/engine/pokemon/learn.asm b/engine/pokemon/learn.asm index fb62289a773..20294c8787f 100644 --- a/engine/pokemon/learn.asm +++ b/engine/pokemon/learn.asm @@ -1,4 +1,4 @@ -LearnMove: ; 6508 +LearnMove: call LoadTileMapToTempTileMap ld a, [wCurPartyMon] ld hl, wPartyMonNicknames @@ -117,9 +117,8 @@ LearnMove: ; 6508 call PrintText ld b, 1 ret -; 65d3 -ForgetMove: ; 65d3 +ForgetMove: push hl ld hl, Text_TryingToLearn call PrintText @@ -200,40 +199,34 @@ ForgetMove: ; 65d3 .cancel scf ret -; 666b -Text_LearnedMove: ; 666b +Text_LearnedMove: ; learned ! text_jump UnknownText_0x1c5660 db "@" -; 6670 -Text_ForgetWhich: ; 6670 +Text_ForgetWhich: ; Which move should be forgotten? text_jump UnknownText_0x1c5678 db "@" -; 6675 -Text_StopLearning: ; 6675 +Text_StopLearning: ; Stop learning ? text_jump UnknownText_0x1c5699 db "@" -; 667a -Text_DidNotLearn: ; 667a +Text_DidNotLearn: ; did not learn . text_jump UnknownText_0x1c56af db "@" -; 667f -Text_TryingToLearn: ; 667f +Text_TryingToLearn: ; is trying to learn . But can't learn more than ; four moves. Delete an older move to make room for ? text_jump UnknownText_0x1c56c9 db "@" -; 6684 -Text_1_2_and_Poof: ; 6684 +Text_1_2_and_Poof: text_jump UnknownText_0x1c5740 ; 1, 2 and… start_asm push de @@ -247,10 +240,8 @@ Text_1_2_and_Poof: ; 6684 ; Poof! forgot . And… text_jump UnknownText_0x1c574e db "@" -; 669a -Text_CantForgetHM: ; 669a +Text_CantForgetHM: ; HM moves can't be forgotten now. text_jump UnknownText_0x1c5772 db "@" -; 669f diff --git a/engine/pokemon/level_up_happiness.asm b/engine/pokemon/level_up_happiness.asm index 8c6dd92fe3f..533399d9f15 100644 --- a/engine/pokemon/level_up_happiness.asm +++ b/engine/pokemon/level_up_happiness.asm @@ -1,4 +1,4 @@ -LevelUpHappinessMod: ; 2709e +LevelUpHappinessMod: ld a, [wCurPartyMon] ld hl, wPartyMon1CaughtLocation call GetPartyLocation diff --git a/engine/pokemon/mail.asm b/engine/pokemon/mail.asm index 33bce604d2c..c14d1006bfe 100644 --- a/engine/pokemon/mail.asm +++ b/engine/pokemon/mail.asm @@ -1,4 +1,4 @@ -SendMailToPC: ; 4456e +SendMailToPC: ld a, MON_ITEM call GetPartyParamLocation ld d, [hl] @@ -37,9 +37,8 @@ SendMailToPC: ; 4456e .full scf ret -; 445c0 -DeleteMailFromPC: ; 445c0 (11:45c0) +DeleteMailFromPC: ; Shift all mail messages in the mailbox ld a, BANK(sMailboxCount) call GetSRAMBank @@ -71,9 +70,8 @@ DeleteMailFromPC: ; 445c0 (11:45c0) ld hl, sMailboxCount dec [hl] jp CloseSRAM -; 445f4 (11:45f4) -ReadMailMessage: ; 445f4 +ReadMailMessage: ld a, b ld hl, sMailbox ld bc, MAIL_STRUCT_LENGTH @@ -83,7 +81,7 @@ ReadMailMessage: ; 445f4 farcall ReadAnyMail ret -MoveMailFromPCToParty: ; 44607 +MoveMailFromPCToParty: ld a, BANK(sMailboxCount) call GetSRAMBank push bc @@ -114,17 +112,15 @@ MoveMailFromPCToParty: ; 44607 call CloseSRAM pop bc jp DeleteMailFromPC -; 44648 (11:4648) -GetMailboxCount: ; 44648 +GetMailboxCount: ld a, BANK(sMailboxCount) call GetSRAMBank ld a, [sMailboxCount] ld c, a jp CloseSRAM -; 44654 -CheckPokeMail:: ; 44654 +CheckPokeMail:: push bc push de farcall SelectMonFromParty @@ -191,10 +187,9 @@ CheckPokeMail:: ; 44654 .return ld [wScriptVar], a ret -; 446cc -GivePokeMail:: ; 446cc +GivePokeMail:: ld a, [wPartyCount] dec a push af @@ -241,10 +236,9 @@ GivePokeMail:: ; 446cc ld a, b ld [de], a jp CloseSRAM -; 44725 -BackupPartyMonMail: ; 44725 +BackupPartyMonMail: ld a, BANK(sPartyMail) call GetSRAMBank ld hl, sPartyMail @@ -256,9 +250,8 @@ BackupPartyMonMail: ; 44725 ld bc, 1 + 10 * MAIL_STRUCT_LENGTH call CopyBytes jp CloseSRAM -; 44745 -RestorePartyMonMail: ; 44745 (11:4745) +RestorePartyMonMail: ld a, BANK(sPartyMail) call GetSRAMBank ld hl, sPartyMailBackup @@ -271,7 +264,7 @@ RestorePartyMonMail: ; 44745 (11:4745) call CopyBytes jp CloseSRAM -DeletePartyMonMail: ; 44765 (11:4765) +DeletePartyMonMail: ld a, BANK(sPartyMail) call GetSRAMBank xor a @@ -283,10 +276,9 @@ DeletePartyMonMail: ; 44765 (11:4765) ld bc, 1 + 10 * MAIL_STRUCT_LENGTH call ByteFill jp CloseSRAM -; 44781 (11:4781) -IsAnyMonHoldingMail: ; 44781 +IsAnyMonHoldingMail: ld a, [wPartyCount] and a jr z, .no_mons @@ -308,7 +300,6 @@ IsAnyMonHoldingMail: ; 44781 .no_mons and a ret -; 447a0 _PlayerMailBoxMenu: ; 0x447a0 call InitMail diff --git a/engine/pokemon/mail_2.asm b/engine/pokemon/mail_2.asm index 6e326641bcf..1cc77670659 100644 --- a/engine/pokemon/mail_2.asm +++ b/engine/pokemon/mail_2.asm @@ -1,11 +1,11 @@ -ReadPartyMonMail: ; b9229 +ReadPartyMonMail: ld a, [wCurPartyMon] ld hl, sPartyMail ld bc, MAIL_STRUCT_LENGTH call AddNTimes ld d, h ld e, l -ReadAnyMail: ; b9237 +ReadAnyMail: push de call ClearBGPalettes call ClearSprites @@ -63,9 +63,8 @@ ReadAnyMail: ; b9237 pop af ld [wJumptableIndex], a jr .loop -; b92b8 -.LoadGFX: ; b92b8 +.LoadGFX: ld h, d ld l, e push hl @@ -110,9 +109,8 @@ ReadAnyMail: ; b9237 jp hl .done ret -; b92f8 -MailGFXPointers: ; b92f8 +MailGFXPointers: dbw FLOWER_MAIL, LoadFlowerMailGFX dbw SURF_MAIL, LoadSurfMailGFX dbw LITEBLUEMAIL, LoadLiteBlueMailGFX @@ -124,9 +122,8 @@ MailGFXPointers: ; b92f8 dbw MUSIC_MAIL, LoadMusicMailGFX dbw MIRAGE_MAIL, LoadMirageMailGFX db -1 -; b9317 -LoadSurfMailGFX: ; b9317 +LoadSurfMailGFX: push bc ld hl, vTiles2 tile $31 ld de, SurfMailBorderGFX @@ -140,7 +137,7 @@ LoadSurfMailGFX: ; b9317 call LoadMailGFX_Color2 jr FinishLoadingSurfLiteBlueMailGFX -LoadLiteBlueMailGFX: ; b9335 +LoadLiteBlueMailGFX: push bc ld hl, vTiles2 tile $31 ld de, LiteBlueMailBorderGFX @@ -153,7 +150,7 @@ LoadLiteBlueMailGFX: ; b9335 ld c, 1 * 8 call LoadMailGFX_Color2 -FinishLoadingSurfLiteBlueMailGFX: ; b9351 +FinishLoadingSurfLiteBlueMailGFX: ld de, SurfLiteBlueMailSmallShapesGFX ld c, 2 * 8 call LoadMailGFX_Color2 @@ -209,9 +206,8 @@ FinishLoadingSurfLiteBlueMailGFX: ; b9351 ld [hli], a pop hl jp MailGFX_PlaceMessage -; b93d2 -LoadEonMailGFX: ; b93d2 +LoadEonMailGFX: push bc ld hl, vTiles2 tile $31 ld de, EonMailBorder1GFX @@ -259,9 +255,8 @@ LoadEonMailGFX: ; b93d2 call LovelyEonMail_PlaceIcons pop hl jp MailGFX_PlaceMessage -; b944b -LoadLovelyMailGFX: ; b944b +LoadLovelyMailGFX: push bc ld hl, vTiles2 tile $31 ld de, LovelyMailBorderGFX @@ -290,9 +285,8 @@ LoadLovelyMailGFX: ; b944b call LovelyEonMail_PlaceIcons pop hl jp MailGFX_PlaceMessage -; b9491 -LovelyEonMail_PlaceIcons: ; b9491 +LovelyEonMail_PlaceIcons: ld a, $3d hlcoord 2, 2 call Mail_Draw2x2Graphic @@ -322,9 +316,8 @@ LovelyEonMail_PlaceIcons: ; b9491 hlcoord 16, 12 ld [hl], a ret -; b94d6 -LoadMorphMailGFX: ; b94d6 +LoadMorphMailGFX: push bc ld hl, vTiles2 tile $31 ld bc, 5 * 8 @@ -398,9 +391,8 @@ LoadMorphMailGFX: ; b94d6 call Mail_Draw3x2Graphic pop hl jp MailGFX_PlaceMessage -; b9582 -LoadBlueSkyMailGFX: ; b9582 +LoadBlueSkyMailGFX: push bc ld hl, vTiles2 tile $31 ld de, EonMailBorder1GFX @@ -476,9 +468,8 @@ LoadBlueSkyMailGFX: ; b9582 call Mail_Draw2x2Graphic pop hl jp MailGFX_PlaceMessage -; b9636 -Mail_Place6TileRow: ; b9636 +Mail_Place6TileRow: ld b, $6 .loop ld [hli], a @@ -486,9 +477,8 @@ Mail_Place6TileRow: ; b9636 dec b jr nz, .loop ret -; b963e -LoadFlowerMailGFX: ; b963e +LoadFlowerMailGFX: push bc ld hl, vTiles2 tile $31 ld de, FlowerMailBorderGFX @@ -541,9 +531,8 @@ LoadFlowerMailGFX: ; b963e call Mail_Draw2x2Graphic pop hl jp MailGFX_PlaceMessage -; b96ca -LoadPortraitMailGFX: ; b96ca +LoadPortraitMailGFX: push bc ld hl, vTiles2 tile $31 ld de, PortraitMailBorderGFX @@ -572,9 +561,8 @@ LoadPortraitMailGFX: ; b96ca call PrepMonFrontpic pop hl jp MailGFX_PlaceMessage -; b9710 -LoadMusicMailGFX: ; b9710 +LoadMusicMailGFX: push bc ld hl, vTiles2 tile $31 ld de, MusicMailBorderGFX @@ -615,9 +603,8 @@ LoadMusicMailGFX: ; b9710 call LovelyEonMail_PlaceIcons pop hl jp MailGFX_PlaceMessage -; b9776 -LoadMirageMailGFX: ; b9776 +LoadMirageMailGFX: push bc ld hl, vTiles2 tile $31 ld bc, 5 * 8 @@ -676,9 +663,8 @@ LoadMirageMailGFX: ; b9776 call Mail_Draw16TileRow pop hl jp MailGFX_PlaceMessage -; b97f8 -MailGFX_GenerateMonochromeTilesColor2: ; b97f8 +MailGFX_GenerateMonochromeTilesColor2: .loop xor a ld [hli], a @@ -689,9 +675,8 @@ MailGFX_GenerateMonochromeTilesColor2: ; b97f8 or c jr nz, .loop ret -; b9803 -MailGFX_PlaceMessage: ; b9803 +MailGFX_PlaceMessage: ld bc, MAIL_STRUCT_LENGTH ld de, wTempMail ld a, BANK(sPartyMail) @@ -723,9 +708,8 @@ MailGFX_PlaceMessage: ; b9803 .place_author jp PlaceString -; b984e -Unreferenced_Functionb984e: ; b984e +Unreferenced_Functionb984e: .loop ld a, [hl] xor $ff @@ -735,9 +719,8 @@ Unreferenced_Functionb984e: ; b984e or c jr nz, .loop ret -; b9858 -DrawMailBorder: ; b9858 +DrawMailBorder: hlcoord 0, 0 ld a, $31 ld [hli], a @@ -757,9 +740,8 @@ DrawMailBorder: ; b9858 ld a, $38 ld [hl], a ret -; b987b -DrawMailBorder2: ; b987b +DrawMailBorder2: hlcoord 0, 0 ld a, $31 ld [hli], a @@ -778,23 +760,22 @@ DrawMailBorder2: ; b987b call Mail_DrawLeftRightBorder ld [hl], $31 ret -; b989e -Mail_Place14TileAlternatingRow: ; b989e +Mail_Place14TileAlternatingRow: push af ld b, 14 / 2 jr Mail_PlaceAlternatingRow -Mail_Place16TileAlternatingRow: ; b98a3 +Mail_Place16TileAlternatingRow: push af ld b, 16 / 2 jr Mail_PlaceAlternatingRow -Mail_Place18TileAlternatingRow: ; b98a8 +Mail_Place18TileAlternatingRow: push af ld b, 18 / 2 -Mail_PlaceAlternatingRow: ; b98ab +Mail_PlaceAlternatingRow: .loop ld [hli], a inc a @@ -805,18 +786,17 @@ Mail_PlaceAlternatingRow: ; b98ab ld [hl], a pop af ret -; b98b5 -Mail_Place14TileAlternatingColumn: ; b98b5 +Mail_Place14TileAlternatingColumn: push af ld b, 14 / 2 jr Mail_PlaceAlternatingColumn -Mail_Place16TileAlternatingColumn: ; b98ba +Mail_Place16TileAlternatingColumn: push af ld b, 16 / 2 -Mail_PlaceAlternatingColumn: ; b98bd +Mail_PlaceAlternatingColumn: .loop ld [hl], a ld de, SCREEN_WIDTH @@ -830,36 +810,34 @@ Mail_PlaceAlternatingColumn: ; b98bd ld [hl], a pop af ret -; b98cc -Mail_Draw7TileRow: ; b98cc +Mail_Draw7TileRow: ld b, $7 jr Mail_DrawRowLoop -Mail_Draw13TileRow: ; b98d0 +Mail_Draw13TileRow: ld b, $d jr Mail_DrawRowLoop -Mail_Draw16TileRow: ; b98d4 +Mail_Draw16TileRow: ld b, $10 jr Mail_DrawRowLoop -Mail_DrawTopBottomBorder: ; b98d8 +Mail_DrawTopBottomBorder: ld b, SCREEN_WIDTH - 2 jr Mail_DrawRowLoop -Mail_DrawFullWidthBorder: ; b98dc +Mail_DrawFullWidthBorder: ld b, SCREEN_WIDTH -Mail_DrawRowLoop: ; b98de +Mail_DrawRowLoop: .loop ld [hli], a dec b jr nz, .loop ret -; b98e3 -Mail_DrawLeftRightBorder: ; b98e3 +Mail_DrawLeftRightBorder: ld b, SCREEN_HEIGHT - 2 ld de, SCREEN_WIDTH .loop @@ -868,9 +846,8 @@ Mail_DrawLeftRightBorder: ; b98e3 dec b jr nz, .loop ret -; b98ee -Mail_Draw2x2Graphic: ; b98ee +Mail_Draw2x2Graphic: push af ld [hli], a inc a @@ -883,9 +860,8 @@ Mail_Draw2x2Graphic: ; b98ee ld [hl], a pop af ret -; b98fc -Mail_Draw3x2Graphic: ; b98fc +Mail_Draw3x2Graphic: ld [hli], a inc a ld [hli], a @@ -900,9 +876,8 @@ Mail_Draw3x2Graphic: ; b98fc inc a ld [hl], a ret -; b990c -LoadMailGFX_Color1: ; b990c +LoadMailGFX_Color1: .loop ld a, [de] inc de @@ -912,9 +887,8 @@ LoadMailGFX_Color1: ; b990c dec c jr nz, .loop ret -; b9915 -LoadMailGFX_Color2: ; b9915 +LoadMailGFX_Color2: .loop xor a ld [hli], a @@ -924,9 +898,8 @@ LoadMailGFX_Color2: ; b9915 dec c jr nz, .loop ret -; b991e -LoadMailGFX_Color3: ; b991e +LoadMailGFX_Color3: .loop ld a, [de] inc de @@ -935,15 +908,13 @@ LoadMailGFX_Color3: ; b991e dec c jr nz, .loop ret -; b9926 INCLUDE "gfx/mail.asm" -ItemIsMail: ; b9e76 +ItemIsMail: ld a, d ld hl, MailItems ld de, 1 jp IsInArray -; b9e80 INCLUDE "data/items/mail_items.asm" diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm index 088b1b1a3c5..2d14bd603ce 100644 --- a/engine/pokemon/mon_menu.asm +++ b/engine/pokemon/mon_menu.asm @@ -1,6 +1,6 @@ INCLUDE "data/mon_menu.asm" -MonSubmenu: ; 24d19 +MonSubmenu: xor a ld [hBGMapMode], a call GetMonSubmenuItems @@ -17,16 +17,14 @@ MonSubmenu: ; 24d19 call ExitMenu ret -; 24d3f -.MenuHeader: ; 24d3f +.MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 6, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw 0 db 1 ; default option -; 24d47 -.GetTopCoord: ; 24d47 +.GetTopCoord: ; TopCoord = 1 + BottomCoord - 2 * (NumSubmenuItems + 1) ld a, [wBuffer1] inc a @@ -38,9 +36,8 @@ MonSubmenu: ; 24d19 ld [wMenuBorderTopCoord], a call MenuBox ret -; 24d59 -MonMenuLoop: ; 24d59 +MonMenuLoop: .loop ld a, MENU_UNUSED_3 | MENU_BACKUP_TILES_2 ; flags ld [wMenuDataFlags], a @@ -72,9 +69,8 @@ MonMenuLoop: ; 24d59 add hl, bc ld a, [hl] ret -; 24d91 -PopulateMonMenu: ; 24d91 +PopulateMonMenu: call MenuBoxCoord2Tile ld bc, 2 * SCREEN_WIDTH + 2 add hl, bc @@ -93,9 +89,8 @@ PopulateMonMenu: ; 24d91 add hl, bc pop de jr .loop -; 24db0 -GetMonMenuString: ; 24db0 +GetMonMenuString: ld hl, MonMenuOptions + 1 ld de, 3 call IsInArray @@ -118,9 +113,8 @@ GetMonMenuString: ; 24db0 ld d, h ld e, l ret -; 24dd4 -GetMonSubmenuItems: ; 24dd4 +GetMonSubmenuItems: call ResetMonSubmenu ld a, [wCurPartySpecies] cp EGG @@ -195,9 +189,8 @@ GetMonSubmenuItems: ; 24dd4 call AddMonMenuItem call TerminateMonSubmenu ret -; 24e52 -IsFieldMove: ; 24e52 +IsFieldMove: ld b, a ld hl, MonMenuOptions .next @@ -216,18 +209,16 @@ IsFieldMove: ; 24e52 .nope ret -; 24e68 -ResetMonSubmenu: ; 24e68 +ResetMonSubmenu: xor a ld [wBuffer1], a ld hl, wBuffer2 ld bc, NUM_MONMENU_ITEMS + 1 call ByteFill ret -; 24e76 -TerminateMonSubmenu: ; 24e76 +TerminateMonSubmenu: ld a, [wBuffer1] ld e, a ld d, 0 @@ -235,9 +226,8 @@ TerminateMonSubmenu: ; 24e76 add hl, de ld [hl], -1 ret -; 24e83 -AddMonMenuItem: ; 24e83 +AddMonMenuItem: push hl push de push af @@ -253,9 +243,8 @@ AddMonMenuItem: ; 24e83 pop de pop hl ret -; 24e99 -BattleMonMenu: ; 24e99 +BattleMonMenu: ld hl, MenuHeader_0x24ed4 call CopyMenuHeader xor a @@ -286,19 +275,16 @@ BattleMonMenu: ; 24e99 .clear_carry and a ret -; 24ed4 -MenuHeader_0x24ed4: ; 24ed4 +MenuHeader_0x24ed4: db 0 ; flags menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw MenuData_0x24edc db 1 ; default option -; 24edc -MenuData_0x24edc: ; 24edc +MenuData_0x24edc: db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags db 3 ; items db "SWITCH@" db "STATS@" db "CANCEL@" -; 24ef2 diff --git a/engine/pokemon/mon_stats.asm b/engine/pokemon/mon_stats.asm index 5468d76fe52..829e99e6bc6 100644 --- a/engine/pokemon/mon_stats.asm +++ b/engine/pokemon/mon_stats.asm @@ -1,11 +1,11 @@ -DrawPlayerHP: ; 50b0a +DrawPlayerHP: ld a, $1 jr DrawHP -DrawEnemyHP: ; 50b0e +DrawEnemyHP: ld a, $2 -DrawHP: ; 50b10 +DrawHP: ld [wWhichHPBar], a push hl push bc @@ -82,7 +82,7 @@ DrawHP: ; 50b10 pop de ret -PrintTempMonStats: ; 50b7b +PrintTempMonStats: ; Print wTempMon's stats at hl, with spacing bc. push bc push hl @@ -105,7 +105,7 @@ PrintTempMonStats: ; 50b7b ld de, wTempMonSpeed jp PrintNum -.PrintStat: ; 50bab +.PrintStat: push hl call PrintNum pop hl @@ -113,7 +113,7 @@ PrintTempMonStats: ; 50b7b add hl, de ret -.StatNames: ; 50bb5 +.StatNames: db "ATTACK" next "DEFENSE" next "SPCL.ATK" @@ -121,7 +121,7 @@ PrintTempMonStats: ; 50b7b next "SPEED" next "@" -GetGender: ; 50bdd +GetGender: ; Return the gender of a given monster (wCurPartyMon/wCurOTMon/wCurWildMon). ; When calling this function, a should be set to an appropriate wMonType value. @@ -235,7 +235,7 @@ GetGender: ; 50bdd scf ret -ListMovePP: ; 50c50 +ListMovePP: ld a, [wNumMoves] inc a ld c, a @@ -316,7 +316,7 @@ ListMovePP: ; 50c50 .done ret -.load_loop ; 50cc9 +.load_loop ld [hli], a ld [hld], a add hl, de @@ -324,7 +324,7 @@ ListMovePP: ; 50c50 jr nz, .load_loop ret -Unreferenced_Function50cd0: ; 50cd0 +Unreferenced_Function50cd0: .loop ld [hl], $32 inc hl @@ -363,7 +363,7 @@ Unused_PlaceEnemyHPLevel: .egg ret -PlaceStatusString: ; 50d0a +PlaceStatusString: push de inc de inc de @@ -382,10 +382,10 @@ PlaceStatusString: ; 50d0a and a ret -FntString: ; 50d22 +FntString: db "FNT@" -CopyStatusString: ; 50d25 +CopyStatusString: ld a, [de] inc de ld [hli], a @@ -396,7 +396,7 @@ CopyStatusString: ; 50d25 ld [hl], a ret -PlaceNonFaintStatus: ; 50d2e +PlaceNonFaintStatus: push de ld a, [de] ld de, PsnString @@ -430,7 +430,7 @@ BrnString: db "BRN@" FrzString: db "FRZ@" ParString: db "PAR@" -ListMoves: ; 50d6f +ListMoves: ; List moves at hl, spaced every [wBuffer1] tiles. ld de, wListMoves_MoveIndicesBuffer ld b, $0 diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm index 2074e537fc0..12d48e9ba92 100644 --- a/engine/pokemon/move_mon.asm +++ b/engine/pokemon/move_mon.asm @@ -1,4 +1,4 @@ -TryAddMonToParty: ; d88c +TryAddMonToParty: ; Check if to copy wild mon or generate a new one ; Whose is it? ld de, wPartyCount @@ -76,7 +76,7 @@ TryAddMonToParty: ; d88c dec a ld bc, PARTYMON_STRUCT_LENGTH call AddNTimes -GeneratePartyMonStats: ; d906 +GeneratePartyMonStats: ; wBattleMode specifies whether it's a wild mon or not. ; wMonType specifies whether it's an opposing mon or not. ; wCurPartySpecies/wCurPartyLevel specify the species and level. @@ -360,9 +360,8 @@ endr .done scf ; When this function returns, the carry flag indicates success vs failure. ret -; da6d -FillPP: ; da6d +FillPP: push bc ld b, NUM_MOVES .loop @@ -391,9 +390,8 @@ FillPP: ; da6d jr nz, .loop pop bc ret -; da96 -AddTempmonToParty: ; da96 +AddTempmonToParty: ld hl, wPartyCount ld a, [hl] cp PARTY_LENGTH @@ -477,7 +475,7 @@ AddTempmonToParty: ; da96 and a ret -SendGetMonIntoFromBox: ; db3f +SendGetMonIntoFromBox: ; Sents/Gets mon into/from Box depending on Parameter ; wPokemonWithdrawDepositParameter == 0: get mon into Party ; wPokemonWithdrawDepositParameter == 1: sent mon into Box @@ -702,15 +700,13 @@ SendGetMonIntoFromBox: ; db3f call CloseSRAM and a ret -; dcb1 -CloseSRAM_And_SetCarryFlag: ; dcb1 +CloseSRAM_And_SetCarryFlag: call CloseSRAM scf ret -; dcb6 -RestorePPofDepositedPokemon: ; dcb6 +RestorePPofDepositedPokemon: ld a, b ld hl, sBoxMons ld bc, BOXMON_STRUCT_LENGTH @@ -773,9 +769,8 @@ RestorePPofDepositedPokemon: ; dcb6 pop af ld [wMenuCursorY], a ret -; dd21 -RetrieveMonFromDayCareMan: ; dd21 +RetrieveMonFromDayCareMan: ld a, [wBreedMon1Species] ld [wCurPartySpecies], a ld de, SFX_TRANSACTION @@ -789,9 +784,8 @@ RetrieveMonFromDayCareMan: ; dd21 xor a ld [wPokemonWithdrawDepositParameter], a jp RetrieveBreedmon -; dd42 -RetrieveMonFromDayCareLady: ; dd42 +RetrieveMonFromDayCareLady: ld a, [wBreedMon2Species] ld [wCurPartySpecies], a ld de, SFX_TRANSACTION @@ -805,9 +799,8 @@ RetrieveMonFromDayCareLady: ; dd42 ld a, PC_DEPOSIT ld [wPokemonWithdrawDepositParameter], a jp RetrieveBreedmon -; dd64 -RetrieveBreedmon: ; dd64 +RetrieveBreedmon: ld hl, wPartyCount ld a, [hl] cp PARTY_LENGTH @@ -902,9 +895,8 @@ RetrieveBreedmon: ; dd64 ld [hl], a and a ret -; de1a -GetLastPartyMon: ; de1a +GetLastPartyMon: ld a, [wPartyCount] dec a ld hl, wPartyMon1Species @@ -913,25 +905,22 @@ GetLastPartyMon: ; de1a ld d, h ld e, l ret -; de2a -DepositMonWithDayCareMan: ; de2a +DepositMonWithDayCareMan: ld de, wBreedMon1Nick call DepositBreedmon xor a ; REMOVE_PARTY ld [wPokemonWithdrawDepositParameter], a jp RemoveMonFromPartyOrBox -; de37 -DepositMonWithDayCareLady: ; de37 +DepositMonWithDayCareLady: ld de, wBreedMon2Nick call DepositBreedmon xor a ; REMOVE_PARTY ld [wPokemonWithdrawDepositParameter], a jp RemoveMonFromPartyOrBox -; de44 -DepositBreedmon: ; de44 +DepositBreedmon: ld a, [wCurPartyMon] ld hl, wPartyMonNicknames call SkipNames @@ -947,7 +936,7 @@ DepositBreedmon: ; de44 ld bc, BOXMON_STRUCT_LENGTH jp CopyBytes -SendMonIntoBox: ; de6e +SendMonIntoBox: ; Sends the mon into one of Bills Boxes ; the data comes mainly from 'wEnemyMon:' ld a, BANK(sBoxCount) @@ -1073,15 +1062,13 @@ SendMonIntoBox: ; de6e call CloseSRAM scf ret -; df42 -.full ; df42 +.full call CloseSRAM and a ret -; df47 -ShiftBoxMon: ; df47 +ShiftBoxMon: ld hl, sBoxMonOT ld bc, NAME_LENGTH call .shift @@ -1127,9 +1114,8 @@ ShiftBoxMon: ; df47 or b jr nz, .loop ret -; df8c -GiveEgg:: ; df8c +GiveEgg:: ld a, [wCurPartySpecies] push af callfar GetPreEvolution @@ -1226,13 +1212,11 @@ GiveEgg:: ; df8c ld [hl], a and a ret -; e035 -String_Egg: ; e035 +String_Egg: db "EGG@" -; e039 -RemoveMonFromPartyOrBox: ; e039 +RemoveMonFromPartyOrBox: ld hl, wPartyCount ld a, [wPokemonWithdrawDepositParameter] @@ -1382,10 +1366,9 @@ RemoveMonFromPartyOrBox: ; e039 jr nz, .loop2 .close_sram jp CloseSRAM -; e134 -ComputeNPCTrademonStats: ; e134 +ComputeNPCTrademonStats: ld a, MON_LEVEL call GetPartyParamLocation ld a, [hl] @@ -1413,9 +1396,8 @@ ComputeNPCTrademonStats: ; e134 ld a, [de] ld [hl], a ret -; e167 -CalcMonStats: ; e167 +CalcMonStats: ; Calculates all 6 Stats of a mon ; b: Take into account stat EXP if TRUE ; 'c' counts from 1-6 and points with 'wBaseStats' to the base value @@ -1436,9 +1418,8 @@ CalcMonStats: ; e167 cp STAT_SDEF jr nz, .loop ret -; e17b -CalcMonStatC: ; e17b +CalcMonStatC: ; 'c' is 1-6 and points to the BaseStat ; 1: HP ; 2: Attack @@ -1632,9 +1613,8 @@ CalcMonStatC: ; e17b pop de pop hl ret -; e277 -GivePoke:: ; e277 +GivePoke:: push de push bc xor a ; PARTYMON @@ -1812,14 +1792,12 @@ GivePoke:: ; e277 call CloseSRAM ld b, $1 ret -; e3d4 -.FailedToGiveMon: ; e3d4 +.FailedToGiveMon: pop bc pop de ld b, $2 ret -; e3d9 TextJump_WasSentToBillsPC: ; 0xe3d9 ; was sent to BILL's PC. @@ -1827,7 +1805,7 @@ TextJump_WasSentToBillsPC: ; 0xe3d9 db "@" ; 0xe3de -InitNickname: ; e3de +InitNickname: push de call LoadStandardMenuHeader call DisableSpriteUpdates @@ -1842,4 +1820,3 @@ InitNickname: ; e3de ld hl, ExitAllMenus rst FarCall ret -; e3fd diff --git a/engine/pokemon/move_mon_wo_mail.asm b/engine/pokemon/move_mon_wo_mail.asm index 5d81da8a0d7..1dab879c780 100644 --- a/engine/pokemon/move_mon_wo_mail.asm +++ b/engine/pokemon/move_mon_wo_mail.asm @@ -1,4 +1,4 @@ -InsertPokemonIntoBox: ; 51322 +InsertPokemonIntoBox: ld a, BANK(sBoxCount) call GetSRAMBank ld hl, sBoxCount @@ -37,7 +37,7 @@ InsertPokemonIntoBox: ; 51322 farcall RestorePPofDepositedPokemon jp CloseSRAM -InsertPokemonIntoParty: ; 5138b +InsertPokemonIntoParty: ld hl, wPartyCount call InsertSpeciesIntoBoxOrParty ld a, [wPartyCount] @@ -63,7 +63,7 @@ InsertPokemonIntoParty: ; 5138b call InsertDataIntoBoxOrParty ret -InsertSpeciesIntoBoxOrParty: ; 513cb +InsertSpeciesIntoBoxOrParty: inc [hl] inc hl ld a, [wCurPartyMon] @@ -81,7 +81,7 @@ InsertSpeciesIntoBoxOrParty: ; 513cb jr nz, .loop ret -InsertDataIntoBoxOrParty: ; 513e0 +InsertDataIntoBoxOrParty: push de push hl push bc diff --git a/engine/pokemon/party_menu.asm b/engine/pokemon/party_menu.asm index da9ae7e10ed..91509e40d4f 100644 --- a/engine/pokemon/party_menu.asm +++ b/engine/pokemon/party_menu.asm @@ -1,4 +1,4 @@ -SelectMonFromParty: ; 50000 +SelectMonFromParty: call DisableSpriteUpdates xor a ld [wPartyMenuActionText], a @@ -10,10 +10,9 @@ SelectMonFromParty: ; 50000 call PartyMenuSelect call ReturnToMapWithSpeechTextbox ret -; 5001d -SelectTradeOrDayCareMon: ; 5001d +SelectTradeOrDayCareMon: ld a, b ld [wPartyMenuActionText], a call DisableSpriteUpdates @@ -27,23 +26,20 @@ SelectTradeOrDayCareMon: ; 5001d call PartyMenuSelect call ReturnToMapWithSpeechTextbox ret -; 5003f -InitPartyMenuLayout: ; 5003f +InitPartyMenuLayout: call LoadPartyMenuGFX call InitPartyMenuWithCancel call InitPartyMenuGFX call WritePartyMenuTilemap call PrintPartyMenuText ret -; 5004f -LoadPartyMenuGFX: ; 5004f +LoadPartyMenuGFX: call LoadFontsBattleExtra callfar InitPartyMenuPalettes ; engine/color.asm callfar ClearSpriteAnims2 ret -; 5005f WritePartyMenuTilemap: ; 0x5005f @@ -73,7 +69,7 @@ WritePartyMenuTilemap: ; 0x5005f ret ; 0x50089 -.Jumptable: ; 50089 +.Jumptable: ; entries correspond to PARTYMENUQUALITY_* constants dw PlacePartyNicknames dw PlacePartyHPBar @@ -84,9 +80,8 @@ WritePartyMenuTilemap: ; 0x5005f dw PlacePartyMonEvoStoneCompatibility dw PlacePartyMonGender dw PlacePartyMonMobileBattleSelection -; 5009b -PlacePartyNicknames: ; 5009b +PlacePartyNicknames: hlcoord 3, 1 ld a, [wPartyCount] and a @@ -116,14 +111,12 @@ PlacePartyNicknames: ; 5009b ld de, .CANCEL call PlaceString ret -; 500c8 -.CANCEL: ; 500c8 +.CANCEL: db "CANCEL@" -; 500cf -PlacePartyHPBar: ; 500cf +PlacePartyHPBar: xor a ld [wSGBPals], a ld a, [wPartyCount] @@ -164,9 +157,8 @@ PlacePartyHPBar: ; 500cf ld b, SCGB_PARTY_MENU call GetSGBLayout ret -; 50117 -PlacePartymonHPBar: ; 50117 +PlacePartymonHPBar: ld a, b ld bc, PARTYMON_STRUCT_LENGTH ld hl, wPartyMon1HP @@ -191,9 +183,8 @@ PlacePartymonHPBar: ; 50117 ld e, a predef ComputeHPBarPixels ret -; 50138 -PlacePartyMenuHPDigits: ; 50138 +PlacePartyMenuHPDigits: ld a, [wPartyCount] and a ret z @@ -233,9 +224,8 @@ PlacePartyMenuHPDigits: ; 50138 dec c jr nz, .loop ret -; 50176 -PlacePartyMonLevel: ; 50176 +PlacePartyMonLevel: ld a, [wPartyCount] and a ret z @@ -276,9 +266,8 @@ PlacePartyMonLevel: ; 50176 dec c jr nz, .loop ret -; 501b2 -PlacePartyMonStatus: ; 501b2 +PlacePartyMonStatus: ld a, [wPartyCount] and a ret z @@ -309,9 +298,8 @@ PlacePartyMonStatus: ; 501b2 dec c jr nz, .loop ret -; 501e0 -PlacePartyMonTMHMCompatibility: ; 501e0 +PlacePartyMonTMHMCompatibility: ld a, [wPartyCount] and a ret z @@ -344,9 +332,8 @@ PlacePartyMonTMHMCompatibility: ; 501e0 dec c jr nz, .loop ret -; 50215 -.PlaceAbleNotAble: ; 50215 +.PlaceAbleNotAble: ld a, c and a jr nz, .able @@ -356,18 +343,15 @@ PlacePartyMonTMHMCompatibility: ; 501e0 .able ld de, .string_able ret -; 50221 -.string_able ; 50221 +.string_able db "ABLE@" -; 50226 -.string_not_able ; 50226 +.string_not_able db "NOT ABLE@" -; 5022f -PlacePartyMonEvoStoneCompatibility: ; 5022f +PlacePartyMonEvoStoneCompatibility: ld a, [wPartyCount] and a ret z @@ -404,9 +388,8 @@ PlacePartyMonEvoStoneCompatibility: ; 5022f dec c jr nz, .loop ret -; 50268 -.DetermineCompatibility: ; 50268 +.DetermineCompatibility: ld de, wStringBuffer1 ld a, BANK(EvosAttacksPointers) ld bc, 2 @@ -441,17 +424,14 @@ PlacePartyMonEvoStoneCompatibility: ; 5022f .nope ld de, .string_not_able ret -; 502a3 -.string_able ; 502a3 +.string_able db "ABLE@" -; 502a8 -.string_not_able ; 502a8 +.string_not_able db "NOT ABLE@" -; 502b1 -PlacePartyMonGender: ; 502b1 +PlacePartyMonGender: ld a, [wPartyCount] and a ret z @@ -489,22 +469,18 @@ PlacePartyMonGender: ; 502b1 dec c jr nz, .loop ret -; 502ee -.male ; 502ee +.male db "♂…MALE@" -; 502f5 -.female ; 502f5 +.female db "♀…FEMALE@" -; 502fe -.unknown ; 502fe +.unknown db "…UNKNOWN@" -; 50307 -PlacePartyMonMobileBattleSelection: ; 50307 +PlacePartyMonMobileBattleSelection: ld a, [wPartyCount] and a ret z @@ -571,23 +547,18 @@ PlacePartyMonMobileBattleSelection: ; 50307 dec b ret z jr .loop2 -; 5036b -.String_Banme: ; 5036b +.String_Banme: db " ばんめ  @" ; Place -; 50372 -.String_Sanka_Shinai: ; 50372 +.String_Sanka_Shinai: db "さんかしない@" ; Cancel -; 50379 -.String_Kettei_Yameru: ; 50379 +.String_Kettei_Yameru: db "けってい  やめる@" ; Quit -; 50383 -.Strings_1_2_3: ; 50383 +.Strings_1_2_3: db "1@", "2@", "3@" ; 1st, 2nd, 3rd -; 50389 -PartyMenuCheckEgg: ; 50389 +PartyMenuCheckEgg: ld a, LOW(wPartySpecies) add b ld e, a @@ -597,9 +568,8 @@ PartyMenuCheckEgg: ; 50389 ld a, [de] cp EGG ret -; 50396 -GetPartyMenuQualityIndexes: ; 50396 +GetPartyMenuQualityIndexes: ld a, [wPartyMenuActionText] and $f0 jr nz, .skip @@ -618,12 +588,11 @@ GetPartyMenuQualityIndexes: ; 50396 .skip ld hl, PartyMenuQualityPointers.Default ret -; 503b2 INCLUDE "data/party_menu_qualities.asm" -InitPartyMenuGFX: ; 503e0 +InitPartyMenuGFX: ld hl, wPartyCount ld a, [hli] and a @@ -647,9 +616,8 @@ InitPartyMenuGFX: ; 503e0 jr nz, .loop callfar PlaySpriteAnimations ret -; 50405 -InitPartyMenuWithCancel: ; 50405 +InitPartyMenuWithCancel: ; with cancel xor a ld [wSwitchMon], a @@ -675,7 +643,6 @@ InitPartyMenuWithCancel: ; 50405 ld a, A_BUTTON | B_BUTTON ld [wMenuJoypadFilter], a ret -; 5042d InitPartyMenuNoCancel: ; 0x5042d ; no cancel @@ -697,9 +664,8 @@ InitPartyMenuNoCancel: ; 0x5042d ld a, A_BUTTON | B_BUTTON ld [wMenuJoypadFilter], a ret -; 5044f (14:444f) -PartyMenuAttributes: ; 5044f +PartyMenuAttributes: ; cursor y ; cursor x ; num rows @@ -713,7 +679,6 @@ PartyMenuAttributes: ; 5044f db $60, $00 dn 2, 0 db 0 -; 50457 PartyMenuSelect: ; 0x50457 ; sets carry if exitted menu. @@ -755,7 +720,7 @@ PartyMenuSelect: ; 0x50457 ; 0x5049a -PrintPartyMenuText: ; 5049a +PrintPartyMenuText: hlcoord 0, 14 lb bc, 2, 18 call TextBox @@ -764,7 +729,7 @@ PrintPartyMenuText: ; 5049a jr nz, .haspokemon ld de, YouHaveNoPKMNString jr .gotstring -.haspokemon ; 504ae +.haspokemon ld a, [wPartyMenuActionText] and $f ; drop high nibble ld hl, PartyMenuStrings @@ -775,7 +740,7 @@ PrintPartyMenuText: ; 5049a ld a, [hli] ld d, [hl] ld e, a -.gotstring ; 504be +.gotstring ld a, [wOptions] push af set NO_TEXT_SCROLL, a @@ -827,7 +792,7 @@ ToWhichPKMNString: ; 0x50549 YouHaveNoPKMNString: ; 0x50556 db "You have no !@" -PrintPartyMenuActionText: ; 50566 +PrintPartyMenuActionText: ld a, [wCurPartyMon] ld hl, wPartyMonNicknames call GetNick @@ -836,9 +801,8 @@ PrintPartyMenuActionText: ; 50566 ld hl, .MenuActionTexts call .PrintText ret -; 5057b -.MenuActionTexts: ; 5057b +.MenuActionTexts: ; entries correspond to PARTYMENUTEXT_* constants dw .Text_CuredOfPoison dw .Text_BurnWasHealed @@ -850,7 +814,6 @@ PrintPartyMenuActionText: ; 50566 dw .Text_Revitalized dw .Text_GrewToLevel dw .Text_CameToItsSenses -; 5058f .Text_RecoveredSomeHP: ; 0x5058f ; recovered @ HP! @@ -913,7 +876,7 @@ PrintPartyMenuActionText: ; 50566 ; 0x505c1 -.PrintText: ; 505c1 +.PrintText: ld e, a ld d, 0 add hl, de @@ -929,4 +892,3 @@ PrintPartyMenuActionText: ; 50566 pop af ld [wOptions], a ret -; 505da diff --git a/engine/pokemon/search.asm b/engine/pokemon/search.asm index 57b489a37be..ec3f838ce33 100644 --- a/engine/pokemon/search.asm +++ b/engine/pokemon/search.asm @@ -248,7 +248,7 @@ endr ret ; 0x4a810 -BoxAddressTable1: ; 4a810 +BoxAddressTable1: dba sBox1 dba sBox2 dba sBox3 @@ -263,7 +263,6 @@ BoxAddressTable1: ; 4a810 dba sBox12 dba sBox13 dba sBox14 -; 4a83a UpdateOTPointer: ; 0x4a83a push hl diff --git a/engine/pokemon/search2.asm b/engine/pokemon/search2.asm index b7112f1f8ea..7af93282eb9 100644 --- a/engine/pokemon/search2.asm +++ b/engine/pokemon/search2.asm @@ -1,18 +1,18 @@ -_FindPartyMonAboveLevel: ; 4dbd2 +_FindPartyMonAboveLevel: ld hl, wPartyMon1Level call FindAboveLevel ret -_FindPartyMonAtLeastThatHappy: ; 4dbd9 +_FindPartyMonAtLeastThatHappy: ld hl, wPartyMon1Happiness call FindAtLeastThatHappy ret -_FindPartyMonThatSpecies: ; 4dbe0 +_FindPartyMonThatSpecies: ld hl, wPartyMon1Species jp FindThatSpecies -_FindPartyMonThatSpeciesYourTrainerID: ; 4dbe6 +_FindPartyMonThatSpeciesYourTrainerID: ld hl, wPartyMon1Species call FindThatSpecies ret z @@ -35,7 +35,7 @@ _FindPartyMonThatSpeciesYourTrainerID: ; 4dbe6 xor a ret -FindAtLeastThatHappy: ; 4dc0a +FindAtLeastThatHappy: ; Sets the bits for the Pokemon that have a happiness greater than or equal to b. ; The lowest bits are used. Sets z if no Pokemon in your party is at least that happy. ld c, $0 @@ -69,7 +69,7 @@ FindAtLeastThatHappy: ; 4dc0a and a ret -FindAboveLevel: ; 4dc31 +FindAboveLevel: ld c, $0 ld a, [wPartyCount] ld d, a @@ -98,7 +98,7 @@ FindAboveLevel: ; 4dc31 and a ret -FindThatSpecies: ; 4dc56 +FindThatSpecies: ; Find species b in your party. ; If you have no Pokemon, returns c = -1 and z. ; If that species is in your party, returns its location in c, and nz. @@ -116,7 +116,7 @@ FindThatSpecies: ; 4dc56 and a ret -RetroactivelyIgnoreEggs: ; 4dc67 +RetroactivelyIgnoreEggs: ld e, -2 ld hl, wPartySpecies .loop diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm index 7e44cb96e1d..ad272cad77c 100644 --- a/engine/pokemon/stats_screen.asm +++ b/engine/pokemon/stats_screen.asm @@ -4,7 +4,7 @@ const BLUE_PAGE ; 3 NUM_STAT_PAGES EQU const_value + -1 -BattleStatsScreenInit: ; 4dc7b (13:5c7b) +BattleStatsScreenInit: ld a, [wLinkMode] cp LINK_MOBILE jr nz, StatsScreenInit @@ -14,15 +14,15 @@ BattleStatsScreenInit: ; 4dc7b (13:5c7b) jr z, StatsScreenInit jr _MobileStatsScreenInit -StatsScreenInit: ; 4dc8a +StatsScreenInit: ld hl, StatsScreenMain jr StatsScreenInit_gotaddress -_MobileStatsScreenInit: ; 4dc8f +_MobileStatsScreenInit: ld hl, StatsScreenMobile jr StatsScreenInit_gotaddress -StatsScreenInit_gotaddress: ; 4dc94 +StatsScreenInit_gotaddress: ld a, [hMapAnims] push af xor a @@ -67,7 +67,7 @@ StatsScreenMain: ; 0x4dcd2 and %11111100 or 1 ld [wcf64], a -.loop ; 4dce3 +.loop ld a, [wJumptableIndex] and $ff ^ (1 << 7) ld hl, StatsScreenPointerTable @@ -79,7 +79,7 @@ StatsScreenMain: ; 0x4dcd2 ret ; 0x4dcf7 -StatsScreenMobile: ; 4dcf7 +StatsScreenMobile: xor a ld [wJumptableIndex], a ; stupid interns @@ -103,9 +103,8 @@ StatsScreenMobile: ; 4dcf7 .exit ret -; 4dd2a -StatsScreenPointerTable: ; 4dd2a +StatsScreenPointerTable: dw MonStatsInit ; regular pokémon dw EggStatsInit ; egg dw StatsScreenWaitCry @@ -114,10 +113,9 @@ StatsScreenPointerTable: ; 4dd2a dw StatsScreenWaitCry dw MonStatsJoypad dw StatsScreen_Exit -; 4dd3a -StatsScreen_WaitAnim: ; 4dd3a (13:5d3a) +StatsScreen_WaitAnim: ld hl, wcf64 bit 6, [hl] jr nz, .try_anim @@ -137,19 +135,19 @@ StatsScreen_WaitAnim: ; 4dd3a (13:5d3a) farcall HDMATransferTileMapToWRAMBank3 ret -StatsScreen_SetJumptableIndex: ; 4dd62 (13:5d62) +StatsScreen_SetJumptableIndex: ld a, [wJumptableIndex] and $80 or h ld [wJumptableIndex], a ret -StatsScreen_Exit: ; 4dd6c (13:5d6c) +StatsScreen_Exit: ld hl, wJumptableIndex set 7, [hl] ret -MonStatsInit: ; 4dd72 (13:5d72) +MonStatsInit: ld hl, wcf64 res 6, [hl] call ClearBGPalettes @@ -171,7 +169,7 @@ MonStatsInit: ; 4dd72 (13:5d72) call StatsScreen_SetJumptableIndex ret -EggStatsInit: ; 4dda1 +EggStatsInit: call EggStatsScreen ld a, [wJumptableIndex] inc a @@ -180,7 +178,7 @@ EggStatsInit: ; 4dda1 ; 0x4ddac -EggStatsJoypad: ; 4ddac (13:5dac) +EggStatsJoypad: call StatsScreen_GetJoypad jr nc, .check ld h, 0 @@ -198,7 +196,7 @@ EggStatsJoypad: ; 4ddac (13:5dac) call StatsScreen_SetJumptableIndex ret -StatsScreen_LoadPage: ; 4ddc6 (13:5dc6) +StatsScreen_LoadPage: call StatsScreen_LoadGFX ld hl, wcf64 res 4, [hl] @@ -207,7 +205,7 @@ StatsScreen_LoadPage: ; 4ddc6 (13:5dc6) ld [wJumptableIndex], a ret -MonStatsJoypad: ; 4ddd6 (13:5dd6) +MonStatsJoypad: call StatsScreen_GetJoypad jr nc, .next ld h, 0 @@ -218,7 +216,7 @@ MonStatsJoypad: ; 4ddd6 (13:5dd6) and D_DOWN | D_UP | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON jp StatsScreen_JoypadAction -StatsScreenWaitCry: ; 4dde6 (13:5de6) +StatsScreenWaitCry: call IsSFXPlaying ret nc ld a, [wJumptableIndex] @@ -226,7 +224,7 @@ StatsScreenWaitCry: ; 4dde6 (13:5de6) ld [wJumptableIndex], a ret -StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2) +StatsScreen_CopyToTempMon: ld a, [wMonType] cp TEMPMON jr nz, .breedmon @@ -252,7 +250,7 @@ StatsScreen_CopyToTempMon: ; 4ddf2 (13:5df2) and a ret -StatsScreen_GetJoypad: ; 4de2c (13:5e2c) +StatsScreen_GetJoypad: call GetJoypad ld a, [wMonType] cp TEMPMON @@ -280,7 +278,7 @@ StatsScreen_GetJoypad: ; 4de2c (13:5e2c) scf ret -StatsScreen_JoypadAction: ; 4de54 (13:5e54) +StatsScreen_JoypadAction: push af ld a, [wcf64] maskbits NUM_STAT_PAGES @@ -374,12 +372,12 @@ StatsScreen_JoypadAction: ; 4de54 (13:5e54) call StatsScreen_SetJumptableIndex ret -.b_button ; 4dee4 (13:5ee4) +.b_button ld h, 7 call StatsScreen_SetJumptableIndex ret -StatsScreen_InitUpperHalf: ; 4deea (13:5eea) +StatsScreen_InitUpperHalf: call .PlaceHPBar xor a ld [hBGMapMode], a @@ -416,7 +414,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea) call StatsScreen_PlaceShinyIcon ret -.PlaceHPBar: ; 4df45 (13:5f45) +.PlaceHPBar: ld hl, wTempMonHP ld a, [hli] ld b, a @@ -433,7 +431,7 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea) call DelayFrame ret -.PlaceGenderChar: ; 4df66 (13:5f66) +.PlaceGenderChar: push hl farcall GetGender pop hl @@ -444,16 +442,14 @@ StatsScreen_InitUpperHalf: ; 4deea (13:5eea) .got_gender ld [hl], a ret -; 4df77 (13:5f77) -.NicknamePointers: ; 4df77 +.NicknamePointers: dw wPartyMonNicknames dw wOTPartyMonNicknames dw sBoxMonNicknames dw wBufferMonNick -; 4df7f -Unreferenced_Function4df7f: ; 4df7f +Unreferenced_Function4df7f: hlcoord 7, 0 ld bc, SCREEN_WIDTH ld d, SCREEN_HEIGHT @@ -464,9 +460,8 @@ Unreferenced_Function4df7f: ; 4df7f dec d jr nz, .loop ret -; 4df8f -StatsScreen_PlaceHorizontalDivider: ; 4df8f (13:5f8f) +StatsScreen_PlaceHorizontalDivider: hlcoord 0, 7 ld b, SCREEN_WIDTH ld a, $62 ; horizontal divider (empty HP/exp bar) @@ -476,14 +471,14 @@ StatsScreen_PlaceHorizontalDivider: ; 4df8f (13:5f8f) jr nz, .loop ret -StatsScreen_PlacePageSwitchArrows: ; 4df9b (13:5f9b) +StatsScreen_PlacePageSwitchArrows: hlcoord 12, 6 ld [hl], "◀" hlcoord 19, 6 ld [hl], "▶" ret -StatsScreen_PlaceShinyIcon: ; 4dfa6 (13:5fa6) +StatsScreen_PlaceShinyIcon: ld bc, wTempMonDVs farcall CheckShininess ret nc @@ -491,7 +486,7 @@ StatsScreen_PlaceShinyIcon: ; 4dfa6 (13:5fa6) ld [hl], "⁂" ret -StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) +StatsScreen_LoadGFX: ld a, [wBaseDexNo] ld [wd265], a ld [wCurSpecies], a @@ -510,7 +505,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) call StatsScreen_PlaceFrontpic ret -.ClearBox: ; 4dfda (13:5fda) +.ClearBox: ld a, [wcf64] maskbits NUM_STAT_PAGES ld c, a @@ -520,7 +515,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) call ClearBox ret -.LoadPals: ; 4dfed (13:5fed) +.LoadPals: ld a, [wcf64] maskbits NUM_STAT_PAGES ld c, a @@ -530,7 +525,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) set 5, [hl] ret -.PageTilemap: ; 4e002 (13:6002) +.PageTilemap: ld a, [wcf64] maskbits NUM_STAT_PAGES dec a @@ -538,13 +533,13 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) rst JumpTable ret -.Jumptable: ; 4e00d (13:600d) +.Jumptable: ; entries correspond to *_PAGE constants dw .PinkPage dw .GreenPage dw .BluePage -.PinkPage: ; 4e013 (13:6013) +.PinkPage: hlcoord 0, 9 ld b, $0 predef DrawPlayerHP @@ -624,7 +619,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ld [hl], $41 ; right exp bar end cap ret -.PrintNextLevel: ; 4e0d3 (13:60d3) +.PrintNextLevel: ld a, [wTempMonLevel] push af cp MAX_LEVEL @@ -637,7 +632,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ld [wTempMonLevel], a ret -.CalcExpToNextLevel: ; 4e0e7 (13:60e7) +.CalcExpToNextLevel: ld a, [wTempMonLevel] cp MAX_LEVEL jr z, .AlreadyAtMaxLevel @@ -666,34 +661,27 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ld [hli], a ld [hl], a ret -; 4e119 (13:6119) -.Status_Type: ; 4e119 +.Status_Type: db "STATUS/" next "TYPE/@" -; 4e127 -.OK_str: ; 4e127 +.OK_str: db "OK @" -; 4e12b -.ExpPointStr: ; 4e12b +.ExpPointStr: db "EXP POINTS@" -; 4e136 -.LevelUpStr: ; 4e136 +.LevelUpStr: db "LEVEL UP@" -; 4e13f -.ToStr: ; 4e13f +.ToStr: db "TO@" -; 4e142 -.PkrsStr: ; 4e142 +.PkrsStr: db "#RUS@" -; 4e147 -.GreenPage: ; 4e147 (13:6147) +.GreenPage: ld de, .Item hlcoord 0, 8 call PlaceString @@ -717,7 +705,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) predef ListMovePP ret -.GetItemName: ; 4e189 (13:6189) +.GetItemName: ld de, .ThreeDashes ld a, [wTempMonItem] and a @@ -728,21 +716,17 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ld [wd265], a call GetItemName ret -; 4e1a0 (13:61a0) -.Item: ; 4e1a0 +.Item: db "ITEM@" -; 4e1a5 -.ThreeDashes: ; 4e1a5 +.ThreeDashes: db "---@" -; 4e1a9 -.Move: ; 4e1a9 +.Move: db "MOVE@" -; 4e1ae -.BluePage: ; 4e1ae (13:61ae) +.BluePage: call .PlaceOTInfo hlcoord 10, 8 ld de, SCREEN_WIDTH @@ -758,7 +742,7 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) predef PrintTempMonStats ret -.PlaceOTInfo: ; 4e1cc (13:61cc) +.PlaceOTInfo: ld de, IDNoString hlcoord 0, 9 call PlaceString @@ -789,24 +773,21 @@ StatsScreen_LoadGFX: ; 4dfb6 (13:5fb6) ld [hl], a .done ret -; 4e216 (13:6216) -.OTNamePointers: ; 4e216 +.OTNamePointers: dw wPartyMonOT dw wOTPartyMonOT dw sBoxMonOT dw wBufferMonOT -; 4e21e -IDNoString: ; 4e21e +IDNoString: db "№.@" -OTString: ; 4e222 +OTString: db "OT/@" -; 4e226 -StatsScreen_PlaceFrontpic: ; 4e226 (13:6226) +StatsScreen_PlaceFrontpic: ld hl, wTempMonDVs predef GetUnownLetter call StatsScreen_GetAnimationParam @@ -832,7 +813,7 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226) call PlayMonCry2 ret -.AnimateMon: ; 4e253 (13:6253) +.AnimateMon: ld hl, wcf64 set 5, [hl] ld a, [wCurPartySpecies] @@ -849,7 +830,7 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226) call _PrepMonFrontpic ret -.AnimateEgg: ; 4e271 (13:6271) +.AnimateEgg: ld a, [wCurPartySpecies] cp UNOWN jr z, .unownegg @@ -864,7 +845,7 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226) call .get_animation ret -.get_animation ; 4e289 (13:6289) +.get_animation ld a, [wCurPartySpecies] call IsAPokemon ret c @@ -879,20 +860,20 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226) set 6, [hl] ret -StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad) +StatsScreen_GetAnimationParam: ld a, [wMonType] ld hl, .Jumptable rst JumpTable ret -.Jumptable: ; 4e2b5 (13:62b5) +.Jumptable: dw .PartyMon dw .OTPartyMon dw .BoxMon dw .Tempmon dw .Wildmon -.PartyMon: ; 4e2bf (13:62bf) +.PartyMon: ld a, [wCurPartyMon] ld hl, wPartyMon1 ld bc, PARTYMON_STRUCT_LENGTH @@ -901,11 +882,11 @@ StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad) ld c, l jr .CheckEggFaintedFrzSlp -.OTPartyMon: ; 4e2cf (13:62cf) +.OTPartyMon: xor a ret -.BoxMon: ; 4e2d1 (13:62d1) +.BoxMon: ld hl, sBoxMons ld bc, PARTYMON_STRUCT_LENGTH ld a, [wCurPartyMon] @@ -920,11 +901,11 @@ StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad) pop af ret -.Tempmon: ; 4e2ed (13:62ed) +.Tempmon: ld bc, wTempMonSpecies jr .CheckEggFaintedFrzSlp ; utterly pointless -.CheckEggFaintedFrzSlp: ; 4e2f2 (13:62f2) +.CheckEggFaintedFrzSlp: ld a, [wCurPartySpecies] cp EGG jr z, .egg @@ -935,16 +916,16 @@ StatsScreen_GetAnimationParam: ; 4e2ad (13:62ad) scf ret -.Wildmon: ; 4e301 (13:6301) +.Wildmon: ld a, $1 and a ret -.FaintedFrzSlp: ; 4e305 (13:6305) +.FaintedFrzSlp: xor a ret -StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307) +StatsScreen_LoadTextBoxSpaceGFX: nop push hl push de @@ -966,14 +947,12 @@ StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307) pop de pop hl ret -; 4e32a (13:632a) -Unreferenced_4e32a: ; 4e32a +Unreferenced_4e32a: ; A blank space tile? ds 16 -; 4e33a -EggStatsScreen: ; 4e33a +EggStatsScreen: xor a ld [hBGMapMode], a ld hl, wCurHPPal @@ -1027,10 +1006,10 @@ EggStatsScreen: ; 4e33a ret ; 0x4e3c0 -EggString: ; 4e3c0 +EggString: db "EGG@" -FiveQMarkString: ; 4e3c4 +FiveQMarkString: db "?????@" EggSoonString: ; 0x4e3ca @@ -1056,7 +1035,7 @@ EggALotMoreTimeString: ; 0x4e46e ; 0x4e497 -StatsScreen_AnimateEgg: ; 4e497 (13:6497) +StatsScreen_AnimateEgg: call StatsScreen_GetAnimationParam ret nc ld a, [wTempMonHappiness] @@ -1083,7 +1062,7 @@ StatsScreen_AnimateEgg: ; 4e497 (13:6497) set 6, [hl] ret -StatsScreen_LoadPageIndicators: ; 4e4cd (13:64cd) +StatsScreen_LoadPageIndicators: hlcoord 13, 5 ld a, $36 ; first of 4 small square tiles call .load_square @@ -1101,7 +1080,7 @@ StatsScreen_LoadPageIndicators: ; 4e4cd (13:64cd) hlcoord 15, 5 ; GREEN_PAGE (= GREEN_PAGE) jr z, .load_square hlcoord 17, 5 ; BLUE_PAGE (> GREEN_PAGE) -.load_square ; 4e4f7 (13:64f7) +.load_square push bc ld [hli], a inc a @@ -1115,7 +1094,7 @@ StatsScreen_LoadPageIndicators: ; 4e4cd (13:64cd) pop bc ret -CopyNickname: ; 4e505 (13:6505) +CopyNickname: ld de, wStringBuffer1 ld bc, MON_NAME_LENGTH jr .okay ; utterly pointless @@ -1137,7 +1116,7 @@ CopyNickname: ; 4e505 (13:6505) pop de ret -GetNicknamePointer: ; 4e528 (13:6528) +GetNicknamePointer: ld a, [wMonType] add a ld c, a @@ -1153,7 +1132,7 @@ GetNicknamePointer: ; 4e528 (13:6528) jp SkipNames -CheckFaintedFrzSlp: ; 4e53f +CheckFaintedFrzSlp: ld hl, MON_HP add hl, bc ld a, [hli] @@ -1170,4 +1149,3 @@ CheckFaintedFrzSlp: ; 4e53f .fainted_frz_slp scf ret -; 4e554 diff --git a/engine/pokemon/switchpartymons.asm b/engine/pokemon/switchpartymons.asm index b011784173a..d612a347230 100644 --- a/engine/pokemon/switchpartymons.asm +++ b/engine/pokemon/switchpartymons.asm @@ -16,7 +16,7 @@ _SwitchPartyMons: .skip ret -.ClearSprite: ; 50f34 (14:4f34) +.ClearSprite: push af hlcoord 0, 1 ld bc, 2 * SCREEN_WIDTH @@ -39,7 +39,7 @@ _SwitchPartyMons: call WaitPlaySFX ret -.SwapMonAndMail: ; 50f62 (14:4f62) +.SwapMonAndMail: push hl push de push bc @@ -136,10 +136,10 @@ _SwitchPartyMons: pop hl ret -.CopyNameTowd002: ; 51036 (14:5036) +.CopyNameTowd002: ld de, wd002 -.CopyName: ; 51039 (14:5039) +.CopyName: ld bc, NAME_LENGTH call CopyBytes ret diff --git a/engine/pokemon/tempmon.asm b/engine/pokemon/tempmon.asm index 723bfb1dddc..4547a02b9a1 100644 --- a/engine/pokemon/tempmon.asm +++ b/engine/pokemon/tempmon.asm @@ -1,4 +1,4 @@ -CopyMonToTempMon: ; 5084a +CopyMonToTempMon: ; gets the BaseData of a mon ; and copies the party_struct to wTempMon @@ -32,13 +32,13 @@ CopyMonToTempMon: ; 5084a .done ret -CalcBufferMonStats: ; 5088b +CalcBufferMonStats: ld bc, wBufferMon jr _TempMonStatsCalculation -CalcTempmonStats: ; 50890 +CalcTempmonStats: ld bc, wTempMon -_TempMonStatsCalculation: ; 50893 +_TempMonStatsCalculation: ld hl, MON_LEVEL add hl, bc ld a, [hl] @@ -82,7 +82,7 @@ _TempMonStatsCalculation: ; 50893 ld [hl], a ret -GetMonSpecies: ; 508d5 +GetMonSpecies: ; [wMonType] has the type of the mon ; e = Nr. of mon (i.e. [wCurPartyMon]) diff --git a/engine/pokemon/types.asm b/engine/pokemon/types.asm index dc0df61aef6..76c7665a470 100644 --- a/engine/pokemon/types.asm +++ b/engine/pokemon/types.asm @@ -1,4 +1,4 @@ -PrintMonTypes: ; 5090d +PrintMonTypes: ; Print one or both types of [wCurSpecies] ; on the stats screen at hl. @@ -37,10 +37,9 @@ PrintMonTypes: ; 5090d add hl, bc ld bc, NAME_LENGTH_JAPANESE - 1 jp ByteFill -; 5093a -PrintMoveType: ; 5093a +PrintMoveType: ; Print the type of move b at hl. push hl @@ -58,7 +57,7 @@ PrintMoveType: ; 5093a ld b, a -PrintType: ; 50953 +PrintType: ; Print type b at hl. ld a, b @@ -75,10 +74,9 @@ PrintType: ; 50953 pop hl jp PlaceString -; 50964 -GetTypeName: ; 50964 +GetTypeName: ; Copy the name of type [wd265] to wStringBuffer1. ld a, [wd265] @@ -93,7 +91,6 @@ GetTypeName: ; 50964 ld de, wStringBuffer1 ld bc, MOVE_NAME_LENGTH jp CopyBytes -; 5097b INCLUDE "data/types/names.asm" diff --git a/engine/predef.asm b/engine/predef.asm index 13c593c903d..e18765b0ab1 100644 --- a/engine/predef.asm +++ b/engine/predef.asm @@ -1,4 +1,4 @@ -GetPredefPointer:: ; 854b +GetPredefPointer:: ; Return the bank and address of wPredefID in a and wPredefAddress. ; Save hl for later (back in Predef) @@ -24,6 +24,5 @@ GetPredefPointer:: ; 854b ld a, [hl] ret -; 856b INCLUDE "data/predef_pointers.asm" diff --git a/engine/printer/print_party.asm b/engine/printer/print_party.asm index fa225a2a993..eeb694d6295 100644 --- a/engine/printer/print_party.asm +++ b/engine/printer/print_party.asm @@ -1,6 +1,6 @@ PRINTPARTY_HP EQUS "\"◀\"" ; $71 -PrintPage1: ; 1dc1b0 +PrintPage1: hlcoord 0, 0 decoord 0, 0, wPrinterTileMapBuffer ld bc, 17 * SCREEN_WIDTH @@ -50,9 +50,8 @@ PrintPage1: ; 1dc1b0 jr nz, .column_loop ld [hl], $3a ret -; 1dc213 -PrintPage2: ; 1dc213 +PrintPage2: hlcoord 0, 0, wPrinterTileMapBuffer ld bc, 8 * SCREEN_WIDTH ld a, " " @@ -89,9 +88,8 @@ PrintPage2: ; 1dc213 ld a, b call nz, FarString ret -; 1dc26a -.FillColumn: ; 1dc26a +.FillColumn: push de ld de, SCREEN_WIDTH .column_loop @@ -101,7 +99,6 @@ PrintPage2: ; 1dc213 jr nz, .column_loop pop de ret -; 1dc275 GBPrinterStrings: ; used only for BANK(GBPrinterStrings) GBPrinterString_Null: db "@" @@ -132,9 +129,8 @@ GBPrinterString_PrinterError4: next "Check the Game Boy" next "Printer Manual." db "@" -; 1dc381 -PrintPartyMonPage1: ; 1dc381 +PrintPartyMonPage1: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -232,9 +228,8 @@ PrintPartyMonPage1: ; 1dc381 call GetSGBLayout call SetPalettes ret -; 1dc47b -PrintPartyMonPage2: ; 1dc47b +PrintPartyMonPage2: call ClearBGPalettes call ClearTileMap call ClearSprites @@ -284,24 +279,21 @@ PrintPartyMonPage2: ; 1dc47b call GetSGBLayout call SetPalettes ret -; 1dc507 -.PrintTempMonStats: ; 1dc507 +.PrintTempMonStats: lb bc, 2, 3 call PrintNum ret -; 1dc50e -Function1dc50e: ; 1dc50e +Function1dc50e: ld bc, NAME_LENGTH ld a, [wCurPartyMon] call AddNTimes ld e, l ld d, h ret -; 1dc51a -Function1dc51a: ; 1dc51a +Function1dc51a: and a jr z, .no_move @@ -315,9 +307,8 @@ Function1dc51a: ; 1dc51a .got_string call PlaceString ret -; 1dc52c -Function1dc52c: ; 1dc52c +Function1dc52c: farcall GetGender ld a, " " jr c, .got_gender @@ -334,18 +325,17 @@ Function1dc52c: ; 1dc52c hlcoord 18, 2 ld [hl], "⁂" ret -; 1dc550 -String1dc550: ; 1dc550 +String1dc550: db "OT/@" -String1dc554: ; 1dc554 +String1dc554: db "MOVE@" -String1dc559: ; 1dc559 +String1dc559: db "№.@" -String1dc55d: ; 1dc55d +String1dc55d: db "ATTACK" next "DEFENSE" next "SPCL.ATK" @@ -353,12 +343,11 @@ String1dc55d: ; 1dc55d next "SPEED" db "@" -String1dc584: ; 1dc584 +String1dc584: db "------------@" -; 1dc591 -GBPrinterHPIcon: ; 1dc591 +GBPrinterHPIcon: INCBIN "gfx/printer/hp.1bpp" -GBPrinterLvIcon: ; 1dc599 +GBPrinterLvIcon: INCBIN "gfx/printer/lv.1bpp" diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm index 0264b4f7ac3..e2b0f1af563 100644 --- a/engine/printer/printer.asm +++ b/engine/printer/printer.asm @@ -1,6 +1,6 @@ INCLUDE "engine/printer/printer_serial.asm" -SendScreenToPrinter: ; 843f0 +SendScreenToPrinter: .loop call JoyTextDelay call CheckCancelPrint @@ -21,31 +21,27 @@ SendScreenToPrinter: ; 843f0 .cancel scf ret -; 84411 -Printer_CleanUpAfterSend: ; 84411 +Printer_CleanUpAfterSend: xor a ld [wPrinterConnectionOpen], a ld [wPrinterOpcode], a ret -; 84419 -Printer_PrepareTileMapForPrint: ; 84419 +Printer_PrepareTileMapForPrint: push af call Printer_StartTransmission pop af ld [wcbfa], a call Printer_CopyTileMapToBuffer ret -; 84425 -Printer_ExitPrinter: ; 84425 +Printer_ExitPrinter: call ReturnToMapFromSubmenu call Printer_RestartMapMusic ret -; 8442c -PrintDexEntry: ; 8442c +PrintDexEntry: ld a, [wPrinterQueueLength] push af @@ -121,9 +117,8 @@ PrintDexEntry: ; 8442c pop af ld [wPrinterQueueLength], a ret -; 844bc -PrintPCBox: ; 844bc (21:44bc) +PrintPCBox: ld a, [wPrinterQueueLength] push af ld a, 18 / 2 @@ -211,12 +206,12 @@ PrintPCBox: ; 844bc (21:44bc) ld [wPrinterQueueLength], a ret -Printer_ResetRegistersAndStartDataSend: ; 84559 (21:4559) +Printer_ResetRegistersAndStartDataSend: call Printer_ResetJoypadRegisters call SendScreenToPrinter ret -PrintUnownStamp: ; 84560 +PrintUnownStamp: ld a, [wPrinterQueueLength] push af xor a @@ -274,15 +269,13 @@ PrintUnownStamp: ; 84560 pop af ld [wPrinterQueueLength], a ret -; 845d4 -PrintMail: ; 845d4 +PrintMail: call PrintMail_ call Printer_ExitPrinter ret -; 845db -PrintMail_: ; 845db +PrintMail_: ld a, [wPrinterQueueLength] push af xor a @@ -323,9 +316,8 @@ PrintMail_: ; 845db pop af ld [wPrinterQueueLength], a ret -; 8461a -PrintPartymon: ; 8461a +PrintPartymon: ld a, [wPrinterQueueLength] push af xor a @@ -385,9 +377,8 @@ PrintPartymon: ; 8461a pop af ld [wPrinterQueueLength], a ret -; 84688 -_PrintDiploma: ; 84688 +_PrintDiploma: ld a, [wPrinterQueueLength] push af @@ -449,9 +440,8 @@ _PrintDiploma: ; 84688 pop af ld [wPrinterQueueLength], a ret -; 846f6 -CheckCancelPrint: ; 846f6 +CheckCancelPrint: ld a, [hJoyDown] and B_BUTTON jr nz, .pressed_b @@ -484,45 +474,39 @@ CheckCancelPrint: ; 846f6 ld [hPrinter], a scf ret -; 84728 -Printer_CopyTileMapToBuffer: ; 84728 +Printer_CopyTileMapToBuffer: hlcoord 0, 0 ld de, wPrinterTileMapBuffer ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call CopyBytes ret -; 84735 -Printer_CopyBufferToTileMap: ; 84735 +Printer_CopyBufferToTileMap: ld hl, wPrinterTileMapBuffer decoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call CopyBytes ret -; 84742 -Printer_ResetJoypadRegisters: ; 84742 +Printer_ResetJoypadRegisters: xor a ld [hJoyReleased], a ld [hJoyPressed], a ld [hJoyDown], a ld [hJoyLast], a ret -; 8474c -Printer_PlayMusic: ; 8474c +Printer_PlayMusic: ld de, MUSIC_PRINTER call PlayMusic2 ret -; 84753 -Printer_RestartMapMusic: ; 84753 +Printer_RestartMapMusic: call RestartMapMusic ret -; 84757 -CheckPrinterStatus: ; 84757 +CheckPrinterStatus: ; Check for printer errors ; If [ca88] == -1, we're disconnected ld a, [wPrinterHandshake] @@ -561,9 +545,8 @@ CheckPrinterStatus: ; 84757 .load_text_index ld [wPrinterStatus], a ret -; 84785 -PlacePrinterStatusString: ; 84785 +PlacePrinterStatusString: ; Print nonzero printer status ld a, [wPrinterStatus] and a @@ -594,9 +577,8 @@ PlacePrinterStatusString: ; 84785 xor a ld [wPrinterStatus], a ret -; 847bd -Unreferenced_Function847bd: ; 847bd +Unreferenced_Function847bd: ld a, [wPrinterStatus] and a ret z @@ -626,13 +608,11 @@ Unreferenced_Function847bd: ; 847bd xor a ld [wPrinterStatus], a ret -; 847f5 String_PressBToCancel: db "Press B to Cancel@" -; 84807 -PrinterStatusStringPointers: ; 84807 +PrinterStatusStringPointers: dw GBPrinterString_Null ; @ dw GBPrinterString_CheckingLink ; CHECKING LINK dw GBPrinterString_Transmitting ; TRANSMITTING @@ -641,9 +621,8 @@ PrinterStatusStringPointers: ; 84807 dw GBPrinterString_PrinterError2 ; error 2 dw GBPrinterString_PrinterError3 ; error 3 dw GBPrinterString_PrinterError4 ; error 4 -; 84817 -PrintPCBox_Page1: ; 84817 (21:4817) +PrintPCBox_Page1: xor a ld [wWhichBoxMonToPrint], a hlcoord 0, 0 @@ -678,13 +657,11 @@ PrintPCBox_Page1: ; 84817 (21:4817) ld c, 3 call Printer_PrintBoxListSegment ret -; 84865 (21:4865) .String_PokemonList: db "#MON LIST@" -; 8486f -PrintPCBox_Page2: ; 8486f (21:486f) +PrintPCBox_Page2: hlcoord 0, 0 ld bc, SCREEN_HEIGHT * SCREEN_WIDTH ld a, " " @@ -701,7 +678,7 @@ PrintPCBox_Page2: ; 8486f (21:486f) call Printer_PrintBoxListSegment ret -PrintPCBox_Page3: ; 84893 (21:4893) +PrintPCBox_Page3: hlcoord 0, 0 ld bc, SCREEN_HEIGHT * SCREEN_WIDTH ld a, " " @@ -718,7 +695,7 @@ PrintPCBox_Page3: ; 84893 (21:4893) call Printer_PrintBoxListSegment ret -PrintPCBox_Page4: ; 848b7 (21:48b7) +PrintPCBox_Page4: hlcoord 0, 0 ld bc, SCREEN_HEIGHT * SCREEN_WIDTH ld a, " " @@ -739,7 +716,7 @@ PrintPCBox_Page4: ; 848b7 (21:48b7) call Printer_PrintBoxListSegment ret -Printer_PrintBoxListSegment: ; 848e7 (21:48e7) +Printer_PrintBoxListSegment: ld a, [wBankOfBoxToPrint] call GetSRAMBank .loop @@ -839,7 +816,7 @@ Printer_PrintBoxListSegment: ; 848e7 (21:48e7) call CloseSRAM ret -Printer_GetMonGender: ; 8498a (21:498a) +Printer_GetMonGender: push hl ld a, [wAddrOfBoxToPrint] ld l, a @@ -871,7 +848,7 @@ Printer_GetMonGender: ; 8498a (21:498a) ld [hli], a ret -Printer_GetBoxMonSpecies: ; 849c6 (21:49c6) +Printer_GetBoxMonSpecies: push hl ld e, a ld d, $0 @@ -885,7 +862,7 @@ Printer_GetBoxMonSpecies: ; 849c6 (21:49c6) pop hl ret -Printer_PlaceTopBorder: ; 849d7 (21:49d7) +Printer_PlaceTopBorder: hlcoord 0, 0 ld a, "┌" ld [hli], a @@ -899,7 +876,7 @@ Printer_PlaceTopBorder: ; 849d7 (21:49d7) ld [hl], a ret -Printer_PlaceSideBorders: ; 849e9 (21:49e9) +Printer_PlaceSideBorders: hlcoord 0, 0 ld de, SCREEN_WIDTH - 1 ld c, SCREEN_HEIGHT @@ -913,7 +890,7 @@ Printer_PlaceSideBorders: ; 849e9 (21:49e9) jr nz, .loop ret -Printer_PlaceBottomBorders: ; 849fc (21:49fc) +Printer_PlaceBottomBorders: hlcoord 0, 17 ld a, "└" ld [hli], a @@ -927,7 +904,7 @@ Printer_PlaceBottomBorders: ; 849fc (21:49fc) ld [hl], a ret -Printer_PlaceEmptyBoxSlotString: ; 84a0e (21:4a0e) +Printer_PlaceEmptyBoxSlotString: hlcoord 2, 0 ld c, $6 .loop @@ -942,8 +919,6 @@ Printer_PlaceEmptyBoxSlotString: ; 84a0e (21:4a0e) dec c jr nz, .loop ret -; 84a25 (21:4a25) -String84a25: ; 84a25 +String84a25: db " ------@" -; 84a2e diff --git a/engine/printer/printer_serial.asm b/engine/printer/printer_serial.asm index 4e0d10851a6..b7422cac48a 100644 --- a/engine/printer/printer_serial.asm +++ b/engine/printer/printer_serial.asm @@ -1,4 +1,4 @@ -Printer_StartTransmission: ; 84000 +Printer_StartTransmission: ld hl, wGameboyPrinterRAM ld bc, wGameboyPrinterRAMEnd - wGameboyPrinterRAM xor a @@ -14,9 +14,8 @@ Printer_StartTransmission: ; 84000 xor a ld [wJumptableIndex], a ret -; 84022 -PrinterJumptableIteration: ; 84022 +PrinterJumptableIteration: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -27,7 +26,6 @@ PrinterJumptableIteration: ; 84022 ld h, [hl] ld l, a jp hl -; 84031 .Jumptable: ; 84031 (21:4031) dw Print_InitPrinterHandshake ; 00 @@ -53,33 +51,33 @@ PrinterJumptableIteration: ; 84022 dw Printer_WaitLoopBack ; 12 dw Printer_WaitLoopBack_ ; 13 -Printer_NextSection: ; 84059 (21:4059) +Printer_NextSection: ld hl, wJumptableIndex inc [hl] ret -Printer_PrevSection: ; 8405e (21:405e) +Printer_PrevSection: ld hl, wJumptableIndex dec [hl] ret -Printer_Quit: ; 84063 (21:4063) +Printer_Quit: xor a ld [wPrinterStatusFlags], a ld hl, wJumptableIndex set 7, [hl] ret -Printer_NextSection_: ; 8406d (21:406d) +Printer_NextSection_: call Printer_NextSection ret -Printer_SectionOne: ; 84071 (21:4071) +Printer_SectionOne: ld a, $1 ld [wJumptableIndex], a ret -Print_InitPrinterHandshake: ; 84077 (21:4077) +Print_InitPrinterHandshake: call Printer_ResetData ld hl, PrinterDataPacket1 call Printer_CopyPacket @@ -94,7 +92,7 @@ Print_InitPrinterHandshake: ; 84077 (21:4077) ld [wPrinterStatus], a ret -Printer_StartTransmittingTilemap: ; 84099 (21:4099) +Printer_StartTransmittingTilemap: call Printer_ResetData ; check ??? ld hl, wPrinterRowIndex @@ -118,7 +116,7 @@ Printer_StartTransmittingTilemap: ; 84099 (21:4099) ld [wPrinterStatus], a ret -Printer_EndTilemapTransmission: ; 840c5 (21:40c5) +Printer_EndTilemapTransmission: ; ensure that we go from here to routine 7 ld a, $6 ld [wJumptableIndex], a @@ -133,7 +131,7 @@ Printer_EndTilemapTransmission: ; 840c5 (21:40c5) call Printer_WaitHandshake ret -Printer_SignalSendHeader: ; 840de (21:40de) +Printer_SignalSendHeader: call Printer_ResetData ld hl, PrinterDataPacket2 ; signal request print call Printer_CopyPacket @@ -151,7 +149,7 @@ Printer_SignalSendHeader: ; 840de (21:40de) ld [wPrinterStatus], a ret -Printer_SignalLoopBack: ; 84103 (21:4103) +Printer_SignalLoopBack: call Printer_ResetData ; send packet 1 ld hl, PrinterDataPacket1 ; signal no transmission @@ -166,7 +164,7 @@ Printer_SignalLoopBack: ; 84103 (21:4103) call Printer_WaitHandshake ret -Printer_WaitSerial: ; 84120 (21:4120) +Printer_WaitSerial: ld hl, wPrinterSerialFrameDelay inc [hl] ld a, [hl] @@ -177,7 +175,7 @@ Printer_WaitSerial: ; 84120 (21:4120) call Printer_NextSection ret -Printer_WaitSerialAndLoopBack2: ; 8412e (21:412e) +Printer_WaitSerialAndLoopBack2: ld hl, wPrinterSerialFrameDelay inc [hl] ld a, [hl] @@ -191,7 +189,7 @@ Printer_WaitSerialAndLoopBack2: ; 8412e (21:412e) call Printer_PrevSection ret -Printer_CheckConnectionStatus: ; 84143 (21:4143) +Printer_CheckConnectionStatus: ld a, [wPrinterOpcode] and a ret nz @@ -224,7 +222,7 @@ Printer_CheckConnectionStatus: ; 84143 (21:4143) ld [wJumptableIndex], a ret -Printer_TransmissionLoop: ; 84180 (21:4180) +Printer_TransmissionLoop: ld a, [wPrinterOpcode] and a ret nz @@ -246,7 +244,7 @@ Printer_TransmissionLoop: ; 84180 (21:4180) ld [wJumptableIndex], a ret -Printer_WaitUntilFinished: ; 841a1 (21:41a1) +Printer_WaitUntilFinished: ld a, [wPrinterOpcode] and a ret nz @@ -256,9 +254,9 @@ Printer_WaitUntilFinished: ; 841a1 (21:41a1) call Printer_NextSection ret -Printer_WaitLoopBack: ; 841b0 (21:41b0) +Printer_WaitLoopBack: call Printer_NextSection -Printer_WaitLoopBack_: ; 841b3 (21:41b3) +Printer_WaitLoopBack_: ld a, [wPrinterOpcode] and a ret nz @@ -269,7 +267,7 @@ Printer_WaitLoopBack_: ; 841b3 (21:41b3) ld [wJumptableIndex], a ret -Printer_WaitHandshake: ; 841c3 (21:41c3) +Printer_WaitHandshake: .loop ld a, [wPrinterOpcode] and a @@ -287,7 +285,7 @@ Printer_WaitHandshake: ; 841c3 (21:41c3) ld [rSC], a ret -Printer_CopyPacket: ; 841e2 (21:41e2) +Printer_CopyPacket: ld a, [hli] ld [wPrinterData], a ld a, [hli] @@ -302,7 +300,7 @@ Printer_CopyPacket: ; 841e2 (21:41e2) ld [wPrinterChecksum + 1], a ret -Printer_ResetData: ; 841fb (21:41fb) +Printer_ResetData: xor a ld hl, wPrinterData ld [hli], a @@ -320,7 +318,7 @@ Printer_ResetData: ; 841fb (21:41fb) call Printer_ByteFill ret -Printer_ComputeChecksum: ; 84219 (21:4219) +Printer_ComputeChecksum: ld hl, 0 ld bc, 4 ld de, wPrinterData @@ -337,7 +335,7 @@ Printer_ComputeChecksum: ; 84219 (21:4219) ld [wPrinterChecksum + 1], a ret -.ComputeChecksum: ; 8423c (21:423c) +.ComputeChecksum: .loop ld a, [de] inc de @@ -352,7 +350,7 @@ Printer_ComputeChecksum: ; 84219 (21:4219) jr nz, .loop ret -Printer_StageHeaderForSend: ; 84249 (21:4249) +Printer_StageHeaderForSend: ld a, $1 ld [wGameboyPrinter2bppSource + 0], a ld a, [wcbfa] @@ -363,7 +361,7 @@ Printer_StageHeaderForSend: ; 84249 (21:4249) ld [wGameboyPrinter2bppSource + 3], a ret -Printer_Convert2RowsTo2bpp: ; 84260 (21:4260) +Printer_Convert2RowsTo2bpp: ; de = wPrinterTileMapBuffer + 2 * SCREEN_WIDTH * ([wPrinterQueueLength] - [wPrinterRowIndex]) ld a, [wPrinterRowIndex] xor $ff @@ -420,7 +418,7 @@ Printer_Convert2RowsTo2bpp: ; 84260 (21:4260) jr nz, .loop2 ret -Printer_ByteFill: ; 842ab +Printer_ByteFill: push de ld e, a .loop @@ -433,7 +431,6 @@ Printer_ByteFill: ; 842ab ld a, e pop de ret -; 842b7 PrinterDataPacket1: db 1, 0, $00, 0 @@ -453,9 +450,8 @@ PrinterDataPacket5: ; unused PrinterDataPacket6: ; unused db 15, 0, $00, 0 dw 15 -; 842db -_PrinterReceive:: ; 842db +_PrinterReceive:: ld a, [wPrinterOpcode] add a ld e, a @@ -466,9 +462,8 @@ _PrinterReceive:: ; 842db ld h, [hl] ld l, a jp hl -; 842ea -.Jumptable: ; 842ea (21:42ea) +.Jumptable: dw Printer_DoNothing ; 00 dw Printer_Send0x33 ; 01 @@ -505,45 +500,45 @@ _PrinterReceive:: ; 842db dw Printer_ReceiveTowPrinterHandshakeAndSend0x00 ; 1e dw Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop ; 1f -Printer_NextInstruction: ; 8432a (21:432a) +Printer_NextInstruction: ld hl, wPrinterOpcode inc [hl] ret -Printer_DoNothing: ; 8432f (21:432f) +Printer_DoNothing: ret -Printer_Send0x33: ; 84330 (21:4330) +Printer_Send0x33: ld a, $33 call Printer_SerialSend call Printer_NextInstruction ret -Printer_SendPrinterData1: ; 84339 (21:4339) +Printer_SendPrinterData1: ld a, [wPrinterData] call Printer_SerialSend call Printer_NextInstruction ret -Printer_SendPrinterData2: ; 84343 (21:4343) +Printer_SendPrinterData2: ld a, [wPrinterData + 1] call Printer_SerialSend call Printer_NextInstruction ret -Printer_SendPrinterData3: ; 8434d (21:434d) +Printer_SendPrinterData3: ld a, [wPrinterData + 2] call Printer_SerialSend call Printer_NextInstruction ret -Printer_SendPrinterData4: ; 84357 (21:4357) +Printer_SendPrinterData4: ld a, [wPrinterData + 3] call Printer_SerialSend call Printer_NextInstruction ret -Printer_SendNextByte: ; 84361 (21:4361) +Printer_SendNextByte: ; decrement 16-bit counter ld hl, wPrinterSendByteCounter ld a, [hli] @@ -573,25 +568,25 @@ Printer_SendNextByte: ; 84361 (21:4361) .done call Printer_NextInstruction -Printer_SendwPrinterChecksumLo: ; 8438b (21:438b) +Printer_SendwPrinterChecksumLo: ld a, [wPrinterChecksum] call Printer_SerialSend call Printer_NextInstruction ret -Printer_SendwPrinterChecksumHi: ; 84395 (21:4395) +Printer_SendwPrinterChecksumHi: ld a, [wPrinterChecksum + 1] call Printer_SerialSend call Printer_NextInstruction ret -Printer_Send0x00: ; 8439f (21:439f) +Printer_Send0x00: ld a, $0 call Printer_SerialSend call Printer_NextInstruction ret -Printer_ReceiveTowPrinterHandshakeAndSend0x00: ; 843a8 (21:43a8) +Printer_ReceiveTowPrinterHandshakeAndSend0x00: ld a, [rSB] ld [wPrinterHandshake], a ld a, $0 @@ -599,32 +594,32 @@ Printer_ReceiveTowPrinterHandshakeAndSend0x00: ; 843a8 (21:43a8) call Printer_NextInstruction ret -Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop: ; 843b6 (21:43b6) +Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop: ld a, [rSB] ld [wPrinterStatusFlags], a xor a ld [wPrinterOpcode], a ret -Printer_Send0x0f: ; 843c0 (21:43c0) +Printer_Send0x0f: ld a, $f call Printer_SerialSend call Printer_NextInstruction ret -Printer_Send0x00_: ; 843c9 (21:43c9) +Printer_Send0x00_: ld a, $0 call Printer_SerialSend call Printer_NextInstruction ret -Printer_Send0x08: ; 843d2 (21:43d2) +Printer_Send0x08: ld a, $8 call Printer_SerialSend call Printer_NextInstruction ret -Printer_SerialSend: ; 843db (21:43db) +Printer_SerialSend: ld [rSB], a ld a, $1 ; switch to internal clock ld [rSC], a @@ -632,7 +627,7 @@ Printer_SerialSend: ; 843db (21:43db) ld [rSC], a ret -Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop_: ; 843e6 (21:43e6) +Printer_ReceiveTowPrinterStatusFlagsAndExitSendLoop_: ld a, [rSB] ld [wPrinterStatusFlags], a xor a diff --git a/engine/rtc/print_hours_mins.asm b/engine/rtc/print_hours_mins.asm index eb7dc161988..f4abc0c1b08 100644 --- a/engine/rtc/print_hours_mins.asm +++ b/engine/rtc/print_hours_mins.asm @@ -1,4 +1,4 @@ -Unreferenced_Function1dd6a9: ; 1dd6a9 +Unreferenced_Function1dd6a9: ld a, b ld b, c ld c, a @@ -13,7 +13,7 @@ Unreferenced_Function1dd6a9: ; 1dd6a9 pop bc ret -PrintHoursMins: ; 1dd6bb (77:56bb) +PrintHoursMins: ; Hours in b, minutes in c ld a, b cp 12 @@ -59,5 +59,5 @@ PrintHoursMins: ; 1dd6bb (77:56bb) call PlaceString ret -String_AM: db "AM@" ; 1dd6fc -String_PM: db "PM@" ; 1dd6ff +String_AM: db "AM@" +String_PM: db "PM@" diff --git a/engine/rtc/reset_password.asm b/engine/rtc/reset_password.asm index fd5007ba7f8..1130544df5c 100644 --- a/engine/rtc/reset_password.asm +++ b/engine/rtc/reset_password.asm @@ -1,4 +1,4 @@ -_ResetClock: ; 4d3b1 +_ResetClock: farcall BlankScreen ld b, SCGB_DIPLOMA call GetSGBLayout @@ -58,7 +58,7 @@ _ResetClock: ; 4d3b1 db "NO@" db "YES@" -ClockResetPassword: ; 4d41e +ClockResetPassword: call .CalculatePassword push de ld hl, wStringBuffer2 @@ -106,7 +106,7 @@ ClockResetPassword: ; 4d41e text_jump UnknownText_0x1c562e db "@" -.updateIDdisplay ; 4d468 +.updateIDdisplay hlcoord 14, 15 ld de, wStringBuffer2 ld c, 5 @@ -129,7 +129,7 @@ ClockResetPassword: ; 4d41e ld [hl], "▲" ret -.dpadinput ; 4d490 +.dpadinput ld a, b and D_LEFT jr nz, .left @@ -186,7 +186,7 @@ ClockResetPassword: ; 4d41e ld [hl], 9 ret -.getcurrentdigit ; 4d4d5 +.getcurrentdigit ld a, [wStringBuffer2 + 5] ld e, a ld d, $0 @@ -194,7 +194,7 @@ ClockResetPassword: ; 4d41e add hl, de ret -.ConvertDecIDToBytes: ; 4d4e0 +.ConvertDecIDToBytes: ld hl, 0 ld de, wStringBuffer2 + 4 ld bc, 1 @@ -206,7 +206,7 @@ ClockResetPassword: ; 4d41e ld bc, 1000 call .ConvertToBytes ld bc, 10000 -.ConvertToBytes: ; 4d501 +.ConvertToBytes: ld a, [de] dec de push hl @@ -218,7 +218,7 @@ ClockResetPassword: ; 4d41e add hl, bc ret -.CalculatePassword: ; 4d50f +.CalculatePassword: ld a, BANK(sPlayerData) call GetSRAMBank ld de, 0 @@ -234,7 +234,7 @@ ClockResetPassword: ; 4d41e call CloseSRAM ret -.ComponentFromNumber: ; 4d533 +.ComponentFromNumber: ld a, [hli] add e ld e, a @@ -245,7 +245,7 @@ ClockResetPassword: ; 4d41e jr nz, .ComponentFromNumber ret -.ComponentFromString: ; 4d53e +.ComponentFromString: ld a, [hli] cp "@" ret z diff --git a/engine/rtc/restart_clock.asm b/engine/rtc/restart_clock.asm index 5fbac80dd42..a36ef31ebef 100644 --- a/engine/rtc/restart_clock.asm +++ b/engine/rtc/restart_clock.asm @@ -1,4 +1,4 @@ -RestartClock_GetWraparoundTime: ; 20000 (8:4000) +RestartClock_GetWraparoundTime: push hl dec a ld e, a @@ -16,9 +16,8 @@ endr ld c, [hl] pop hl ret -; 20015 (8:4015) -.WrapAroundTimes: ; 20015 +.WrapAroundTimes: dw wBuffer4 db 7, 4 @@ -27,9 +26,8 @@ endr dw wBuffer6 db 60, 15 -; 20021 -RestartClock: ; 20021 (8:4021) +RestartClock: ; If we're here, we had an RTC overflow. ld hl, .Text_ClockTimeMayBeWrong call PrintText @@ -48,7 +46,6 @@ RestartClock: ; 20021 (8:4021) ld [hl], b ld c, a ret -; 20047 (8:4047) .Text_ClockTimeMayBeWrong: ; 0x20047 ; The clock's time may be wrong. Please reset the time. @@ -62,7 +59,7 @@ RestartClock: ; 20021 (8:4021) db "@" ; 0x20051 -.SetClock: ; 20051 (8:4051) +.SetClock: ld a, 1 ld [wBuffer1], a ; which digit ld [wBuffer2], a @@ -105,7 +102,6 @@ RestartClock: ; 20021 (8:4021) .cancel ld a, $1 ret -; 200b0 (8:40b0) .Text_IsThisOK: ; 0x200b0 ; Is this OK? @@ -193,7 +189,7 @@ RestartClock: ; 20021 (8:4021) xor a ret -.PrintTime: ; 2011f (8:411f) +.PrintTime: hlcoord 0, 5 ld b, 5 ld c, 18 @@ -217,17 +213,15 @@ RestartClock: ; 20021 (8:4021) ld a, [wBuffer1] ld [wBuffer2], a ret -; 20160 (8:4160) -.unreferenced ; 20160 +.unreferenced ; unused ld a, [wBuffer3] ld b, a call Coord2Tile ret -; 20168 -.PlaceChars: ; 20168 (8:4168) +.PlaceChars: push de call RestartClock_GetWraparoundTime ld a, [wBuffer3] @@ -240,14 +234,11 @@ RestartClock: ; 20021 (8:4021) add hl, bc ld [hl], e ret -; 2017c (8:417c) -UnreferencedString_HourJP: ; 2017c +UnreferencedString_HourJP: ; unused db "じ@" ; HR -; 2017e -UnreferencedString_MinuteJP: ; 2017e +UnreferencedString_MinuteJP: ; unused db "ふん@" ; MIN -; 20181 diff --git a/engine/rtc/rtc.asm b/engine/rtc/rtc.asm index 37e24c1edea..4a8aab50a92 100644 --- a/engine/rtc/rtc.asm +++ b/engine/rtc/rtc.asm @@ -9,9 +9,8 @@ Unreferenced_StopRTC: ld [MBC3RTC], a call CloseSRAM ret -; 14019 -StartRTC: ; 14019 +StartRTC: ld a, SRAM_ENABLE ld [MBC3SRamEnable], a call LatchClock @@ -22,9 +21,8 @@ StartRTC: ; 14019 ld [MBC3RTC], a call CloseSRAM ret -; 14032 -GetTimeOfDay:: ; 14032 +GetTimeOfDay:: ; get time of day based on the current hour ld a, [hHours] ; hour ld hl, TimesOfDay @@ -46,9 +44,8 @@ GetTimeOfDay:: ; 14032 ld a, [hl] ld [wTimeOfDay], a ret -; 14044 -TimesOfDay: ; 14044 +TimesOfDay: ; hours for the time of day ; 0400-0959 morn | 1000-1759 day | 1800-0359 nite db MORN_HOUR, NITE_F @@ -56,16 +53,14 @@ TimesOfDay: ; 14044 db NITE_HOUR, DAY_F db MAX_HOUR, NITE_F db -1, MORN_F -; 1404e Unreferenced_1404e: db 20, NITE_F db 40, MORN_F db 60, DAY_F db -1, MORN_F -; 14056 -StageRTCTimeForSave: ; 14056 +StageRTCTimeForSave: call UpdateTime ld hl, wRTC ld a, [wCurDay] @@ -77,9 +72,8 @@ StageRTCTimeForSave: ; 14056 ld a, [hSeconds] ld [hli], a ret -; 1406a -SaveRTC: ; 1406a +SaveRTC: ld a, $a ld [MBC3SRamEnable], a call LatchClock @@ -93,9 +87,8 @@ SaveRTC: ; 1406a ld [sRTCStatusFlags], a call CloseSRAM ret -; 14089 -StartClock:: ; 14089 +StartClock:: call GetClock call Function1409b call FixDays @@ -107,9 +100,8 @@ StartClock:: ; 14089 .skip_set call StartRTC ret -; 1409b -Function1409b: ; 1409b +Function1409b: ld hl, hRTCDayHi bit 7, [hl] jr nz, .set_bit_7 @@ -123,9 +115,8 @@ Function1409b: ; 1409b ld a, %10000000 call RecordRTCStatus ; set bit 7 on sRTCStatusFlags ret -; 140ae -Function140ae: ; 140ae +Function140ae: call CheckRTCStatus ld c, a and %11000000 ; Day count exceeded 255 or 16383 @@ -160,9 +151,8 @@ Function140ae: ; 140ae .dont_update xor a ret -; 140ed -_InitTime:: ; 140ed +_InitTime:: call GetClock call FixDays ld hl, hRTCSeconds @@ -206,4 +196,3 @@ _InitTime:: ; 140ed .okay_days ld [de], a ret -; 1412a diff --git a/engine/rtc/timeset.asm b/engine/rtc/timeset.asm index eda3094e107..6c05d686c7f 100644 --- a/engine/rtc/timeset.asm +++ b/engine/rtc/timeset.asm @@ -1,7 +1,7 @@ TIMESET_UP_ARROW EQUS "\"♂\"" ; $ef TIMESET_DOWN_ARROW EQUS "\"♀\"" ; $f5 -InitClock: ; 90672 (24:4672) +InitClock: ; Ask the player to set the time. ld a, [hInMenu] push af @@ -120,7 +120,7 @@ InitClock: ; 90672 (24:4672) ld [hInMenu], a ret -.ClearScreen: ; 90783 (24:4783) +.ClearScreen: xor a ld [hBGMapMode], a hlcoord 0, 0 @@ -131,7 +131,7 @@ InitClock: ; 90672 (24:4672) ld [hBGMapMode], a ret -SetHour: ; 90795 (24:4795) +SetHour: ld a, [hJoyPressed] and A_BUTTON jr nz, .Confirm @@ -183,7 +183,7 @@ SetHour: ; 90795 (24:4795) scf ret -DisplayHourOClock: ; 907de (24:47de) +DisplayHourOClock: push hl ld a, [wInitHourBuffer] ld c, a @@ -195,9 +195,8 @@ DisplayHourOClock: ; 907de (24:47de) call PlaceString pop hl ret -; 907f1 (24:47f1) -UnreferencedFunction907f1: ; 907f1 +UnreferencedFunction907f1: ld h, d ld l, e push hl @@ -222,9 +221,8 @@ UnreferencedFunction907f1: ; 907f1 inc hl inc hl ret -; 90810 -SetMinutes: ; 90810 (24:4810) +SetMinutes: ld a, [hJoyPressed] and A_BUTTON jr nz, .a_button @@ -273,7 +271,7 @@ SetMinutes: ; 90810 (24:4810) scf ret -DisplayMinutesWithMinString: ; 90859 (24:4859) +DisplayMinutesWithMinString: ld de, wInitMinuteBuffer call PrintTwoDigitNumberRightAlign inc hl @@ -281,7 +279,7 @@ DisplayMinutesWithMinString: ; 90859 (24:4859) call PlaceString ret -PrintTwoDigitNumberRightAlign: ; 90867 (24:4867) +PrintTwoDigitNumberRightAlign: push hl ld a, " " ld [hli], a @@ -290,7 +288,6 @@ PrintTwoDigitNumberRightAlign: ; 90867 (24:4867) lb bc, PRINTNUM_RIGHTALIGN | 1, 2 call PrintNum ret -; 90874 (24:4874) Text_WokeUpOak: ; 0x90874 ; Zzz… Hm? Wha…? You woke me up! Will you check the clock for me? @@ -306,7 +303,6 @@ Text_WhatTimeIsIt: ; 0x90879 String_oclock: db "o'clock@" -; 90886 Text_WhatHrs: ; 0x90886 ; What?@ @ @@ -316,7 +312,6 @@ Text_WhatHrs: ; 0x90886 call DisplayHourOClock ld hl, .QuestionMark ret -; 90895 (24:4895) .QuestionMark: ; 0x90895 ; ? @@ -332,7 +327,6 @@ Text_HowManyMinutes: ; 0x9089a String_min: db "min.@" -; 908a4 Text_WhoaMins: ; 0x908a4 ; Whoa!@ @ @@ -342,7 +336,6 @@ Text_WhoaMins: ; 0x908a4 call DisplayMinutesWithMinString ld hl, .QuestionMark ret -; 908b3 (24:48b3) .QuestionMark: ; 0x908b3 ; ? @@ -379,7 +372,6 @@ OakText_ResponseToSetTime: ; 0x908b8 .day: ld hl, .yikes ret -; 908ec (24:48ec) .overslept ; 0x908ec ; ! I overslept! @@ -399,15 +391,14 @@ OakText_ResponseToSetTime: ; 0x908b8 db "@" ; 0x908fb -TimeSetBackgroundGFX: ; 908fb +TimeSetBackgroundGFX: INCBIN "gfx/new_game/timeset_bg.1bpp" -TimeSetUpArrowGFX: ; 90903 +TimeSetUpArrowGFX: INCBIN "gfx/new_game/up_arrow.1bpp" -TimeSetDownArrowGFX: ; 9090b +TimeSetDownArrowGFX: INCBIN "gfx/new_game/down_arrow.1bpp" -; 90913 -SetDayOfWeek: ; 90913 +SetDayOfWeek: ld a, [hInMenu] push af ld a, $1 @@ -459,9 +450,8 @@ SetDayOfWeek: ; 90913 pop af ld [hInMenu], a ret -; 90993 -.GetJoypadAction: ; 90993 +.GetJoypadAction: ld a, [hJoyPressed] and A_BUTTON jr z, .not_A @@ -515,9 +505,8 @@ SetDayOfWeek: ; 90913 call WaitBGMap and a ret -; 909de -.PlaceWeekdayString: ; 909de +.PlaceWeekdayString: push hl ld a, [wTempDayOfWeek] ld e, a @@ -531,9 +520,8 @@ SetDayOfWeek: ; 90913 pop hl call PlaceString ret -; 909f2 -.WeekdayStrings: ; 909f2 +.WeekdayStrings: ; entries correspond to wCurDay constants (see constants/wram_constants.asm) dw .Sunday dw .Monday @@ -565,7 +553,6 @@ SetDayOfWeek: ; 90913 call .PlaceWeekdayString ld hl, .IsIt ret -; 90a4f (24:4a4f) .IsIt: ; 0x90a4f ; , is it? @@ -573,7 +560,7 @@ SetDayOfWeek: ; 90913 db "@" ; 0x90a54 -InitialSetDSTFlag: ; 90a54 +InitialSetDSTFlag: ld a, [wDST] set 7, a ld [wDST], a @@ -583,9 +570,8 @@ InitialSetDSTFlag: ; 90a54 ld hl, .Text call PlaceHLTextAtBC ret -; 90a6c -.Text: ; 90a6c +.Text: start_asm call UpdateTime ld a, [hHours] @@ -596,7 +582,6 @@ InitialSetDSTFlag: ; 90a54 farcall PrintHoursMins ld hl, .DSTIsThatOK ret -; 90a83 (24:4a83) .DSTIsThatOK: ; 0x90a83 ; DST, is that OK? @@ -604,7 +589,7 @@ InitialSetDSTFlag: ; 90a54 db "@" ; 0x90a88 -InitialClearDSTFlag: ; 90a88 +InitialClearDSTFlag: ld a, [wDST] res 7, a ld [wDST], a @@ -614,9 +599,8 @@ InitialClearDSTFlag: ; 90a88 ld hl, .Text call PlaceHLTextAtBC ret -; 90aa0 -.Text: ; 90aa0 +.Text: start_asm call UpdateTime ld a, [hHours] @@ -627,7 +611,6 @@ InitialClearDSTFlag: ; 90a88 farcall PrintHoursMins ld hl, .IsThatOK ret -; 90ab7 .IsThatOK: ; 0x90ab7 ; , is that OK? @@ -635,14 +618,13 @@ InitialClearDSTFlag: ; 90a88 db "@" ; 0x90abc -DebugDisplayTime: ; 90abc +DebugDisplayTime: hlcoord 1, 14 lb bc, 3, SCREEN_WIDTH - 2 call ClearBox ld hl, .Text call PlaceHLTextAtBC ret -; 90acc .Text: ; 0x90acc start_asm @@ -694,14 +676,13 @@ DebugDisplayTime: ; 90abc .done ld hl, .NowOnDebug ret -; 90b13 .NowOnDebug: ; 0x90b13 text "Now on DEBUG…" prompt ; 0x90b23 -.PrintTime: ; 90b23 +.PrintTime: lb bc, 1, 3 call PrintNum ld [hl], "." @@ -715,9 +696,8 @@ DebugDisplayTime: ; 90abc lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNum ret -; 90b3e -PrintHour: ; 90b3e (24:4b3e) +PrintHour: ld l, e ld h, d push bc @@ -733,7 +713,7 @@ PrintHour: ; 90b3e (24:4b3e) call PrintTwoDigitNumberRightAlign ret -GetTimeOfDayString: ; 90b58 (24:4b58) +GetTimeOfDayString: ld a, c cp MORN_HOUR jr c, .nite @@ -750,12 +730,10 @@ GetTimeOfDayString: ; 90b58 (24:4b58) .day ld de, .day_string ret -; 90b71 (24:4b71) .nite_string: db "NITE@" .morn_string: db "MORN@" .day_string: db "DAY@" -; 90b7f AdjustHourForAMorPM: ; Convert the hour stored in c (0-23) to a 1-12 value diff --git a/engine/smallflag.asm b/engine/smallflag.asm index 2a6d91ee19f..22819e5d585 100644 --- a/engine/smallflag.asm +++ b/engine/smallflag.asm @@ -1,4 +1,4 @@ -SmallFarFlagAction: ; 4d7c1 +SmallFarFlagAction: ; Perform action b on bit c in flag array hl. ; If checking a flag, check flag array d:hl unless d is 0. diff --git a/engine/tilesets/map_palettes.asm b/engine/tilesets/map_palettes.asm index a9d2b382fc0..5f943795a9c 100644 --- a/engine/tilesets/map_palettes.asm +++ b/engine/tilesets/map_palettes.asm @@ -1,4 +1,4 @@ -SwapTextboxPalettes:: ; 4c000 +SwapTextboxPalettes:: hlcoord 0, 0 decoord 0, 0, wAttrMap ld b, SCREEN_HEIGHT @@ -44,7 +44,7 @@ SwapTextboxPalettes:: ; 4c000 jr nz, .loop ret -ScrollBGMapPalettes:: ; 4c03f +ScrollBGMapPalettes:: ld hl, wBGMapBuffer ld de, wBGMapPalBuffer .loop diff --git a/engine/tilesets/mapgroup_roofs.asm b/engine/tilesets/mapgroup_roofs.asm index 58e5e7cfe7f..8262f57b121 100644 --- a/engine/tilesets/mapgroup_roofs.asm +++ b/engine/tilesets/mapgroup_roofs.asm @@ -1,4 +1,4 @@ -LoadMapGroupRoof:: ; 1c000 +LoadMapGroupRoof:: ld a, [wMapGroup] ld e, a ld d, 0 @@ -14,7 +14,6 @@ LoadMapGroupRoof:: ; 1c000 ld bc, 9 tiles call CopyBytes ret -; 1c021 INCLUDE "data/maps/roofs.asm" diff --git a/engine/tilesets/tileset_anims.asm b/engine/tilesets/tileset_anims.asm index bf0037e6547..ce3510e92f1 100644 --- a/engine/tilesets/tileset_anims.asm +++ b/engine/tilesets/tileset_anims.asm @@ -1,4 +1,4 @@ -_AnimateTileset:: ; fc000 +_AnimateTileset:: ; Iterate over a given pointer array of ; animation functions (one per frame). @@ -32,7 +32,6 @@ _AnimateTileset:: ; fc000 ld l, a jp hl -; fc01b Tileset0Anim: ; 0xfc01b TilesetJohtoModernAnim: ; 0xfc01b @@ -290,26 +289,24 @@ TilesetAerodactylWordRoomAnim: ; 0xfc2e7 dw NULL, DoneTileAnimation ; 0xfc2fb -DoneTileAnimation: ; fc2fb +DoneTileAnimation: ; Reset the animation command loop. xor a ld [hTileAnimFrame], a -WaitTileAnimation: ; fc2fe +WaitTileAnimation: ; Do nothing this frame. ret -; fc2ff -StandingTileFrame8: ; fc2ff +StandingTileFrame8: ld a, [wTileAnimationTimer] inc a and %111 ld [wTileAnimationTimer], a ret -; fc309 -ScrollTileRightLeft: ; fc309 +ScrollTileRightLeft: ; Scroll right for 4 ticks, then left for 4 ticks. ld a, [wTileAnimationTimer] inc a @@ -318,9 +315,8 @@ ScrollTileRightLeft: ; fc309 and %100 jr nz, ScrollTileLeft jr ScrollTileRight -; fc318 -ScrollTileUpDown: ; fc318 +ScrollTileUpDown: ; Scroll up for 4 ticks, then down for 4 ticks. ld a, [wTileAnimationTimer] inc a @@ -329,9 +325,8 @@ ScrollTileUpDown: ; fc318 and %100 jr nz, ScrollTileDown jr ScrollTileUp -; fc327 -ScrollTileLeft: ; fc327 +ScrollTileLeft: ld h, d ld l, e ld c, 4 @@ -344,9 +339,8 @@ endr dec c jr nz, .loop ret -; fc33b -ScrollTileRight: ; fc33b +ScrollTileRight: ld h, d ld l, e ld c, 4 @@ -359,9 +353,8 @@ endr dec c jr nz, .loop ret -; fc34f -ScrollTileUp: ; fc34f +ScrollTileUp: ld h, d ld l, e ld d, [hl] @@ -386,9 +379,8 @@ ScrollTileUp: ; fc34f dec a jr nz, .loop ret -; fc36a -ScrollTileDown: ; fc36a +ScrollTileDown: ld h, d ld l, e ld de, TILE_WIDTH * 2 - 2 @@ -415,10 +407,9 @@ ScrollTileDown: ; fc36a dec a jr nz, .loop ret -; fc387 -AnimateFountain: ; fc387 +AnimateFountain: ld hl, sp+0 ld b, h ld c, l @@ -454,10 +445,9 @@ AnimateFountain: ; fc387 .frame3 INCBIN "gfx/tilesets/fountain/3.2bpp" .frame4 INCBIN "gfx/tilesets/fountain/4.2bpp" .frame5 INCBIN "gfx/tilesets/fountain/5.2bpp" -; fc402 -AnimateWaterTile: ; fc402 +AnimateWaterTile: ; Draw a water tile for the current frame in VRAM tile at de. ; Save sp in bc (see WriteTile). @@ -488,14 +478,12 @@ AnimateWaterTile: ; fc402 ld h, d jp WriteTile -; fc41c -WaterTileFrames: ; fc41c +WaterTileFrames: INCBIN "gfx/tilesets/water/water.2bpp" -; fc45c -ForestTreeLeftAnimation: ; fc45c +ForestTreeLeftAnimation: ld hl, sp+0 ld b, h ld c, l @@ -523,21 +511,18 @@ ForestTreeLeftAnimation: ; fc45c ld sp, hl ld hl, vTiles2 tile $0c jp WriteTile -; fc484 -ForestTreeLeftFrames: ; fc484 +ForestTreeLeftFrames: INCBIN "gfx/tilesets/forest-tree/1.2bpp" INCBIN "gfx/tilesets/forest-tree/2.2bpp" -; fc4a4 -ForestTreeRightFrames: ; fc4a4 +ForestTreeRightFrames: INCBIN "gfx/tilesets/forest-tree/3.2bpp" INCBIN "gfx/tilesets/forest-tree/4.2bpp" -; fc4c4 -ForestTreeRightAnimation: ; fc4c4 +ForestTreeRightAnimation: ld hl, sp+0 ld b, h ld c, l @@ -569,10 +554,9 @@ ForestTreeRightAnimation: ; fc4c4 ld sp, hl ld hl, vTiles2 tile $0f jp WriteTile -; fc4f2 -ForestTreeLeftAnimation2: ; fc4f2 +ForestTreeLeftAnimation2: ld hl, sp+0 ld b, h ld c, l @@ -601,10 +585,9 @@ ForestTreeLeftAnimation2: ; fc4f2 ld sp, hl ld hl, vTiles2 tile $0c jp WriteTile -; fc51c -ForestTreeRightAnimation2: ; fc51c +ForestTreeRightAnimation2: ld hl, sp+0 ld b, h ld c, l @@ -637,10 +620,9 @@ ForestTreeRightAnimation2: ; fc51c ld sp, hl ld hl, vTiles2 tile $0f jp WriteTile -; fc54c -GetForestTreeFrame: ; fc54c +GetForestTreeFrame: ; Return 0 if a is even, or 2 if odd. and a jr z, .even @@ -663,10 +645,9 @@ GetForestTreeFrame: ; fc54c .even xor a ret -; fc56d -AnimateFlowerTile: ; fc56d +AnimateFlowerTile: ; No parameters. ; Save sp in bc (see WriteTile). @@ -694,17 +675,15 @@ AnimateFlowerTile: ; fc56d ld hl, vTiles2 tile $03 jp WriteTile -; fc58c -FlowerTileFrames: ; fc58c +FlowerTileFrames: INCBIN "gfx/tilesets/flower/dmg_1.2bpp" INCBIN "gfx/tilesets/flower/cgb_1.2bpp" INCBIN "gfx/tilesets/flower/dmg_2.2bpp" INCBIN "gfx/tilesets/flower/cgb_2.2bpp" -; fc5cc -LavaBubbleAnim1: ; fc5cc +LavaBubbleAnim1: ; Splash in the bottom-right corner of the fountain. ld hl, sp+0 ld b, h @@ -723,10 +702,9 @@ LavaBubbleAnim1: ; fc5cc ld sp, hl ld hl, vTiles2 tile $5b jp WriteTile -; fc5eb -LavaBubbleAnim2: ; fc5eb +LavaBubbleAnim2: ; Splash in the top-left corner of the fountain. ld hl, sp+0 ld b, h @@ -743,18 +721,16 @@ LavaBubbleAnim2: ; fc5eb ld sp, hl ld hl, vTiles2 tile $38 jp WriteTile -; fc605 -LavaBubbleFrames: ; fc605 +LavaBubbleFrames: INCBIN "gfx/tilesets/lava/1.2bpp" INCBIN "gfx/tilesets/lava/2.2bpp" INCBIN "gfx/tilesets/lava/3.2bpp" INCBIN "gfx/tilesets/lava/4.2bpp" -; fc645 -AnimateTowerPillarTile: ; fc645 +AnimateTowerPillarTile: ; Read from struct at de: ; Destination (VRAM) ; Address of the first tile in the frame array @@ -799,17 +775,15 @@ AnimateTowerPillarTile: ; fc645 .frames db $00, $10, $20, $30, $40, $30, $20, $10 -; fc673 -StandingTileFrame: ; fc673 +StandingTileFrame: ld hl, wTileAnimationTimer inc [hl] ret -; fc678 -AnimateWhirlpoolTile: ; fc678 +AnimateWhirlpoolTile: ; Update whirlpool tile using struct at de. ; Struct: @@ -852,10 +826,9 @@ AnimateWhirlpoolTile: ; fc678 ld h, d jr WriteTile -; fc696 -WriteTileFromBuffer: ; fc696 +WriteTileFromBuffer: ; Write tiledata at wTileAnimBuffer to de. ; wTileAnimBuffer is loaded to sp for WriteTile. @@ -869,10 +842,9 @@ WriteTileFromBuffer: ; fc696 ld h, d ld l, e jr WriteTile -; fc6a2 -WriteTileToBuffer: ; fc6a2 +WriteTileToBuffer: ; Write tiledata de to wTileAnimBuffer. ; de is loaded to sp for WriteTile. @@ -888,7 +860,7 @@ WriteTileToBuffer: ; fc6a2 ; fallthrough -WriteTile: ; fc6ac +WriteTile: ; Write one 8x8 tile ($10 bytes) from sp to hl. ; Warning: sp is saved in bc so we can abuse pop. @@ -912,10 +884,9 @@ endr ld l, c ld sp, hl ret -; fc6d7 -TileAnimationPalette: ; fc6d7 +TileAnimationPalette: ; Transition between color values 0-2 for color 0 in palette 3. ; No palette changes on DMG. @@ -978,10 +949,9 @@ TileAnimationPalette: ; fc6d7 pop af ld [rSVBK], a ret -; fc71e -FlickeringCaveEntrancePalette: ; fc71e +FlickeringCaveEntrancePalette: ; No palette changes on DMG. ld a, [hCGB] and a @@ -1020,7 +990,6 @@ FlickeringCaveEntrancePalette: ; fc71e pop af ld [rSVBK], a ret -; fc750 TowerPillarTilePointer1: dw vTiles2 tile $2d, TowerPillarTile1 @@ -1044,17 +1013,14 @@ TowerPillarTile7: INCBIN "gfx/tilesets/tower-pillar/7.2bpp" TowerPillarTile8: INCBIN "gfx/tilesets/tower-pillar/8.2bpp" TowerPillarTile9: INCBIN "gfx/tilesets/tower-pillar/9.2bpp" TowerPillarTile10: INCBIN "gfx/tilesets/tower-pillar/10.2bpp" -; fca98 WhirlpoolFrames1: dw vTiles2 tile $32, WhirlpoolTiles1 WhirlpoolFrames2: dw vTiles2 tile $33, WhirlpoolTiles2 WhirlpoolFrames3: dw vTiles2 tile $42, WhirlpoolTiles3 WhirlpoolFrames4: dw vTiles2 tile $43, WhirlpoolTiles4 -; fcaa8 WhirlpoolTiles1: INCBIN "gfx/tilesets/whirlpool/1.2bpp" WhirlpoolTiles2: INCBIN "gfx/tilesets/whirlpool/2.2bpp" WhirlpoolTiles3: INCBIN "gfx/tilesets/whirlpool/3.2bpp" WhirlpoolTiles4: INCBIN "gfx/tilesets/whirlpool/4.2bpp" -; fcba8 diff --git a/engine/tilesets/tileset_palettes.asm b/engine/tilesets/tileset_palettes.asm index e2c39c0aba4..1e433b158df 100644 --- a/engine/tilesets/tileset_palettes.asm +++ b/engine/tilesets/tileset_palettes.asm @@ -1,4 +1,4 @@ -LoadSpecialMapPalette: ; 494ac +LoadSpecialMapPalette: ld a, [wMapTileset] cp TILESET_POKECOM_CENTER jr z, .pokecom_2f @@ -51,78 +51,66 @@ LoadSpecialMapPalette: ; 494ac .do_nothing and a ret -; 494f2 -LoadPokeComPalette: ; 494f2 +LoadPokeComPalette: ld a, BANK(wBGPals1) ld de, wBGPals1 ld hl, PokeComPalette ld bc, 8 palettes call FarCopyWRAM ret -; 49501 -PokeComPalette: ; 49501 +PokeComPalette: INCLUDE "gfx/tilesets/pokecom_center.pal" -; 49541 -LoadBattleTowerPalette: ; 49541 +LoadBattleTowerPalette: ld a, BANK(wBGPals1) ld de, wBGPals1 ld hl, BattleTowerPalette ld bc, 8 palettes call FarCopyWRAM ret -; 49550 -BattleTowerPalette: ; 49550 +BattleTowerPalette: INCLUDE "gfx/tilesets/battle_tower.pal" -; 49590 -LoadIcePathPalette: ; 49590 +LoadIcePathPalette: ld a, BANK(wBGPals1) ld de, wBGPals1 ld hl, IcePathPalette ld bc, 8 palettes call FarCopyWRAM ret -; 4959f -IcePathPalette: ; 4959f +IcePathPalette: INCLUDE "gfx/tilesets/ice_path.pal" -; 495df -LoadHousePalette: ; 495df +LoadHousePalette: ld a, BANK(wBGPals1) ld de, wBGPals1 ld hl, HousePalette ld bc, 8 palettes call FarCopyWRAM ret -; 495ee -HousePalette: ; 495ee +HousePalette: INCLUDE "gfx/tilesets/house.pal" -; 4962e -LoadRadioTowerPalette: ; 4962e +LoadRadioTowerPalette: ld a, BANK(wBGPals1) ld de, wBGPals1 ld hl, RadioTowerPalette ld bc, 8 palettes call FarCopyWRAM ret -; 4963d -RadioTowerPalette: ; 4963d +RadioTowerPalette: INCLUDE "gfx/tilesets/radio_tower.pal" -; 4967d -MansionPalette1: ; 4967d +MansionPalette1: INCLUDE "gfx/tilesets/mansion_1.pal" -; 496c5 -LoadMansionPalette: ; 496c5 +LoadMansionPalette: ld a, BANK(wBGPals1) ld de, wBGPals1 ld hl, MansionPalette1 @@ -144,8 +132,6 @@ LoadMansionPalette: ; 496c5 ld bc, 1 palettes call FarCopyWRAM ret -; 496fe -MansionPalette2: ; 496fe +MansionPalette2: INCLUDE "gfx/tilesets/mansion_2.pal" -; 49706 diff --git a/engine/tilesets/timeofday_pals.asm b/engine/tilesets/timeofday_pals.asm index b8d43d2522e..cda6e1e0dce 100644 --- a/engine/tilesets/timeofday_pals.asm +++ b/engine/tilesets/timeofday_pals.asm @@ -1,18 +1,17 @@ -DummyPredef35: ; 8c000 +DummyPredef35: DummyPredef36: ret -UpdateTimeOfDayPal:: ; 8c001 +UpdateTimeOfDayPal:: call UpdateTime ld a, [wTimeOfDay] ld [wCurTimeOfDay], a call GetTimePalette ld [wTimeOfDayPal], a ret -; 8c011 -_TimeOfDayPals:: ; 8c011 +_TimeOfDayPals:: ; return carry if pals are changed ; forced pals? @@ -109,34 +108,30 @@ _TimeOfDayPals:: ; 8c011 ; no change occurred and a ret -; 8c070 -_UpdateTimePals:: ; 8c070 +_UpdateTimePals:: ld c, $9 ; normal call GetTimePalFade call DmgToCgbTimePals ret -; 8c079 -FadeInPalettes:: ; 8c079 +FadeInPalettes:: ld c, $12 call GetTimePalFade ld b, $4 call ConvertTimePalsDecHL ret -; 8c084 -FadeOutPalettes:: ; 8c084 +FadeOutPalettes:: call FillWhiteBGColor ld c, $9 call GetTimePalFade ld b, $4 call ConvertTimePalsIncHL ret -; 8c092 -BattleTowerFade: ; 8c092 +BattleTowerFade: call FillWhiteBGColor ld c, $9 call GetTimePalFade @@ -151,26 +146,23 @@ BattleTowerFade: ; 8c092 dec b jr nz, .asm_8c09c ret -; 8c0ab -FadeInQuickly: ; 8c0ab +FadeInQuickly: ld c, $0 call GetTimePalFade ld b, $4 call ConvertTimePalsIncHL ret -; 8c0b6 -FadeBlackQuickly: ; 8c0b6 +FadeBlackQuickly: ld c, $9 call GetTimePalFade ld b, $4 call ConvertTimePalsDecHL ret -; 8c0c1 -FillWhiteBGColor: ; 8c0c1 +FillWhiteBGColor: ld a, [rSVBK] push af ld a, BANK(wBGPals1) @@ -197,9 +189,8 @@ endr pop af ld [rSVBK], a ret -; 8c0e5 -ReplaceTimeOfDayPals: ; 8c0e5 +ReplaceTimeOfDayPals: ld hl, .BrightnessLevels ld a, [wMapTimeOfDay] cp $4 ; Dark cave, needs Flash @@ -226,9 +217,8 @@ ReplaceTimeOfDayPals: ; 8c0e5 ld a, %10101010 ; 2, 2, 2, 2 ld [wTimeOfDayPalset], a ret -; 8c10f (23:410f) -.BrightnessLevels: ; 8c10f +.BrightnessLevels: dc 3, 2, 1, 0 dc 1, 1, 1, 1 dc 2, 2, 2, 2 @@ -237,9 +227,8 @@ ReplaceTimeOfDayPals: ; 8c0e5 dc 3, 2, 1, 0 dc 3, 2, 1, 0 dc 3, 2, 1, 0 -; 8c117 -GetTimePalette: ; 8c117 +GetTimePalette: ld a, [wTimeOfDay] ld e, a ld d, 0 @@ -250,7 +239,6 @@ GetTimePalette: ; 8c117 ld h, [hl] ld l, a jp hl -; 8c126 .TimePalettes: dw .MorningPalette @@ -282,10 +270,9 @@ GetTimePalette: ; 8c117 rlca rlca ret -; 8c14e -DmgToCgbTimePals: ; 8c14e +DmgToCgbTimePals: push hl push de ld a, [hli] @@ -298,9 +285,8 @@ DmgToCgbTimePals: ; 8c14e pop de pop hl ret -; 8c15e -ConvertTimePalsIncHL: ; 8c15e +ConvertTimePalsIncHL: .loop call DmgToCgbTimePals inc hl @@ -311,9 +297,8 @@ ConvertTimePalsIncHL: ; 8c15e dec b jr nz, .loop ret -; 8c16d -ConvertTimePalsDecHL: ; 8c16d +ConvertTimePalsDecHL: .loop call DmgToCgbTimePals dec hl @@ -324,10 +309,9 @@ ConvertTimePalsDecHL: ; 8c16d dec b jr nz, .loop ret -; 8c17c -GetTimePalFade: ; 8c17c +GetTimePalFade: ; check cgb ld a, [hCGB] and a @@ -412,4 +396,3 @@ GetTimePalFade: ; 8c17c db %10010000, %10010000, %10010000 db %01000000, %01000000, %01000000 db %00000000, %00000000, %00000000 -; 8c20f diff --git a/gfx/battle_anims.asm b/gfx/battle_anims.asm index 52ac4e6b54c..7f8f59189f7 100644 --- a/gfx/battle_anims.asm +++ b/gfx/battle_anims.asm @@ -1,4 +1,4 @@ -AnimObj00GFX: ; 84a2e +AnimObj00GFX: AnimObjHitGFX: INCBIN "gfx/battle_anims/hit.2bpp.lz" AnimObjCutGFX: INCBIN "gfx/battle_anims/cut.2bpp.lz" AnimObjFireGFX: INCBIN "gfx/battle_anims/fire.2bpp.lz" @@ -38,4 +38,3 @@ AnimObjShineGFX: INCBIN "gfx/battle_anims/shine.2bpp.lz" AnimObjAngelsGFX: INCBIN "gfx/battle_anims/angels.2bpp.lz" AnimObjWaveGFX: INCBIN "gfx/battle_anims/wave.2bpp.lz" AnimObjAeroblastGFX: INCBIN "gfx/battle_anims/aeroblast.2bpp.lz" -; 8640e diff --git a/gfx/font.asm b/gfx/font.asm index bf57410747e..2361c2ae611 100644 --- a/gfx/font.asm +++ b/gfx/font.asm @@ -7,7 +7,7 @@ INCBIN "gfx/font/font.1bpp" FontBattleExtra: INCBIN "gfx/font/font_battle_extra.2bpp" -Frames: ; f8800 +Frames: INCBIN "gfx/frames/1.1bpp" INCBIN "gfx/frames/2.1bpp" INCBIN "gfx/frames/3.1bpp" @@ -17,66 +17,50 @@ INCBIN "gfx/frames/6.1bpp" INCBIN "gfx/frames/7.1bpp" INCBIN "gfx/frames/8.1bpp" INCBIN "gfx/frames/9.1bpp" -; f89b0 ; Various misc graphics here. -StatsScreenPageTilesGFX: ; f89b0 +StatsScreenPageTilesGFX: INCBIN "gfx/stats/stats_tiles.2bpp" -; f8ac0 -EnemyHPBarBorderGFX: ; f8ac0 +EnemyHPBarBorderGFX: INCBIN "gfx/battle/enemy_hp_bar_border.1bpp" -; f8ae0 -HPExpBarBorderGFX: ; f8ae0 +HPExpBarBorderGFX: INCBIN "gfx/battle/hp_exp_bar_border.1bpp" -; f8b10 -ExpBarGFX: ; f8b10 +ExpBarGFX: INCBIN "gfx/battle/expbar.2bpp" -; f8ba0 -TownMapGFX: ; f8ba0 +TownMapGFX: INCBIN "gfx/pokegear/town_map.2bpp.lz" -; f8ea4 UnusedWeekdayKanjiGFX: ; unused kanji INCBIN "gfx/font/unused_weekday_kanji.2bpp" -; f8f24 -PokegearPhoneIconGFX: ; f8f24 +PokegearPhoneIconGFX: INCBIN "gfx/font/phone_icon.2bpp" -; f8f34 UnusedBoldFontGFX: ; unused bold letters + unown chars INCBIN "gfx/font/unused_bold_font.1bpp" -; f9204 -TextBoxSpaceGFX: ; f9204 +TextBoxSpaceGFX: INCBIN "gfx/frames/space.1bpp" -; f9214 -FontsExtra_SolidBlackGFX: ; f9214 +FontsExtra_SolidBlackGFX: INCBIN "gfx/font/black.1bpp" -; f921c UnusedUpArrowGFX: ; unused up arrow + whitespace INCBIN "gfx/font/unused_up_arrow.1bpp" -; f9234 -MobilePhoneTilesGFX: ; f9234 +MobilePhoneTilesGFX: INCBIN "gfx/mobile/phone_tiles.2bpp" -; f9344 -MapEntryFrameGFX: ; f9344 +MapEntryFrameGFX: INCBIN "gfx/frames/map_entry_sign.2bpp" -; f9424 -FontsExtra2_UpArrowGFX: ; f9424 +FontsExtra2_UpArrowGFX: INCBIN "gfx/font/up_arrow.2bpp" -; f9434 -Footprints: ; f9434 +Footprints: INCLUDE "gfx/footprints.asm" -; fb434 diff --git a/gfx/mail.asm b/gfx/mail.asm index 83ca99f6023..f8b3f28918f 100644 --- a/gfx/mail.asm +++ b/gfx/mail.asm @@ -1,111 +1,111 @@ -MorphMailDividerGFX: ; b9926 +MorphMailDividerGFX: INCBIN "gfx/mail/morph_mail_divider.1bpp" -BlueSkyMailGrassGFX: ; b992e +BlueSkyMailGrassGFX: INCBIN "gfx/mail/grass.1bpp" -PortraitMailSmallPokeballGFX: ; b9936 +PortraitMailSmallPokeballGFX: INCBIN "gfx/mail/small_pokeball.1bpp" -MorphMailBorderGFX: ; b993e +MorphMailBorderGFX: INCBIN "gfx/mail/morph_mail_border.1bpp" -MusicMailSmallNoteGFX: ; b9946 +MusicMailSmallNoteGFX: INCBIN "gfx/mail/small_note.1bpp" -SurfMailWaveGFX: ; b994e +SurfMailWaveGFX: INCBIN "gfx/mail/wave.1bpp" -PortraitMailUnderlineGFX: ; b995e +PortraitMailUnderlineGFX: INCBIN "gfx/mail/portraitmail_underline.1bpp" -LovelyMailUnderlineGFX: ; b9966 +LovelyMailUnderlineGFX: INCBIN "gfx/mail/lovely_mail_underline.1bpp" -LovelyMailSmallHeartGFX: ; b996e +LovelyMailSmallHeartGFX: INCBIN "gfx/mail/small_heart.1bpp" -SurfLiteBlueMailSmallShapesGFX: ; b9976 +SurfLiteBlueMailSmallShapesGFX: INCBIN "gfx/mail/small_triangle.1bpp" -EonMailBorder1GFX: ; b997e +EonMailBorder1GFX: INCBIN "gfx/mail/eon_mail_border_1.1bpp" -EonMailBorder2GFX: ; b998e +EonMailBorder2GFX: INCBIN "gfx/mail/eon_mail_border_2.1bpp" -MailNatuGFX: ; b9996 +MailNatuGFX: INCBIN "gfx/mail/natu.1bpp" -MailDratiniGFX: ; b99c6 +MailDratiniGFX: INCBIN "gfx/mail/dratini.1bpp" -MailPoliwagGFX: ; b99f6 +MailPoliwagGFX: INCBIN "gfx/mail/poliwag.1bpp" -MailLaprasGFX: ; b9a26 +MailLaprasGFX: INCBIN "gfx/mail/lapras.1bpp" -MailEeveeGFX: ; b9a56 +MailEeveeGFX: INCBIN "gfx/mail/eevee.1bpp" -MailDittoGFX: ; b9a86 +MailDittoGFX: INCBIN "gfx/mail/ditto.1bpp" -MailMewGFX: ; b9ab6 +MailMewGFX: INCBIN "gfx/mail/mew.1bpp" -MailDragoniteGFX: ; b9b46 +MailDragoniteGFX: INCBIN "gfx/mail/dragonite.1bpp" -MailSentretGFX: ; b9bce +MailSentretGFX: INCBIN "gfx/mail/sentret.1bpp" -MailUnusedGrassGFX: ; b9bee +MailUnusedGrassGFX: INCBIN "gfx/mail/unused_grass.1bpp" -PortraitMailLargePokeballGFX: ; b9bfe +PortraitMailLargePokeballGFX: INCBIN "gfx/mail/large_pokeball.1bpp" -MailOddishGFX: ; b9c1e +MailOddishGFX: INCBIN "gfx/mail/oddish.1bpp" -SurfLiteBlueMailLargeShapesGFX: ; b9c3e +SurfLiteBlueMailLargeShapesGFX: INCBIN "gfx/mail/large_triangle.1bpp" -LovelyMailLargeHeartGFX: ; b9c5e +LovelyMailLargeHeartGFX: INCBIN "gfx/mail/large_heart.1bpp" -MorphMailBorderCornerGFX: ; b9c7e +MorphMailBorderCornerGFX: INCBIN "gfx/mail/morph_mail_corner.1bpp" -MailLargeCircleGFX: ; b9c9e +MailLargeCircleGFX: INCBIN "gfx/mail/large_circle.1bpp" -FlowerMailFlowerGFX: ; b9cbe +FlowerMailFlowerGFX: INCBIN "gfx/mail/flower_1.1bpp" INCBIN "gfx/mail/flower_2.1bpp" -MusicMailLargeNoteGFX: ; b9cfe +MusicMailLargeNoteGFX: INCBIN "gfx/mail/large_note.1bpp" -MailCloudGFX: ; b9d16 +MailCloudGFX: INCBIN "gfx/mail/cloud.1bpp" -SurfMailBorderGFX: ; b9d46 +SurfMailBorderGFX: INCBIN "gfx/mail/surf_mail_border.1bpp" -FlowerMailBorderGFX: ; b9d86 +FlowerMailBorderGFX: INCBIN "gfx/mail/flower_mail_border.1bpp" -LiteBlueMailBorderGFX: ; b9dc6 +LiteBlueMailBorderGFX: INCBIN "gfx/mail/litebluemail_border.1bpp" -MusicMailBorderGFX: ; b9e06 +MusicMailBorderGFX: INCBIN "gfx/mail/music_mail_border.1bpp" -LovelyMailBorderGFX: ; b9e26 +LovelyMailBorderGFX: INCBIN "gfx/mail/lovely_mail_border.1bpp" -PortraitMailBorderGFX: ; b9e4e +PortraitMailBorderGFX: INCBIN "gfx/mail/portraitmail_border.1bpp" diff --git a/gfx/pics.asm b/gfx/pics.asm index 043e4148988..5c5b85a2667 100644 --- a/gfx/pics.asm +++ b/gfx/pics.asm @@ -34,7 +34,6 @@ VenusaurFrontpic: INCBIN "gfx/pokemon/venusaur/front.animated.2bpp.lz" EnteiFrontpic: INCBIN "gfx/pokemon/entei/front.animated.2bpp.lz" SuicuneFrontpic: INCBIN "gfx/pokemon/suicune/front.animated.2bpp.lz" TyphlosionFrontpic: INCBIN "gfx/pokemon/typhlosion/front.animated.2bpp.lz" -; 123ffa SECTION "Pics 2", ROMX @@ -55,7 +54,6 @@ MewtwoFrontpic: INCBIN "gfx/pokemon/mewtwo/front.animated.2bpp.lz" FearowFrontpic: INCBIN "gfx/pokemon/fearow/front.animated.2bpp.lz" CharizardFrontpic: INCBIN "gfx/pokemon/charizard/front.animated.2bpp.lz" QuilavaFrontpic: INCBIN "gfx/pokemon/quilava/front.animated.2bpp.lz" -; 127ffe SECTION "Pics 3", ROMX @@ -78,7 +76,6 @@ VictreebelFrontpic: INCBIN "gfx/pokemon/victreebel/front.animated.2bpp.lz" RaichuFrontpic: INCBIN "gfx/pokemon/raichu/front.animated.2bpp.lz" PrimeapeFrontpic: INCBIN "gfx/pokemon/primeape/front.animated.2bpp.lz" OmastarBackpic: INCBIN "gfx/pokemon/omastar/back.2bpp.lz" -; 12bffe SECTION "Pics 4", ROMX @@ -103,7 +100,6 @@ JolteonFrontpic: INCBIN "gfx/pokemon/jolteon/front.animated.2bpp.lz" DonphanFrontpic: INCBIN "gfx/pokemon/donphan/front.animated.2bpp.lz" PinsirFrontpic: INCBIN "gfx/pokemon/pinsir/front.animated.2bpp.lz" UnownEFrontpic: INCBIN "gfx/pokemon/unown_e/front.animated.2bpp.lz" -; 130000 SECTION "Pics 5", ROMX @@ -129,7 +125,6 @@ AzumarillFrontpic: INCBIN "gfx/pokemon/azumarill/front.animated.2bpp.lz" ParasectFrontpic: INCBIN "gfx/pokemon/parasect/front.animated.2bpp.lz" MrMimeFrontpic: INCBIN "gfx/pokemon/mr__mime/front.animated.2bpp.lz" HeracrossFrontpic: INCBIN "gfx/pokemon/heracross/front.animated.2bpp.lz" -; 133fff SECTION "Pics 6", ROMX @@ -157,7 +152,6 @@ MarowakFrontpic: INCBIN "gfx/pokemon/marowak/front.animated.2bpp.lz" VulpixFrontpic: INCBIN "gfx/pokemon/vulpix/front.animated.2bpp.lz" GligarFrontpic: INCBIN "gfx/pokemon/gligar/front.animated.2bpp.lz" DunsparceFrontpic: INCBIN "gfx/pokemon/dunsparce/front.animated.2bpp.lz" -; 137fff SECTION "Pics 7", ROMX @@ -187,7 +181,6 @@ DragonairFrontpic: INCBIN "gfx/pokemon/dragonair/front.animated.2bpp.lz" ForretressFrontpic: INCBIN "gfx/pokemon/forretress/front.animated.2bpp.lz" TogeticFrontpic: INCBIN "gfx/pokemon/togetic/front.animated.2bpp.lz" KangaskhanBackpic: INCBIN "gfx/pokemon/kangaskhan/back.2bpp.lz" -; 13c000 SECTION "Pics 8", ROMX @@ -219,7 +212,6 @@ FurretFrontpic: INCBIN "gfx/pokemon/furret/front.animated.2bpp.lz" CyndaquilFrontpic: INCBIN "gfx/pokemon/cyndaquil/front.animated.2bpp.lz" HitmonchanFrontpic: INCBIN "gfx/pokemon/hitmonchan/front.animated.2bpp.lz" QuagsireFrontpic: INCBIN "gfx/pokemon/quagsire/front.animated.2bpp.lz" -; 13fff7 SECTION "Pics 9", ROMX @@ -255,7 +247,6 @@ SandshrewFrontpic: INCBIN "gfx/pokemon/sandshrew/front.animated.2bpp.lz" NidoranFFrontpic: INCBIN "gfx/pokemon/nidoran_f/front.animated.2bpp.lz" PidgeyFrontpic: INCBIN "gfx/pokemon/pidgey/front.animated.2bpp.lz" ParasectBackpic: INCBIN "gfx/pokemon/parasect/back.2bpp.lz" -; 144000 SECTION "Pics 10", ROMX @@ -295,7 +286,6 @@ HitmontopBackpic: INCBIN "gfx/pokemon/hitmontop/back.2bpp.lz" CloysterBackpic: INCBIN "gfx/pokemon/cloyster/back.2bpp.lz" HoothootFrontpic: INCBIN "gfx/pokemon/hoothoot/front.animated.2bpp.lz" UnownFBackpic: INCBIN "gfx/pokemon/unown_f/back.2bpp.lz" -; 148000 SECTION "Pics 11", ROMX @@ -338,7 +328,6 @@ CelebiBackpic: INCBIN "gfx/pokemon/celebi/back.2bpp.lz" KrabbyBackpic: INCBIN "gfx/pokemon/krabby/back.2bpp.lz" BugCatcherPic: INCBIN "gfx/trainers/bug_catcher.2bpp.lz" SnorlaxBackpic: INCBIN "gfx/pokemon/snorlax/back.2bpp.lz" -; 14bffb SECTION "Pics 12", ROMX @@ -384,7 +373,6 @@ FlareonBackpic: INCBIN "gfx/pokemon/flareon/back.2bpp.lz" GoldeenBackpic: INCBIN "gfx/pokemon/goldeen/back.2bpp.lz" BulbasaurFrontpic: INCBIN "gfx/pokemon/bulbasaur/front.animated.2bpp.lz" StarmieBackpic: INCBIN "gfx/pokemon/starmie/back.2bpp.lz" -; 150000 SECTION "Pics 13", ROMX @@ -432,7 +420,6 @@ NidorinoBackpic: INCBIN "gfx/pokemon/nidorino/back.2bpp.lz" MysticalmanPic: INCBIN "gfx/trainers/mysticalman.2bpp.lz" CooltrainerfPic: INCBIN "gfx/trainers/cooltrainer_f.2bpp.lz" ElectrodeFrontpic: INCBIN "gfx/pokemon/electrode/front.animated.2bpp.lz" -; 153fe3 SECTION "Pics 14", ROMX @@ -483,7 +470,6 @@ VenonatBackpic: INCBIN "gfx/pokemon/venonat/back.2bpp.lz" BellossomBackpic: INCBIN "gfx/pokemon/bellossom/back.2bpp.lz" Rival1Pic: INCBIN "gfx/trainers/rival1.2bpp.lz" SwinubBackpic: INCBIN "gfx/pokemon/swinub/back.2bpp.lz" -; 158000 SECTION "Pics 15", ROMX @@ -537,7 +523,6 @@ MagnemiteFrontpic: INCBIN "gfx/pokemon/magnemite/front.animated.2bpp.lz" ErikaPic: INCBIN "gfx/trainers/erika.2bpp.lz" JaninePic: INCBIN "gfx/trainers/janine.2bpp.lz" MagnemiteBackpic: INCBIN "gfx/pokemon/magnemite/back.2bpp.lz" -; 15bffa SECTION "Pics 16", ROMX @@ -595,7 +580,6 @@ SwinubFrontpic: INCBIN "gfx/pokemon/swinub/front.animated.2bpp.lz" LarvitarBackpic: INCBIN "gfx/pokemon/larvitar/back.2bpp.lz" PorygonBackpic: INCBIN "gfx/pokemon/porygon/back.2bpp.lz" UnownHBackpic: INCBIN "gfx/pokemon/unown_h/back.2bpp.lz" -; 15ffff SECTION "Pics 17", ROMX @@ -661,7 +645,6 @@ MetapodBackpic: INCBIN "gfx/pokemon/metapod/back.2bpp.lz" JigglypuffBackpic: INCBIN "gfx/pokemon/jigglypuff/back.2bpp.lz" OddishBackpic: INCBIN "gfx/pokemon/oddish/back.2bpp.lz" UnownDBackpic: INCBIN "gfx/pokemon/unown_d/back.2bpp.lz" -; 163ffc SECTION "Pics 18", ROMX @@ -726,7 +709,6 @@ UnownYBackpic: INCBIN "gfx/pokemon/unown_y/back.2bpp.lz" UnownPBackpic: INCBIN "gfx/pokemon/unown_p/back.2bpp.lz" UnownIBackpic: INCBIN "gfx/pokemon/unown_i/back.2bpp.lz" UnownRBackpic: INCBIN "gfx/pokemon/unown_r/back.2bpp.lz" -; 1669d3 SECTION "Pics 19", ROMX diff --git a/gfx/sprites.asm b/gfx/sprites.asm index 318f7506e6b..f84ae77d68d 100644 --- a/gfx/sprites.asm +++ b/gfx/sprites.asm @@ -1,108 +1,108 @@ SECTION "Sprites 1", ROMX -ChrisSpriteGFX:: INCBIN "gfx/sprites/chris.2bpp" ; c0000 -ChrisBikeSpriteGFX:: INCBIN "gfx/sprites/chris_bike.2bpp" ; c0180 -GameboyKidSpriteGFX:: INCBIN "gfx/sprites/gameboy_kid.2bpp" ; c0300 -SilverSpriteGFX:: INCBIN "gfx/sprites/silver.2bpp" ; c03c0 -OakSpriteGFX:: INCBIN "gfx/sprites/oak.2bpp" ; c0540 -RedSpriteGFX:: INCBIN "gfx/sprites/red.2bpp" ; c06c0 -BlueSpriteGFX:: INCBIN "gfx/sprites/blue.2bpp" ; c0840 -BillSpriteGFX:: INCBIN "gfx/sprites/bill.2bpp" ; c09c0 -ElderSpriteGFX:: INCBIN "gfx/sprites/elder.2bpp" ; c0b40 -JanineSpriteGFX:: INCBIN "gfx/sprites/janine.2bpp" ; c0cc0 -KurtSpriteGFX:: INCBIN "gfx/sprites/kurt.2bpp" ; c0e40 -MomSpriteGFX:: INCBIN "gfx/sprites/mom.2bpp" ; c0fc0 -BlaineSpriteGFX:: INCBIN "gfx/sprites/blaine.2bpp" ; c1140 -RedsMomSpriteGFX:: INCBIN "gfx/sprites/reds_mom.2bpp" ; c12c0 -DaisySpriteGFX:: INCBIN "gfx/sprites/daisy.2bpp" ; c1440 -ElmSpriteGFX:: INCBIN "gfx/sprites/elm.2bpp" ; c15c0 -WillSpriteGFX:: INCBIN "gfx/sprites/will.2bpp" ; c1740 -FalknerSpriteGFX:: INCBIN "gfx/sprites/falkner.2bpp" ; c1800 -WhitneySpriteGFX:: INCBIN "gfx/sprites/whitney.2bpp" ; c1980 -BugsySpriteGFX:: INCBIN "gfx/sprites/bugsy.2bpp" ; c1b00 -MortySpriteGFX:: INCBIN "gfx/sprites/morty.2bpp" ; c1c80 -ChuckSpriteGFX:: INCBIN "gfx/sprites/chuck.2bpp" ; c1e00 -JasmineSpriteGFX:: INCBIN "gfx/sprites/jasmine.2bpp" ; c1f80 -PryceSpriteGFX:: INCBIN "gfx/sprites/pryce.2bpp" ; c2100 -ClairSpriteGFX:: INCBIN "gfx/sprites/clair.2bpp" ; c2280 -BrockSpriteGFX:: INCBIN "gfx/sprites/brock.2bpp" ; c2400 -KarenSpriteGFX:: INCBIN "gfx/sprites/karen.2bpp" ; c2580 -BrunoSpriteGFX:: INCBIN "gfx/sprites/bruno.2bpp" ; c2640 -MistySpriteGFX:: INCBIN "gfx/sprites/misty.2bpp" ; c27c0 -LanceSpriteGFX:: INCBIN "gfx/sprites/lance.2bpp" ; c2940 -SurgeSpriteGFX:: INCBIN "gfx/sprites/surge.2bpp" ; c2ac0 -ErikaSpriteGFX:: INCBIN "gfx/sprites/erika.2bpp" ; c2c40 -KogaSpriteGFX:: INCBIN "gfx/sprites/koga.2bpp" ; c2dc0 -SabrinaSpriteGFX:: INCBIN "gfx/sprites/sabrina.2bpp" ; c2f40 -CooltrainerMSpriteGFX:: INCBIN "gfx/sprites/cooltrainer_m.2bpp" ; c30c0 -CooltrainerFSpriteGFX:: INCBIN "gfx/sprites/cooltrainer_f.2bpp" ; c3240 -BugCatcherSpriteGFX:: INCBIN "gfx/sprites/bug_catcher.2bpp" ; c33c0 -TwinSpriteGFX:: INCBIN "gfx/sprites/twin.2bpp" ; c3540 -YoungsterSpriteGFX:: INCBIN "gfx/sprites/youngster.2bpp" ; c36c0 -LassSpriteGFX:: INCBIN "gfx/sprites/lass.2bpp" ; c3840 -TeacherSpriteGFX:: INCBIN "gfx/sprites/teacher.2bpp" ; c39c0 -BuenaSpriteGFX:: INCBIN "gfx/sprites/buena.2bpp" ; c3b40 -SuperNerdSpriteGFX:: INCBIN "gfx/sprites/super_nerd.2bpp" ; c3cc0 -RockerSpriteGFX:: INCBIN "gfx/sprites/rocker.2bpp" ; c3e40 +ChrisSpriteGFX:: INCBIN "gfx/sprites/chris.2bpp" +ChrisBikeSpriteGFX:: INCBIN "gfx/sprites/chris_bike.2bpp" +GameboyKidSpriteGFX:: INCBIN "gfx/sprites/gameboy_kid.2bpp" +SilverSpriteGFX:: INCBIN "gfx/sprites/silver.2bpp" +OakSpriteGFX:: INCBIN "gfx/sprites/oak.2bpp" +RedSpriteGFX:: INCBIN "gfx/sprites/red.2bpp" +BlueSpriteGFX:: INCBIN "gfx/sprites/blue.2bpp" +BillSpriteGFX:: INCBIN "gfx/sprites/bill.2bpp" +ElderSpriteGFX:: INCBIN "gfx/sprites/elder.2bpp" +JanineSpriteGFX:: INCBIN "gfx/sprites/janine.2bpp" +KurtSpriteGFX:: INCBIN "gfx/sprites/kurt.2bpp" +MomSpriteGFX:: INCBIN "gfx/sprites/mom.2bpp" +BlaineSpriteGFX:: INCBIN "gfx/sprites/blaine.2bpp" +RedsMomSpriteGFX:: INCBIN "gfx/sprites/reds_mom.2bpp" +DaisySpriteGFX:: INCBIN "gfx/sprites/daisy.2bpp" +ElmSpriteGFX:: INCBIN "gfx/sprites/elm.2bpp" +WillSpriteGFX:: INCBIN "gfx/sprites/will.2bpp" +FalknerSpriteGFX:: INCBIN "gfx/sprites/falkner.2bpp" +WhitneySpriteGFX:: INCBIN "gfx/sprites/whitney.2bpp" +BugsySpriteGFX:: INCBIN "gfx/sprites/bugsy.2bpp" +MortySpriteGFX:: INCBIN "gfx/sprites/morty.2bpp" +ChuckSpriteGFX:: INCBIN "gfx/sprites/chuck.2bpp" +JasmineSpriteGFX:: INCBIN "gfx/sprites/jasmine.2bpp" +PryceSpriteGFX:: INCBIN "gfx/sprites/pryce.2bpp" +ClairSpriteGFX:: INCBIN "gfx/sprites/clair.2bpp" +BrockSpriteGFX:: INCBIN "gfx/sprites/brock.2bpp" +KarenSpriteGFX:: INCBIN "gfx/sprites/karen.2bpp" +BrunoSpriteGFX:: INCBIN "gfx/sprites/bruno.2bpp" +MistySpriteGFX:: INCBIN "gfx/sprites/misty.2bpp" +LanceSpriteGFX:: INCBIN "gfx/sprites/lance.2bpp" +SurgeSpriteGFX:: INCBIN "gfx/sprites/surge.2bpp" +ErikaSpriteGFX:: INCBIN "gfx/sprites/erika.2bpp" +KogaSpriteGFX:: INCBIN "gfx/sprites/koga.2bpp" +SabrinaSpriteGFX:: INCBIN "gfx/sprites/sabrina.2bpp" +CooltrainerMSpriteGFX:: INCBIN "gfx/sprites/cooltrainer_m.2bpp" +CooltrainerFSpriteGFX:: INCBIN "gfx/sprites/cooltrainer_f.2bpp" +BugCatcherSpriteGFX:: INCBIN "gfx/sprites/bug_catcher.2bpp" +TwinSpriteGFX:: INCBIN "gfx/sprites/twin.2bpp" +YoungsterSpriteGFX:: INCBIN "gfx/sprites/youngster.2bpp" +LassSpriteGFX:: INCBIN "gfx/sprites/lass.2bpp" +TeacherSpriteGFX:: INCBIN "gfx/sprites/teacher.2bpp" +BuenaSpriteGFX:: INCBIN "gfx/sprites/buena.2bpp" +SuperNerdSpriteGFX:: INCBIN "gfx/sprites/super_nerd.2bpp" +RockerSpriteGFX:: INCBIN "gfx/sprites/rocker.2bpp" SECTION "Sprites 2", ROMX -PokefanMSpriteGFX:: INCBIN "gfx/sprites/pokefan_m.2bpp" ; c4000 -PokefanFSpriteGFX:: INCBIN "gfx/sprites/pokefan_f.2bpp" ; c4180 -GrampsSpriteGFX:: INCBIN "gfx/sprites/gramps.2bpp" ; c4300 -GrannySpriteGFX:: INCBIN "gfx/sprites/granny.2bpp" ; c4480 -SwimmerGuySpriteGFX:: INCBIN "gfx/sprites/swimmer_guy.2bpp" ; c4600 -SwimmerGirlSpriteGFX:: INCBIN "gfx/sprites/swimmer_girl.2bpp" ; c4780 -BigSnorlaxSpriteGFX:: INCBIN "gfx/sprites/big_snorlax.2bpp" ; c4900 -SurfingPikachuSpriteGFX:: INCBIN "gfx/sprites/surfing_pikachu.2bpp" ; c4980 -RocketSpriteGFX:: INCBIN "gfx/sprites/rocket.2bpp" ; c4b00 -RocketGirlSpriteGFX:: INCBIN "gfx/sprites/rocket_girl.2bpp" ; c4c80 -NurseSpriteGFX:: INCBIN "gfx/sprites/nurse.2bpp" ; c4e00 -LinkReceptionistSpriteGFX:: INCBIN "gfx/sprites/link_receptionist.2bpp" ; c4ec0 -ClerkSpriteGFX:: INCBIN "gfx/sprites/clerk.2bpp" ; c5040 -FisherSpriteGFX:: INCBIN "gfx/sprites/fisher.2bpp" ; c51c0 -FishingGuruSpriteGFX:: INCBIN "gfx/sprites/fishing_guru.2bpp" ; c5340 -ScientistSpriteGFX:: INCBIN "gfx/sprites/scientist.2bpp" ; c54c0 -KimonoGirlSpriteGFX:: INCBIN "gfx/sprites/kimono_girl.2bpp" ; c5640 -SageSpriteGFX:: INCBIN "gfx/sprites/sage.2bpp" ; c57c0 -UnusedGuySpriteGFX:: INCBIN "gfx/sprites/unused_guy.2bpp" ; c5940 -GentlemanSpriteGFX:: INCBIN "gfx/sprites/gentleman.2bpp" ; c5ac0 -BlackBeltSpriteGFX:: INCBIN "gfx/sprites/black_belt.2bpp" ; c5c40 -ReceptionistSpriteGFX:: INCBIN "gfx/sprites/receptionist.2bpp" ; c5dc0 -OfficerSpriteGFX:: INCBIN "gfx/sprites/officer.2bpp" ; c5f40 -CalSpriteGFX:: INCBIN "gfx/sprites/cal.2bpp" ; c60c0 -SlowpokeSpriteGFX:: INCBIN "gfx/sprites/slowpoke.2bpp" ; c6240 -CaptainSpriteGFX:: INCBIN "gfx/sprites/captain.2bpp" ; c6280 -BigLaprasSpriteGFX:: INCBIN "gfx/sprites/big_lapras.2bpp" ; c6400 -GymGuySpriteGFX:: INCBIN "gfx/sprites/gym_guy.2bpp" ; c6480 -SailorSpriteGFX:: INCBIN "gfx/sprites/sailor.2bpp" ; c6600 -BikerSpriteGFX:: INCBIN "gfx/sprites/biker.2bpp" ; c6780 -PharmacistSpriteGFX:: INCBIN "gfx/sprites/pharmacist.2bpp" ; c6900 -MonsterSpriteGFX:: INCBIN "gfx/sprites/monster.2bpp" ; c6a80 -FairySpriteGFX:: INCBIN "gfx/sprites/fairy.2bpp" ; c6c00 -BirdSpriteGFX:: INCBIN "gfx/sprites/bird.2bpp" ; c6d80 -DragonSpriteGFX:: INCBIN "gfx/sprites/dragon.2bpp" ; c6f00 -BigOnixSpriteGFX:: INCBIN "gfx/sprites/big_onix.2bpp" ; c7080 -N64SpriteGFX:: INCBIN "gfx/sprites/n64.2bpp" ; c7140 -SudowoodoSpriteGFX:: INCBIN "gfx/sprites/sudowoodo.2bpp" ; c7180 -SurfSpriteGFX:: INCBIN "gfx/sprites/surf.2bpp" ; c7200 -PokeBallSpriteGFX:: INCBIN "gfx/sprites/poke_ball.2bpp" ; c7380 -PokedexSpriteGFX:: INCBIN "gfx/sprites/pokedex.2bpp" ; c7500 -PaperSpriteGFX:: INCBIN "gfx/sprites/paper.2bpp" ; c7680 -VirtualBoySpriteGFX:: INCBIN "gfx/sprites/virtual_boy.2bpp" ; c7800 -OldLinkReceptionistSpriteGFX:: INCBIN "gfx/sprites/old_link_receptionist.2bpp" ; c7840 -RockSpriteGFX:: INCBIN "gfx/sprites/rock.2bpp" ; c7880 -BoulderSpriteGFX:: INCBIN "gfx/sprites/boulder.2bpp" ; c78c0 -SnesSpriteGFX:: INCBIN "gfx/sprites/snes.2bpp" ; c7900 -FamicomSpriteGFX:: INCBIN "gfx/sprites/famicom.2bpp" ; c7940 -FruitTreeSpriteGFX:: INCBIN "gfx/sprites/fruit_tree.2bpp" ; c7980 -GoldTrophySpriteGFX:: INCBIN "gfx/sprites/gold_trophy.2bpp" ; c79c0 -SilverTrophySpriteGFX:: INCBIN "gfx/sprites/silver_trophy.2bpp" ; c7a00 -KrisSpriteGFX:: INCBIN "gfx/sprites/kris.2bpp" ; c7a40 -KrisBikeSpriteGFX:: INCBIN "gfx/sprites/kris_bike.2bpp" ; c7bc0 -KurtOutsideSpriteGFX:: INCBIN "gfx/sprites/kurt_outside.2bpp" ; c7d40 -SuicuneSpriteGFX:: INCBIN "gfx/sprites/suicune.2bpp" ; c7e00 -EnteiSpriteGFX:: INCBIN "gfx/sprites/entei.2bpp" ; c7e40 -RaikouSpriteGFX:: INCBIN "gfx/sprites/raikou.2bpp" ; c7e80 -StandingYoungsterSpriteGFX:: INCBIN "gfx/sprites/standing_youngster.2bpp" ; c7ec0 +PokefanMSpriteGFX:: INCBIN "gfx/sprites/pokefan_m.2bpp" +PokefanFSpriteGFX:: INCBIN "gfx/sprites/pokefan_f.2bpp" +GrampsSpriteGFX:: INCBIN "gfx/sprites/gramps.2bpp" +GrannySpriteGFX:: INCBIN "gfx/sprites/granny.2bpp" +SwimmerGuySpriteGFX:: INCBIN "gfx/sprites/swimmer_guy.2bpp" +SwimmerGirlSpriteGFX:: INCBIN "gfx/sprites/swimmer_girl.2bpp" +BigSnorlaxSpriteGFX:: INCBIN "gfx/sprites/big_snorlax.2bpp" +SurfingPikachuSpriteGFX:: INCBIN "gfx/sprites/surfing_pikachu.2bpp" +RocketSpriteGFX:: INCBIN "gfx/sprites/rocket.2bpp" +RocketGirlSpriteGFX:: INCBIN "gfx/sprites/rocket_girl.2bpp" +NurseSpriteGFX:: INCBIN "gfx/sprites/nurse.2bpp" +LinkReceptionistSpriteGFX:: INCBIN "gfx/sprites/link_receptionist.2bpp" +ClerkSpriteGFX:: INCBIN "gfx/sprites/clerk.2bpp" +FisherSpriteGFX:: INCBIN "gfx/sprites/fisher.2bpp" +FishingGuruSpriteGFX:: INCBIN "gfx/sprites/fishing_guru.2bpp" +ScientistSpriteGFX:: INCBIN "gfx/sprites/scientist.2bpp" +KimonoGirlSpriteGFX:: INCBIN "gfx/sprites/kimono_girl.2bpp" +SageSpriteGFX:: INCBIN "gfx/sprites/sage.2bpp" +UnusedGuySpriteGFX:: INCBIN "gfx/sprites/unused_guy.2bpp" +GentlemanSpriteGFX:: INCBIN "gfx/sprites/gentleman.2bpp" +BlackBeltSpriteGFX:: INCBIN "gfx/sprites/black_belt.2bpp" +ReceptionistSpriteGFX:: INCBIN "gfx/sprites/receptionist.2bpp" +OfficerSpriteGFX:: INCBIN "gfx/sprites/officer.2bpp" +CalSpriteGFX:: INCBIN "gfx/sprites/cal.2bpp" +SlowpokeSpriteGFX:: INCBIN "gfx/sprites/slowpoke.2bpp" +CaptainSpriteGFX:: INCBIN "gfx/sprites/captain.2bpp" +BigLaprasSpriteGFX:: INCBIN "gfx/sprites/big_lapras.2bpp" +GymGuySpriteGFX:: INCBIN "gfx/sprites/gym_guy.2bpp" +SailorSpriteGFX:: INCBIN "gfx/sprites/sailor.2bpp" +BikerSpriteGFX:: INCBIN "gfx/sprites/biker.2bpp" +PharmacistSpriteGFX:: INCBIN "gfx/sprites/pharmacist.2bpp" +MonsterSpriteGFX:: INCBIN "gfx/sprites/monster.2bpp" +FairySpriteGFX:: INCBIN "gfx/sprites/fairy.2bpp" +BirdSpriteGFX:: INCBIN "gfx/sprites/bird.2bpp" +DragonSpriteGFX:: INCBIN "gfx/sprites/dragon.2bpp" +BigOnixSpriteGFX:: INCBIN "gfx/sprites/big_onix.2bpp" +N64SpriteGFX:: INCBIN "gfx/sprites/n64.2bpp" +SudowoodoSpriteGFX:: INCBIN "gfx/sprites/sudowoodo.2bpp" +SurfSpriteGFX:: INCBIN "gfx/sprites/surf.2bpp" +PokeBallSpriteGFX:: INCBIN "gfx/sprites/poke_ball.2bpp" +PokedexSpriteGFX:: INCBIN "gfx/sprites/pokedex.2bpp" +PaperSpriteGFX:: INCBIN "gfx/sprites/paper.2bpp" +VirtualBoySpriteGFX:: INCBIN "gfx/sprites/virtual_boy.2bpp" +OldLinkReceptionistSpriteGFX:: INCBIN "gfx/sprites/old_link_receptionist.2bpp" +RockSpriteGFX:: INCBIN "gfx/sprites/rock.2bpp" +BoulderSpriteGFX:: INCBIN "gfx/sprites/boulder.2bpp" +SnesSpriteGFX:: INCBIN "gfx/sprites/snes.2bpp" +FamicomSpriteGFX:: INCBIN "gfx/sprites/famicom.2bpp" +FruitTreeSpriteGFX:: INCBIN "gfx/sprites/fruit_tree.2bpp" +GoldTrophySpriteGFX:: INCBIN "gfx/sprites/gold_trophy.2bpp" +SilverTrophySpriteGFX:: INCBIN "gfx/sprites/silver_trophy.2bpp" +KrisSpriteGFX:: INCBIN "gfx/sprites/kris.2bpp" +KrisBikeSpriteGFX:: INCBIN "gfx/sprites/kris_bike.2bpp" +KurtOutsideSpriteGFX:: INCBIN "gfx/sprites/kurt_outside.2bpp" +SuicuneSpriteGFX:: INCBIN "gfx/sprites/suicune.2bpp" +EnteiSpriteGFX:: INCBIN "gfx/sprites/entei.2bpp" +RaikouSpriteGFX:: INCBIN "gfx/sprites/raikou.2bpp" +StandingYoungsterSpriteGFX:: INCBIN "gfx/sprites/standing_youngster.2bpp" diff --git a/gfx/tileset_palette_maps.asm b/gfx/tileset_palette_maps.asm index b3b2f5b98c5..29eefc4e247 100644 --- a/gfx/tileset_palette_maps.asm +++ b/gfx/tileset_palette_maps.asm @@ -119,7 +119,6 @@ INCLUDE "gfx/tilesets/players_room_palette_map.asm" UnusedMuseumPalMap: ; 0x4cb65 INCLUDE "gfx/tilesets/unused_museum_palette_map.asm" -; 4cbd5 TilesetIcePathPalMap: ; 0x4cbd5 INCLUDE "gfx/tilesets/ice_path_palette_map.asm" diff --git a/home.asm b/home.asm index 9aaa5009815..67753ed21d7 100644 --- a/home.asm +++ b/home.asm @@ -43,7 +43,7 @@ INCLUDE "home/handshake.asm" INCLUDE "home/game_time.asm" INCLUDE "home/map.asm" -InexplicablyEmptyFunction:: ; 2d43 +InexplicablyEmptyFunction:: ; unused ; Inexplicably empty. ; Seen in PredefPointers. @@ -51,14 +51,13 @@ rept 16 nop endr ret -; 2d54 INCLUDE "home/farcall.asm" INCLUDE "home/predef.asm" INCLUDE "home/window.asm" INCLUDE "home/flag.asm" -Unreferenced_Function2ebb:: ; 2ebb +Unreferenced_Function2ebb:: ld a, [wMonStatusFlags] bit 1, a ret z @@ -66,34 +65,29 @@ Unreferenced_Function2ebb:: ; 2ebb ld a, [hJoyDown] bit B_BUTTON_F, a ret -; 2ec6 -xor_a:: ; 2ec6 +xor_a:: xor a ret -; 2ec8 -xor_a_dec_a:: ; 2ec8 +xor_a_dec_a:: xor a dec a ret -; 2ecb -Unreferenced_Function2ecb:: ; 2ecb +Unreferenced_Function2ecb:: push hl ld hl, wMonStatusFlags bit 1, [hl] pop hl ret -; 2ed3 INCLUDE "home/sprite_updates.asm" INCLUDE "home/string.asm" INCLUDE "home/region.asm" -ret_2f3e:: ; 2f3e +ret_2f3e:: ret -; 2f3f INCLUDE "home/item.asm" INCLUDE "home/random.asm" @@ -101,14 +95,12 @@ INCLUDE "home/sram.asm" ; Register aliases -_hl_:: ; 2fec +_hl_:: jp hl -; 2fed -_de_:: ; 2fed +_de_:: push de ret -; 2fef INCLUDE "home/double_speed.asm" INCLUDE "home/clear_sprites.asm" @@ -116,7 +108,7 @@ INCLUDE "home/copy2.asm" INCLUDE "home/copy_tilemap.asm" INCLUDE "home/copy_name.asm" -IsInArray:: ; 30e1 +IsInArray:: ; Find value a for every de bytes in array hl. ; Return index in b and carry if found. @@ -139,7 +131,6 @@ IsInArray:: ; 30e1 .InArray: scf ret -; 30f4 SkipNames:: ; 0x30f4 ; Skip a names. @@ -156,7 +147,7 @@ SkipNames:: ; 0x30f4 INCLUDE "home/math.asm" INCLUDE "home/print_text.asm" -CallPointerAt:: ; 31be +CallPointerAt:: ld a, [hROMBank] push af ld a, [hli] @@ -172,13 +163,12 @@ CallPointerAt:: ; 31be ld a, h rst Bankswitch ret -; 31cd -QueueScript:: ; 31cd +QueueScript:: ; Push pointer hl in the current bank to wQueuedScriptBank. ld a, [hROMBank] -FarQueueScript:: ; 31cf +FarQueueScript:: ; Push pointer a:hl to wQueuedScriptBank. ld [wQueuedScriptBank], a ld a, l @@ -186,9 +176,8 @@ FarQueueScript:: ; 31cf ld a, h ld [wQueuedScriptAddr + 1], a ret -; 31db -StringCmp:: ; 31db +StringCmp:: ; Compare c bytes at de and hl. ; Return z if they all match. .loop @@ -202,7 +191,7 @@ StringCmp:: ; 31db ret ; 0x31e4 -CompareLong:: ; 31e4 +CompareLong:: ; Compare bc bytes at de and hl. ; Return carry if they all match. @@ -224,7 +213,6 @@ CompareLong:: ; 31e4 .Diff: and a ret -; 31f3 INCLUDE "home/tilemap.asm" INCLUDE "home/hp_pals.asm" @@ -254,14 +242,13 @@ CountSetBits:: ; 0x335f ret ; 0x3376 -GetWeekday:: ; 3376 +GetWeekday:: ld a, [wCurDay] .mod sub 7 jr nc, .mod add 7 ret -; 3380 INCLUDE "home/pokedex_flags.asm" INCLUDE "home/names.asm" diff --git a/home/audio.asm b/home/audio.asm index 05dbafa0a9a..11ebd9b6b33 100644 --- a/home/audio.asm +++ b/home/audio.asm @@ -1,6 +1,6 @@ ; Audio interfaces. -MapSetup_Sound_Off:: ; 3b4e +MapSetup_Sound_Off:: push hl push de @@ -24,10 +24,9 @@ MapSetup_Sound_Off:: ; 3b4e pop de pop hl ret -; 3b6a -UpdateSound:: ; 3b6a +UpdateSound:: push hl push de @@ -51,10 +50,9 @@ UpdateSound:: ; 3b6a pop de pop hl ret -; 3b86 -_LoadMusicByte:: ; 3b86 +_LoadMusicByte:: ; wCurMusicByte = [a:de] GLOBAL LoadMusicByte @@ -68,10 +66,9 @@ GLOBAL LoadMusicByte ld [hROMBank], a ld [MBC3RomBank], a ret -; 3b97 -PlayMusic:: ; 3b97 +PlayMusic:: ; Play music de. push hl @@ -104,10 +101,9 @@ PlayMusic:: ; 3b97 pop de pop hl ret -; 3bbc -PlayMusic2:: ; 3bbc +PlayMusic2:: ; Stop playing music, then play music de. push hl @@ -138,10 +134,9 @@ PlayMusic2:: ; 3bbc pop hl ret -; 3be3 -PlayCry:: ; 3be3 +PlayCry:: ; Play cry de. push hl @@ -191,10 +186,9 @@ endr pop de pop hl ret -; 3c23 -PlaySFX:: ; 3c23 +PlaySFX:: ; Play sound effect de. ; Sound effects are ordered by priority (highest to lowest) @@ -233,17 +227,15 @@ PlaySFX:: ; 3c23 pop de pop hl ret -; 3c4e -WaitPlaySFX:: ; 3c4e +WaitPlaySFX:: call WaitSFX call PlaySFX ret -; 3c55 -WaitSFX:: ; 3c55 +WaitSFX:: ; infinite loop until sfx is done playing push hl @@ -264,9 +256,8 @@ WaitSFX:: ; 3c55 pop hl ret -; 3c74 -IsSFXPlaying:: ; 3c74 +IsSFXPlaying:: ; Return carry if no sound effect is playing. ; The inverse of CheckSFX. push hl @@ -292,39 +283,33 @@ IsSFXPlaying:: ; 3c74 pop hl and a ret -; 3c97 -MaxVolume:: ; 3c97 +MaxVolume:: ld a, MAX_VOLUME ld [wVolume], a ret -; 3c9d -LowVolume:: ; 3c9d +LowVolume:: ld a, $33 ; 40% ld [wVolume], a ret -; 3ca3 -VolumeOff:: ; 3ca3 +VolumeOff:: xor a ld [wVolume], a ret -; 3ca8 -Unused_FadeOutMusic:: ; 3ca8 +Unused_FadeOutMusic:: ld a, 4 ld [wMusicFade], a ret -; 3cae -FadeInMusic:: ; 3cae +FadeInMusic:: ld a, 4 | (1 << MUSIC_FADE_IN_F) ld [wMusicFade], a ret -; 3cb4 -SkipMusic:: ; 3cb4 +SkipMusic:: ; Skip a frames of music. .loop and a @@ -332,9 +317,8 @@ SkipMusic:: ; 3cb4 dec a call UpdateSound jr .loop -; 3cbc -FadeToMapMusic:: ; 3cbc +FadeToMapMusic:: push hl push de push bc @@ -360,9 +344,8 @@ FadeToMapMusic:: ; 3cbc pop de pop hl ret -; 3cdf -PlayMapMusic:: ; 3cdf +PlayMapMusic:: push hl push de push bc @@ -388,9 +371,8 @@ PlayMapMusic:: ; 3cdf pop de pop hl ret -; 3d03 -EnterMapMusic:: ; 3d03 +EnterMapMusic:: push hl push de push bc @@ -419,9 +401,8 @@ EnterMapMusic:: ; 3d03 pop de pop hl ret -; 3d2f -TryRestartMapMusic:: ; 3d2f +TryRestartMapMusic:: ld a, [wDontPlayMapMusicOnReload] and a jr z, RestartMapMusic @@ -433,9 +414,8 @@ TryRestartMapMusic:: ; 3d2f xor a ld [wDontPlayMapMusicOnReload], a ret -; 3d47 -RestartMapMusic:: ; 3d47 +RestartMapMusic:: push hl push de push bc @@ -452,9 +432,8 @@ RestartMapMusic:: ; 3d47 pop de pop hl ret -; 3d62 -SpecialMapMusic:: ; 3d62 +SpecialMapMusic:: ld a, [wPlayerState] cp PLAYER_SURF jr z, .surf @@ -493,16 +472,14 @@ SpecialMapMusic:: ; 3d62 ld de, MUSIC_BUG_CATCHING_CONTEST_RANKING scf ret -; 3d97 -GetMapMusic_MaybeSpecial:: ; 3d97 +GetMapMusic_MaybeSpecial:: call SpecialMapMusic ret c call GetMapMusic ret -; 3d9f -Unreferenced_Function3d9f:: ; 3d9f +Unreferenced_Function3d9f:: ; Places a BCD number at the ; upper center of the screen. ld a, 4 * TILE_WIDTH @@ -536,9 +513,8 @@ Unreferenced_Function3d9f:: ; 3d9f ld [wVirtualOAMSprite38TileID], a ld [wVirtualOAMSprite39TileID], a ret -; 3dde -CheckSFX:: ; 3dde +CheckSFX:: ; Return carry if any SFX channels are active. ld a, [wChannel5Flags1] bit 0, a @@ -557,9 +533,8 @@ CheckSFX:: ; 3dde .playing scf ret -; 3dfe -TerminateExpBarSound:: ; 3dfe +TerminateExpBarSound:: xor a ld [wChannel5Flags1], a ld [wSoundInput], a @@ -569,10 +544,9 @@ TerminateExpBarSound:: ; 3dfe ld [rNR13], a ld [rNR14], a ret -; 3e10 -ChannelsOff:: ; 3e10 +ChannelsOff:: ; Quickly turn off music channels xor a ld [wChannel1Flags1], a @@ -581,9 +555,8 @@ ChannelsOff:: ; 3e10 ld [wChannel4Flags1], a ld [wSoundInput], a ret -; 3e21 -SFXChannelsOff:: ; 3e21 +SFXChannelsOff:: ; Quickly turn off sound effect channels xor a ld [wChannel5Flags1], a @@ -592,4 +565,3 @@ SFXChannelsOff:: ; 3e21 ld [wChannel8Flags1], a ld [wSoundInput], a ret -; 3e32 diff --git a/home/battle.asm b/home/battle.asm index e59b1e3b4aa..1899a40dcc0 100644 --- a/home/battle.asm +++ b/home/battle.asm @@ -1,4 +1,4 @@ -UserPartyAttr:: ; 3945 +UserPartyAttr:: push af ld a, [hBattleTurn] and a @@ -8,10 +8,9 @@ UserPartyAttr:: ; 3945 .ot pop af jr OTPartyAttr -; 3951 -OpponentPartyAttr:: ; 3951 +OpponentPartyAttr:: push af ld a, [hBattleTurn] and a @@ -21,10 +20,9 @@ OpponentPartyAttr:: ; 3951 .ot pop af jr OTPartyAttr -; 395d -BattlePartyAttr:: ; 395d +BattlePartyAttr:: ; Get attribute a from the party struct of the active battle mon. push bc ld c, a @@ -35,10 +33,9 @@ BattlePartyAttr:: ; 395d call GetPartyLocation pop bc ret -; 396d -OTPartyAttr:: ; 396d +OTPartyAttr:: ; Get attribute a from the party struct of the active enemy mon. push bc ld c, a @@ -49,49 +46,43 @@ OTPartyAttr:: ; 396d call GetPartyLocation pop bc ret -; 397d -ResetDamage:: ; 397d +ResetDamage:: xor a ld [wCurDamage], a ld [wCurDamage + 1], a ret -; 3985 -SetPlayerTurn:: ; 3985 +SetPlayerTurn:: xor a ld [hBattleTurn], a ret -; 3989 -SetEnemyTurn:: ; 3989 +SetEnemyTurn:: ld a, 1 ld [hBattleTurn], a ret -; 398e -UpdateOpponentInParty:: ; 398e +UpdateOpponentInParty:: ld a, [hBattleTurn] and a jr z, UpdateEnemyMonInParty jr UpdateBattleMonInParty -; 3995 -UpdateUserInParty:: ; 3995 +UpdateUserInParty:: ld a, [hBattleTurn] and a jr z, UpdateBattleMonInParty jr UpdateEnemyMonInParty -; 399c -UpdateBattleMonInParty:: ; 399c +UpdateBattleMonInParty:: ; Update level, status, current HP ld a, [wCurBattleMon] -UpdateBattleMon:: ; 399f +UpdateBattleMon:: ld hl, wPartyMon1Level call GetPartyLocation @@ -100,9 +91,8 @@ UpdateBattleMon:: ; 399f ld hl, wBattleMonLevel ld bc, wBattleMonMaxHP - wBattleMonLevel jp CopyBytes -; 39b0 -UpdateEnemyMonInParty:: ; 39b0 +UpdateEnemyMonInParty:: ; Update level, status, current HP ; No wildmons. @@ -119,27 +109,24 @@ UpdateEnemyMonInParty:: ; 39b0 ld hl, wEnemyMonLevel ld bc, wEnemyMonMaxHP - wEnemyMonLevel jp CopyBytes -; 39c9 -RefreshBattleHuds:: ; 39c9 +RefreshBattleHuds:: call UpdateBattleHuds ld c, 3 call DelayFrames jp WaitBGMap -; 39d4 -UpdateBattleHuds:: ; 39d4 +UpdateBattleHuds:: farcall UpdatePlayerHUD farcall UpdateEnemyHUD ret -; 39e1 INCLUDE "home/battle_vars.asm" -FarCopyRadioText:: ; 3a90 +FarCopyRadioText:: inc hl ld a, [hROMBank] push af @@ -161,10 +148,9 @@ FarCopyRadioText:: ; 3a90 ld [hROMBank], a ld [MBC3RomBank], a ret -; 3ab2 -MobileTextBorder:: ; 3ab2 +MobileTextBorder:: CELL_PHONE_TOP EQU $5e CELL_PHONE_BOTTOM EQU $5f @@ -181,10 +167,9 @@ CELL_PHONE_BOTTOM EQU $5f hlcoord 19, 13 ld [hl], CELL_PHONE_BOTTOM ret -; 3ac3 -BattleTextBox:: ; 3ac3 +BattleTextBox:: ; Open a textbox and print text at hl. push hl call SpeechTextBox @@ -194,10 +179,9 @@ BattleTextBox:: ; 3ac3 pop hl call PrintTextBoxText ret -; 3ad5 -StdBattleTextBox:: ; 3ad5 +StdBattleTextBox:: ; Open a textbox and print battle text at 20:hl. ld a, [hROMBank] @@ -211,9 +195,8 @@ StdBattleTextBox:: ; 3ad5 pop af rst Bankswitch ret -; 3ae1 -GetBattleAnimPointer:: ; 3ae1 +GetBattleAnimPointer:: ld a, BANK(BattleAnimations) rst Bankswitch @@ -227,9 +210,8 @@ GetBattleAnimPointer:: ; 3ae1 rst Bankswitch ret -; 3af0 -GetBattleAnimByte:: ; 3af0 +GetBattleAnimByte:: push hl push de @@ -258,4 +240,3 @@ GetBattleAnimByte:: ; 3af0 ld a, [wBattleAnimByte] ret -; 3b0c diff --git a/home/battle_vars.asm b/home/battle_vars.asm index c4a8dcd70ab..a455fce20e8 100644 --- a/home/battle_vars.asm +++ b/home/battle_vars.asm @@ -1,12 +1,11 @@ -GetBattleVar:: ; 39e1 +GetBattleVar:: ; Preserves hl. push hl call GetBattleVarAddr pop hl ret -; 39e7 -GetBattleVarAddr:: ; 39e7 +GetBattleVarAddr:: ; Get variable from pair a, depending on whose turn it is. ; There are 21 variable pairs. @@ -110,4 +109,3 @@ BattleVarLocations: dw wCurPlayerMove, wCurEnemyMove dw wLastPlayerCounterMove, wLastEnemyCounterMove dw wLastPlayerMove, wLastEnemyMove -; 3a90 diff --git a/home/clear_sprites.asm b/home/clear_sprites.asm index 8d64c6b1006..6997746122e 100644 --- a/home/clear_sprites.asm +++ b/home/clear_sprites.asm @@ -1,4 +1,4 @@ -ClearSprites:: ; 300b +ClearSprites:: ; Erase OAM data ld hl, wVirtualOAM ld b, wVirtualOAMEnd - wVirtualOAM @@ -8,9 +8,8 @@ ClearSprites:: ; 300b dec b jr nz, .loop ret -; 3016 -HideSprites:: ; 3016 +HideSprites:: ; Set all OAM y-positions to 160 to hide them offscreen ld hl, wVirtualOAMSprite00YCoord ld de, SPRITEOAMSTRUCT_LENGTH @@ -22,4 +21,3 @@ HideSprites:: ; 3016 dec b jr nz, .loop ret -; 3026 diff --git a/home/copy.asm b/home/copy.asm index 9bd79ce3740..dfe48a50c0c 100644 --- a/home/copy.asm +++ b/home/copy.asm @@ -1,7 +1,7 @@ ; Functions to copy data from ROM. -Get2bpp_2:: ; dc9 +Get2bpp_2:: ld a, [rLCDC] bit rLCDC_ENABLE, a jp z, Copy2bpp @@ -9,9 +9,8 @@ Get2bpp_2:: ; dc9 homecall _Get2bpp ret -; ddc -Get1bpp_2:: ; ddc +Get1bpp_2:: ld a, [rLCDC] bit rLCDC_ENABLE, a jp z, Copy1bpp @@ -19,9 +18,8 @@ Get1bpp_2:: ; ddc homecall _Get1bpp ret -; def -FarCopyBytesDouble_DoubleBankSwitch:: ; def +FarCopyBytesDouble_DoubleBankSwitch:: ld [hBuffer], a ld a, [hROMBank] push af @@ -33,9 +31,8 @@ FarCopyBytesDouble_DoubleBankSwitch:: ; def pop af rst Bankswitch ret -; dfd -OldDMATransfer:: ; dfd +OldDMATransfer:: dec c ld a, [hBGMapMode] push af @@ -96,41 +93,35 @@ OldDMATransfer:: ; dfd pop af ld [hBGMapMode], a ret -; e4a -ReplaceKrisSprite:: ; e4a +ReplaceKrisSprite:: farcall _ReplaceKrisSprite ret -; e51 -LoadStandardFont:: ; e51 +LoadStandardFont:: farcall _LoadStandardFont ret -; e58 -LoadFontsBattleExtra:: ; e58 +LoadFontsBattleExtra:: farcall _LoadFontsBattleExtra ret -; e5f -LoadFontsExtra:: ; e5f +LoadFontsExtra:: farcall _LoadFontsExtra1 farcall _LoadFontsExtra2 ret -; e6c -LoadFontsExtra2:: ; e6c +LoadFontsExtra2:: farcall _LoadFontsExtra2 ret -; e73 -DecompressRequest2bpp:: ; e73 +DecompressRequest2bpp:: push de ld a, BANK(sScratch) call GetSRAMBank @@ -147,11 +138,10 @@ DecompressRequest2bpp:: ; e73 call Request2bpp call CloseSRAM ret -; e8d -FarCopyBytes:: ; e8d +FarCopyBytes:: ; copy bc bytes from a:hl to de ld [hBuffer], a @@ -168,7 +158,7 @@ FarCopyBytes:: ; e8d ; 0xe9b -FarCopyBytesDouble:: ; e9b +FarCopyBytesDouble:: ; Copy bc bytes from a:hl to bc*2 bytes at de, ; doubling each byte in the process. @@ -207,7 +197,7 @@ FarCopyBytesDouble:: ; e9b ; 0xeba -Request2bpp:: ; eba +Request2bpp:: ; Load 2bpp at b:de to occupy c tiles of hl. ld a, [hBGMapMode] push af @@ -280,10 +270,9 @@ Request2bpp:: ; eba sub [hl] ld c, a jr .loop -; f1e -Request1bpp:: ; f1e +Request1bpp:: ; Load 1bpp at b:de to occupy c tiles of hl. ld a, [hBGMapMode] push af @@ -356,15 +345,14 @@ Request1bpp:: ; f1e sub [hl] ld c, a jr .loop -; f82 -Get2bpp:: ; f82 +Get2bpp:: ld a, [rLCDC] bit rLCDC_ENABLE, a jp nz, Request2bpp -Copy2bpp:: ; f89 +Copy2bpp:: ; copy c 2bpp tiles from b:de to hl push hl @@ -387,15 +375,14 @@ Copy2bpp:: ; f89 pop af jp FarCopyBytes -; f9d -Get1bpp:: ; f9d +Get1bpp:: ld a, [rLCDC] bit rLCDC_ENABLE, a jp nz, Request1bpp -Copy1bpp:: ; fa4 +Copy1bpp:: ; copy c 1bpp tiles from b:de to hl push de @@ -418,4 +405,3 @@ Copy1bpp:: ; fa4 pop hl jp FarCopyBytesDouble -; fb6 diff --git a/home/copy2.asm b/home/copy2.asm index 63f3cfafbe8..9f2673c3863 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -92,7 +92,7 @@ GetFarHalfword:: ; 0x305d ret ; 0x306b -FarCopyWRAM:: ; 306b +FarCopyWRAM:: ld [hBuffer], a ld a, [rSVBK] push af @@ -104,9 +104,8 @@ FarCopyWRAM:: ; 306b pop af ld [rSVBK], a ret -; 307b -GetFarWRAMByte:: ; 307b +GetFarWRAMByte:: ld [hBuffer], a ld a, [rSVBK] push af @@ -118,9 +117,8 @@ GetFarWRAMByte:: ; 307b ld [rSVBK], a ld a, [hBuffer] ret -; 308d -GetFarWRAMWord:: ; 308d +GetFarWRAMWord:: ld [hBuffer], a ld a, [rSVBK] push af @@ -132,4 +130,3 @@ GetFarWRAMWord:: ; 308d pop af ld [rSVBK], a ret -; 309d diff --git a/home/copy_name.asm b/home/copy_name.asm index 52bcc93e79a..59c8cf6c8b5 100644 --- a/home/copy_name.asm +++ b/home/copy_name.asm @@ -1,8 +1,8 @@ -CopyName1:: ; 30d6 +CopyName1:: ; Copies the name from de to wStringBuffer2 ld hl, wStringBuffer2 -CopyName2:: ; 30d9 +CopyName2:: ; Copies the name from de to hl .loop ld a, [de] @@ -11,4 +11,3 @@ CopyName2:: ; 30d9 cp "@" jr nz, .loop ret -; 30e1 diff --git a/home/copy_tilemap.asm b/home/copy_tilemap.asm index f6ddeff47e9..2c6c472443f 100644 --- a/home/copy_tilemap.asm +++ b/home/copy_tilemap.asm @@ -1,4 +1,4 @@ -LoadTileMapToTempTileMap:: ; 309d +LoadTileMapToTempTileMap:: ; Load wTileMap into wTempTileMap ld a, [rSVBK] push af @@ -11,18 +11,16 @@ LoadTileMapToTempTileMap:: ; 309d pop af ld [rSVBK], a ret -; 30b4 -Call_LoadTempTileMapToTileMap:: ; 30b4 +Call_LoadTempTileMapToTileMap:: xor a ld [hBGMapMode], a call LoadTempTileMapToTileMap ld a, 1 ld [hBGMapMode], a ret -; 30bf -LoadTempTileMapToTileMap:: ; 30bf +LoadTempTileMapToTileMap:: ; Load wTempTileMap into wTileMap ld a, [rSVBK] push af @@ -35,4 +33,3 @@ LoadTempTileMapToTileMap:: ; 30bf pop af ld [rSVBK], a ret -; 30d6 diff --git a/home/cry.asm b/home/cry.asm index c5f4a1c8a8c..43f20b1af45 100644 --- a/home/cry.asm +++ b/home/cry.asm @@ -1,4 +1,4 @@ -PlayStereoCry:: ; 37b6 +PlayStereoCry:: push af ld a, 1 ld [wStereoPanningMask], a @@ -6,9 +6,8 @@ PlayStereoCry:: ; 37b6 call _PlayMonCry call WaitSFX ret -; 37c4 -PlayStereoCry2:: ; 37c4 +PlayStereoCry2:: ; Don't wait for the cry to end. ; Used during pic animations. push af @@ -16,15 +15,13 @@ PlayStereoCry2:: ; 37c4 ld [wStereoPanningMask], a pop af jp _PlayMonCry -; 37ce -PlayMonCry:: ; 37ce +PlayMonCry:: call PlayMonCry2 call WaitSFX ret -; 37d5 -PlayMonCry2:: ; 37d5 +PlayMonCry2:: ; Don't wait for the cry to end. push af xor a @@ -33,9 +30,8 @@ PlayMonCry2:: ; 37d5 pop af call _PlayMonCry ret -; 37e2 -_PlayMonCry:: ; 37e2 +_PlayMonCry:: push hl push de push bc @@ -52,9 +48,8 @@ _PlayMonCry:: ; 37e2 pop de pop hl ret -; 37f3 -LoadCry:: ; 37f3 +LoadCry:: ; Load cry bc. call GetCryIndex @@ -88,9 +83,8 @@ endr rst Bankswitch and a ret -; 381e -GetCryIndex:: ; 381e +GetCryIndex:: and a jr z, .no cp NUM_POKEMON + 1 @@ -105,4 +99,3 @@ GetCryIndex:: ; 381e .no scf ret -; 382d diff --git a/home/decompress.asm b/home/decompress.asm index 216b861f6bb..104fa0e302b 100644 --- a/home/decompress.asm +++ b/home/decompress.asm @@ -1,4 +1,4 @@ -FarDecompress:: ; b40 +FarDecompress:: ; Decompress graphics data from a:hl to de. ld [wLZBank], a @@ -12,10 +12,9 @@ FarDecompress:: ; b40 pop af rst Bankswitch ret -; b50 -Decompress:: ; b50 +Decompress:: ; Pokemon Crystal uses an lz variant for compression. ; This is mainly (but not necessarily) used for graphics. @@ -340,4 +339,3 @@ LZ_LONG_HI EQU %00000011 .next inc hl jp .Main -; c2f diff --git a/home/delay.asm b/home/delay.asm index 300f65c88eb..7d3e05c038a 100644 --- a/home/delay.asm +++ b/home/delay.asm @@ -1,4 +1,4 @@ -DelayFrame:: ; 45a +DelayFrame:: ; Wait for one frame ld a, 1 ld [wVBlankOccurred], a @@ -10,13 +10,11 @@ DelayFrame:: ; 45a and a jr nz, .halt ret -; 468 -DelayFrames:: ; 468 +DelayFrames:: ; Wait c frames call DelayFrame dec c jr nz, DelayFrames ret -; 46f diff --git a/home/double_speed.asm b/home/double_speed.asm index c07dc9cee04..de075e65e39 100644 --- a/home/double_speed.asm +++ b/home/double_speed.asm @@ -5,20 +5,18 @@ ; and double speed at any time, but LCD output ; collapses during the switch. -DoubleSpeed:: ; 2fef +DoubleSpeed:: ld hl, rKEY1 bit 7, [hl] jr z, SwitchSpeed ret -; 2ff7 -NormalSpeed:: ; 2ff7 +NormalSpeed:: ld hl, rKEY1 bit 7, [hl] ret z -; 2ffd -SwitchSpeed:: ; 2ffd +SwitchSpeed:: set 0, [hl] xor a ld [rIF], a @@ -27,4 +25,3 @@ SwitchSpeed:: ; 2ffd ld [rJOYP], a stop ; rgbasm adds a nop after this instruction by default ret -; 300b diff --git a/home/fade.asm b/home/fade.asm index 1a6f87c634c..9b0d101342a 100644 --- a/home/fade.asm +++ b/home/fade.asm @@ -1,7 +1,7 @@ ; Functions to fade the screen in and out. -Unreferenced_Function48c:: ; 48c +Unreferenced_Function48c:: ; TimeOfDayFade ld a, [wTimeOfDayPal] ld b, a @@ -20,10 +20,9 @@ Unreferenced_Function48c:: ; 48c ld a, [hli] ld [rOBP1], a ret -; 4a3 -RotateFourPalettesRight:: ; 4a3 +RotateFourPalettesRight:: ld a, [hCGB] and a jr z, .dmg @@ -35,9 +34,8 @@ RotateFourPalettesRight:: ; 4a3 ld hl, IncGradGBPalTable_08 ld b, 4 jr RotatePalettesRight -; 4b6 -RotateThreePalettesRight:: ; 4b6 +RotateThreePalettesRight:: ld a, [hCGB] and a jr z, .dmg @@ -48,7 +46,7 @@ RotateThreePalettesRight:: ; 4b6 .dmg ld hl, IncGradGBPalTable_13 ld b, 3 -RotatePalettesRight:: ; 4c7 +RotatePalettesRight:: ; Rotate palettes to the right and fill with loaded colors from the left ; If we're already at the leftmost color, fill with the leftmost color push de @@ -65,9 +63,8 @@ RotatePalettesRight:: ; 4c7 dec b jr nz, RotatePalettesRight ret -; 4dd -RotateFourPalettesLeft:: ; 4dd +RotateFourPalettesLeft:: ld a, [hCGB] and a jr z, .dmg @@ -79,9 +76,8 @@ RotateFourPalettesLeft:: ; 4dd ld hl, IncGradGBPalTable_12 - 1 ld b, 4 jr RotatePalettesLeft -; 4f0 -RotateThreePalettesLeft:: ; 4f0 +RotateThreePalettesLeft:: ld a, [hCGB] and a jr z, .dmg @@ -92,7 +88,7 @@ RotateThreePalettesLeft:: ; 4f0 .dmg ld hl, IncGradGBPalTable_15 - 1 ld b, 3 -RotatePalettesLeft:: ; 501 +RotatePalettesLeft:: ; Rotate palettes to the left and fill with loaded colors from the right ; If we're already at the rightmost color, fill with the rightmost color push de @@ -109,10 +105,8 @@ RotatePalettesLeft:: ; 501 dec b jr nz, RotatePalettesLeft ret -; 517 -; 517 IncGradGBPalTable_00:: db %11111111, %11111111, %11111111 IncGradGBPalTable_01:: db %11111110, %11111110, %11111110 IncGradGBPalTable_02:: db %11111001, %11111001, %11111001 @@ -134,4 +128,3 @@ IncGradGBPalTable_13:: db %10010000, %10000000, %10010000 IncGradGBPalTable_14:: db %01000000, %01000000, %01000000 IncGradGBPalTable_15:: db %00000000, %00000000, %00000000 -; 547 diff --git a/home/farcall.asm b/home/farcall.asm index 27649f30e95..25b3cd007cc 100644 --- a/home/farcall.asm +++ b/home/farcall.asm @@ -1,4 +1,4 @@ -FarCall_de:: ; 2d54 +FarCall_de:: ; Call a:de. ; Preserves other registers. @@ -13,10 +13,9 @@ FarCall_de:: ; 2d54 .de push de ret -; 2d63 -FarCall_hl:: ; 2d63 +FarCall_hl:: ; Call a:hl. ; Preserves other registers. @@ -26,9 +25,8 @@ FarCall_hl:: ; 2d63 ld a, [hBuffer] rst Bankswitch call FarJump_hl -; 2d6e -ReturnFarCall:: ; 2d6e +ReturnFarCall:: ; We want to retain the contents of f. ; To do this, we can pop to bc instead of af. @@ -47,8 +45,6 @@ ReturnFarCall:: ; 2d6e ld a, [wFarCallBCBuffer + 1] ld c, a ret -; 2d82 -FarJump_hl:: ; 2d82 +FarJump_hl:: jp hl -; 2d83 diff --git a/home/flag.asm b/home/flag.asm index 00c7d4b7e26..82358222275 100644 --- a/home/flag.asm +++ b/home/flag.asm @@ -1,19 +1,17 @@ -ResetMapBufferEventFlags:: ; 2e50 +ResetMapBufferEventFlags:: xor a ld hl, wEventFlags ld [hli], a ret -; 2e56 -ResetBikeFlags:: ; 2e56 +ResetBikeFlags:: xor a ld hl, wBikeFlags ld [hli], a ld [hl], a ret -; 2e5d -ResetFlashIfOutOfCave:: ; 2e5d +ResetFlashIfOutOfCave:: ld a, [wEnvironment] cp ROUTE jr z, .outdoors @@ -25,7 +23,6 @@ ResetFlashIfOutOfCave:: ; 2e5d ld hl, wStatusFlags res STATUSFLAGS_FLASH_F, [hl] ret -; 2e6f EventFlagAction:: ; 0x2e6f @@ -102,11 +99,10 @@ FlagAction:: ; 0x2e76 ; 0x2ead -CheckReceivedDex:: ; 2ead +CheckReceivedDex:: ld de, ENGINE_POKEDEX ld b, CHECK_FLAG farcall EngineFlagAction ld a, c and a ret -; 2ebb diff --git a/home/game_time.asm b/home/game_time.asm index f80d9a4620f..61cff0a1645 100644 --- a/home/game_time.asm +++ b/home/game_time.asm @@ -1,4 +1,4 @@ -ResetGameTime:: ; 208a +ResetGameTime:: xor a ld [wGameTimeCap], a ld [wGameTimeHours], a @@ -7,10 +7,9 @@ ResetGameTime:: ; 208a ld [wGameTimeSeconds], a ld [wGameTimeFrames], a ret -; 209e -GameTimer:: ; 209e +GameTimer:: nop @@ -24,10 +23,9 @@ GameTimer:: ; 209e pop af ld [rSVBK], a ret -; 20ad -UpdateGameTimer:: ; 20ad +UpdateGameTimer:: ; Increment the game timer by one frame. ; The game timer is capped at 999:59:59.00. @@ -128,4 +126,3 @@ UpdateGameTimer:: ; 20ad ld a, l ld [wGameTimeHours + 1], a ret -; 210f diff --git a/home/handshake.asm b/home/handshake.asm index 14daf08a708..1d3f43d6a3c 100644 --- a/home/handshake.asm +++ b/home/handshake.asm @@ -1,10 +1,9 @@ -PrinterReceive:: ; 2057 +PrinterReceive:: homecall _PrinterReceive ret -; 2063 -AskSerial:: ; 2063 +AskSerial:: ; send out a handshake while serial int is off ld a, [wPrinterConnectionOpen] bit 0, a @@ -41,4 +40,3 @@ AskSerial:: ; 2063 ld [rSC], a ret -; 208a diff --git a/home/hm_moves.asm b/home/hm_moves.asm index c4233d094c9..30a9786a9de 100644 --- a/home/hm_moves.asm +++ b/home/hm_moves.asm @@ -1,6 +1,6 @@ ; HM moves can't be forgotten -IsHM:: ; 34df +IsHM:: cp HM01 jr c, .NotHM scf @@ -8,14 +8,13 @@ IsHM:: ; 34df .NotHM: and a ret -; 34e7 -IsHMMove:: ; 34e7 +IsHMMove:: ld hl, .HMMoves ld de, 1 jp IsInArray -.HMMoves: ; 34f0 +.HMMoves: db CUT db FLY db SURF @@ -24,4 +23,3 @@ IsHMMove:: ; 34e7 db WATERFALL db WHIRLPOOL db -1 ; end -; 34f8 diff --git a/home/hp_pals.asm b/home/hp_pals.asm index 221b93da068..9400d341f41 100644 --- a/home/hp_pals.asm +++ b/home/hp_pals.asm @@ -1,11 +1,10 @@ -SetHPPal:: ; 334e +SetHPPal:: ; Set palette for hp bar pixel length e at hl. call GetHPPal ld [hl], d ret -; 3353 -GetHPPal:: ; 3353 +GetHPPal:: ; Get palette for hp bar pixel length e in d. ld d, HP_GREEN ld a, e @@ -16,4 +15,3 @@ GetHPPal:: ; 3353 ret nc inc d ; HP_RED ret -; 335f diff --git a/home/init.asm b/home/init.asm index ec541ad167b..5496ba45f0a 100644 --- a/home/init.asm +++ b/home/init.asm @@ -1,4 +1,4 @@ -Reset:: ; 150 +Reset:: di call MapSetup_Sound_Off xor a @@ -17,10 +17,9 @@ Reset:: ; 150 call DelayFrames jr Init -; 16e -_Start:: ; 16e +_Start:: cp $11 jr z, .cgb xor a @@ -33,10 +32,9 @@ _Start:: ; 16e ld [hCGB], a ld a, $1 ld [hSystemBooted], a -; 17d -Init:: ; 17d +Init:: di @@ -172,10 +170,9 @@ Init:: ; 17d xor a ld [wMapMusic], a jp GameInit -; 245 -ClearVRAM:: ; 245 +ClearVRAM:: ; Wipe VRAM banks 0 and 1 ld a, 1 @@ -190,9 +187,8 @@ ClearVRAM:: ; 245 xor a call ByteFill ret -; 25a -ClearWRAM:: ; 25a +ClearWRAM:: ; Wipe swappable WRAM banks (1-7) ; Assumes CGB or AGB @@ -209,9 +205,8 @@ ClearWRAM:: ; 25a cp 8 jr nc, .bank_loop ; Should be jr c ret -; 270 -ClearsScratch:: ; 270 +ClearsScratch:: ; Wipe the first 32 bytes of sScratch ld a, BANK(sScratch) @@ -222,4 +217,3 @@ ClearsScratch:: ; 270 call ByteFill call CloseSRAM ret -; 283 diff --git a/home/item.asm b/home/item.asm index 2f550a200d4..282157e55c8 100644 --- a/home/item.asm +++ b/home/item.asm @@ -1,9 +1,8 @@ -DoItemEffect:: ; 2f3f +DoItemEffect:: farcall _DoItemEffect ret -; 2f46 -CheckTossableItem:: ; 2f46 +CheckTossableItem:: push hl push de push bc @@ -12,9 +11,8 @@ CheckTossableItem:: ; 2f46 pop de pop hl ret -; 2f53 -TossItem:: ; 2f53 +TossItem:: push hl push de push bc @@ -32,9 +30,8 @@ TossItem:: ; 2f53 pop de pop hl ret -; 2f66 -ReceiveItem:: ; 2f66 +ReceiveItem:: push bc ld a, [hROMBank] push af @@ -52,9 +49,8 @@ ReceiveItem:: ; 2f66 rst Bankswitch pop bc ret -; 2f79 -CheckItem:: ; 2f79 +CheckItem:: push hl push de push bc @@ -72,4 +68,3 @@ CheckItem:: ; 2f79 pop de pop hl ret -; 2f8c diff --git a/home/joypad.asm b/home/joypad.asm index f46ab5c983e..5b11002c7f7 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -1,21 +1,19 @@ -JoypadInt:: ; 92e +JoypadInt:: ; Replaced by Joypad, called from VBlank instead of the useless ; joypad interrupt. ; This is a placeholder in case the interrupt is somehow enabled. reti -; 92f -ClearJoypad:: ; 92f +ClearJoypad:: xor a ; Pressed this frame (delta) ld [hJoyPressed], a ; Currently pressed ld [hJoyDown], a ret -; 935 -Joypad:: ; 935 +Joypad:: ; Read the joypad register and translate it to something more ; workable for use in-game. There are 8 buttons, so we can use ; one byte to contain all player input. @@ -103,10 +101,9 @@ endr jp z, Reset ret -; 984 -GetJoypad:: ; 984 +GetJoypad:: ; Update mirror joypad input from hJoypadDown (real input) ; hJoyReleased: released this frame (delta) @@ -232,10 +229,9 @@ GetJoypad:: ; 984 ld [hJoyPressed], a ; pressed ld [hJoyDown], a ; input jr .quit -; 9ee -StartAutoInput:: ; 9ee +StartAutoInput:: ; Start reading automated input stream at a:hl. ld [wAutoInputBank], a @@ -255,10 +251,9 @@ StartAutoInput:: ; 9ee ld a, AUTO_INPUT ld [wInputType], a ret -; a0a -StopAutoInput:: ; a0a +StopAutoInput:: ; Clear variables related to automated input. xor a ld [wAutoInputBank], a @@ -268,10 +263,9 @@ StopAutoInput:: ; a0a ; Back to normal input. ld [wInputType], a ret -; a1b -JoyTitleScreenInput:: ; a1b +JoyTitleScreenInput:: .loop call DelayFrame @@ -297,10 +291,9 @@ JoyTitleScreenInput:: ; a1b .keycombo scf ret -; a36 -JoyWaitAorB:: ; a36 +JoyWaitAorB:: .loop call DelayFrame call GetJoypad @@ -309,9 +302,8 @@ JoyWaitAorB:: ; a36 ret nz call RTC jr .loop -; a46 -WaitButton:: ; a46 +WaitButton:: ld a, [hOAMUpdate] push af ld a, 1 @@ -321,9 +313,8 @@ WaitButton:: ; a46 pop af ld [hOAMUpdate], a ret -; a57 -JoyTextDelay:: ; a57 +JoyTextDelay:: call GetJoypad ld a, [hInMenu] and a @@ -351,9 +342,8 @@ JoyTextDelay:: ; a57 ld a, 5 ld [wTextDelayFrames], a ret -; a80 -WaitPressAorB_BlinkCursor:: ; a80 +WaitPressAorB_BlinkCursor:: ld a, [hMapObjectIndexBuffer] push af ld a, [hObjectStructIndexBuffer] @@ -379,18 +369,16 @@ WaitPressAorB_BlinkCursor:: ; a80 pop af ld [hMapObjectIndexBuffer], a ret -; aa5 -SimpleWaitPressAorB:: ; aa5 +SimpleWaitPressAorB:: .loop call JoyTextDelay ld a, [hJoyLast] and A_BUTTON | B_BUTTON jr z, .loop ret -; aaf -ButtonSound:: ; aaf +ButtonSound:: ld a, [wLinkMode] and a jr nz, .link @@ -404,9 +392,8 @@ ButtonSound:: ; aaf .link ld c, 65 jp DelayFrames -; ac6 -.wait_input ; ac6 +.wait_input ld a, [hOAMUpdate] push af ld a, $1 @@ -432,9 +419,8 @@ ButtonSound:: ; aaf pop af ld [hOAMUpdate], a ret -; af5 -.blink_cursor ; af5 +.blink_cursor ld a, [hVBlankCounter] and %00010000 ; bit 4, a jr z, .cursor_off @@ -447,9 +433,8 @@ ButtonSound:: ; aaf .load_cursor_state ldcoord_a 18, 17 ret -; b06 -BlinkCursor:: ; b06 +BlinkCursor:: push bc ld a, [hl] ld b, a @@ -491,4 +476,3 @@ BlinkCursor:: ; b06 ld a, "▼" ld [hl], a ret -; b40 diff --git a/home/lcd.asm b/home/lcd.asm index 3899f081623..ecac5b5c39f 100644 --- a/home/lcd.asm +++ b/home/lcd.asm @@ -1,7 +1,7 @@ ; LCD handling -Unreferenced_Function547:: ; 547 +Unreferenced_Function547:: ld a, [hLCDCPointer] cp rSCX - $ff00 ret nz @@ -9,10 +9,9 @@ Unreferenced_Function547:: ; 547 ld a, [wLYOverrides] ld [$ff00+c], a ret -; 552 -LCD:: ; 552 +LCD:: push af ld a, [hLCDCPointer] and a @@ -34,10 +33,9 @@ LCD:: ; 552 .done pop af reti -; 568 -DisableLCD:: ; 568 +DisableLCD:: ; Turn the LCD off ; Don't need to do anything if the LCD is already off @@ -69,12 +67,10 @@ DisableLCD:: ; 568 ld a, b ld [rIE], a ret -; 58a -EnableLCD:: ; 58a +EnableLCD:: ld a, [rLCDC] set rLCDC_ENABLE, a ld [rLCDC], a ret -; 591 diff --git a/home/map.asm b/home/map.asm index 02b25f3c6a6..a546c00f932 100644 --- a/home/map.asm +++ b/home/map.asm @@ -1,14 +1,13 @@ ; Functions dealing with rendering and interacting with maps. -Clearwc7e8:: ; 210f +Clearwc7e8:: ld hl, wc7e8 ld bc, wc7e8_End - wc7e8 ld a, 0 call ByteFill ret -; 211b -CheckScenes:: ; 211b +CheckScenes:: ; Checks wCurrMapSceneScriptPointer. If it's empty, returns -1 in a. Otherwise, returns the active scene ID in a. push hl ld hl, wCurrMapSceneScriptPointer @@ -23,9 +22,8 @@ CheckScenes:: ; 211b .scene_exists pop hl ret -; 212a -GetCurrentMapSceneID:: ; 212a +GetCurrentMapSceneID:: ; Grabs the wram map scene script pointer for the current map and loads it into wCurrMapSceneScriptPointer. ; If there is no scene, both bytes of wCurrMapSceneScriptPointer are wiped clean. ; Copy the current map group and number into bc. This is needed for GetMapSceneID. @@ -46,9 +44,8 @@ GetCurrentMapSceneID:: ; 212a ld [wCurrMapSceneScriptPointer + 1], a xor a ret -; 2147 -GetMapSceneID:: ; 2147 +GetMapSceneID:: ; Searches the scene script table for the map group and number loaded in bc, and returns the wram pointer in de. ; If the map is not in the scene script table, returns carry. push bc @@ -93,15 +90,13 @@ GetMapSceneID:: ; 2147 pop bc ret -; 2173 -OverworldTextModeSwitch:: ; 2173 +OverworldTextModeSwitch:: call LoadMapPart call FarCallSwapTextboxPalettes ret -; 217a -LoadMapPart:: ; 217a +LoadMapPart:: ld a, [hROMBank] push af @@ -121,9 +116,8 @@ LoadMapPart:: ; 217a pop af rst Bankswitch ret -; 2198 -LoadMetatiles:: ; 2198 +LoadMetatiles:: ; de <- wOverworldMapAnchor ld a, [wOverworldMapAnchor] ld e, a @@ -210,18 +204,16 @@ endr dec b jp nz, .row ret -; 222a -ReturnToMapFromSubmenu:: ; 222a +ReturnToMapFromSubmenu:: ld a, MAPSETUP_SUBMENU ld [hMapEntryMethod], a farcall RunMapSetupScript xor a ld [hMapEntryMethod], a ret -; 2238 -CheckWarpTile:: ; 2238 +CheckWarpTile:: call GetDestinationWarpNumber ret nc @@ -233,16 +225,14 @@ CheckWarpTile:: ; 2238 call CopyWarpData scf ret -; 224a -WarpCheck:: ; 224a +WarpCheck:: call GetDestinationWarpNumber ret nc call CopyWarpData ret -; 2252 -GetDestinationWarpNumber:: ; 2252 +GetDestinationWarpNumber:: farcall CheckWarpCollision ret nc @@ -256,9 +246,8 @@ GetDestinationWarpNumber:: ; 2252 ld a, d rst Bankswitch ret -; 2266 -.GetDestinationWarpNumber: ; 2266 +.GetDestinationWarpNumber: ld a, [wPlayerStandingMapY] sub 4 ld e, a @@ -315,9 +304,8 @@ GetDestinationWarpNumber:: ; 2252 inc hl scf ret -; 22a7 -CopyWarpData:: ; 22a7 +CopyWarpData:: ld a, [hROMBank] push af @@ -328,9 +316,8 @@ CopyWarpData:: ; 22a7 rst Bankswitch scf ret -; 22b4 -.CopyWarpData: ; 22b4 +.CopyWarpData: push bc ld hl, wCurrMapWarpsPointer ld a, [hli] @@ -364,16 +351,14 @@ CopyWarpData:: ; 22a7 ld [wPrevMapNumber], a scf ret -; 22ee -CheckOutdoorMap:: ; 22ee +CheckOutdoorMap:: cp ROUTE ret z cp TOWN ret -; 22f4 -CheckIndoorMap:: ; 22f4 +CheckIndoorMap:: cp INDOOR ret z cp CAVE @@ -382,7 +367,6 @@ CheckIndoorMap:: ; 22f4 ret z cp GATE ret -; 2300 ; unused cp INDOOR @@ -391,36 +375,32 @@ CheckIndoorMap:: ; 22f4 ret z cp ENVIRONMENT_5 ret -; 2309 -LoadMapAttributes:: ; 2309 +LoadMapAttributes:: call CopyMapPartialAndAttributes call SwitchToMapScriptsBank call ReadMapScripts xor a ; do not skip object_events call ReadMapEvents ret -; 2317 -LoadMapAttributes_SkipPeople:: ; 2317 +LoadMapAttributes_SkipPeople:: call CopyMapPartialAndAttributes call SwitchToMapScriptsBank call ReadMapScripts ld a, TRUE ; skip object events call ReadMapEvents ret -; 2326 -CopyMapPartialAndAttributes:: ; 2326 +CopyMapPartialAndAttributes:: call CopyMapPartial call SwitchToMapAttributesBank call GetMapAttributesPointer call CopyMapAttributes call GetMapConnections ret -; 2336 -ReadMapEvents:: ; 2336 +ReadMapEvents:: push af ld hl, wMapEventsPointer ld a, [hli] @@ -438,9 +418,8 @@ ReadMapEvents:: ; 2336 call ReadObjectEvents ret -; 234f -ReadMapScripts:: ; 234f +ReadMapScripts:: ld hl, wMapScriptsPointer ld a, [hli] ld h, [hl] @@ -448,9 +427,8 @@ ReadMapScripts:: ; 234f call ReadMapSceneScripts call ReadMapCallbacks ret -; 235c -CopyMapAttributes:: ; 235c +CopyMapAttributes:: ld de, wMapAttributes ld c, wMapAttributesEnd - wMapAttributes .loop @@ -460,9 +438,8 @@ CopyMapAttributes:: ; 235c dec c jr nz, .loop ret -; 2368 -GetMapConnections:: ; 2368 +GetMapConnections:: ld a, $ff ld [wNorthConnectedMapGroup], a ld [wSouthConnectedMapGroup], a @@ -497,9 +474,8 @@ GetMapConnections:: ; 2368 .no_east ret -; 23a3 -GetMapConnection:: ; 23a3 +GetMapConnection:: ; Load map connection struct at hl into de. ld c, wSouthMapConnection - wNorthMapConnection .loop @@ -509,9 +485,8 @@ GetMapConnection:: ; 23a3 dec c jr nz, .loop ret -; 23ac -ReadMapSceneScripts:: ; 23ac +ReadMapSceneScripts:: ld a, [hli] ; scene script count ld c, a ld [wCurrMapSceneScriptCount], a ; current map scene script count @@ -526,9 +501,8 @@ ReadMapSceneScripts:: ; 23ac ld bc, 4 ; scene_script size call AddNTimes ret -; 23c3 -ReadMapCallbacks:: ; 23c3 +ReadMapCallbacks:: ld a, [hli] ld c, a ld [wCurrMapCallbackCount], a @@ -543,9 +517,8 @@ ReadMapCallbacks:: ; 23c3 ld bc, 3 call AddNTimes ret -; 23da -ReadWarps:: ; 23da +ReadWarps:: ld a, [hli] ld c, a ld [wCurrMapWarpCount], a @@ -559,9 +532,8 @@ ReadWarps:: ; 23da ld bc, 5 call AddNTimes ret -; 23f1 -ReadCoordEvents:: ; 23f1 +ReadCoordEvents:: ld a, [hli] ld c, a ld [wCurrMapCoordEventCount], a @@ -577,9 +549,8 @@ ReadCoordEvents:: ; 23f1 ld bc, 8 call AddNTimes ret -; 2408 -ReadBGEvents:: ; 2408 +ReadBGEvents:: ld a, [hli] ld c, a ld [wCurrMapBGEventCount], a @@ -595,9 +566,8 @@ ReadBGEvents:: ; 2408 ld bc, 5 call AddNTimes ret -; 241f -ReadObjectEvents:: ; 241f +ReadObjectEvents:: push hl call ClearObjectStructs pop de @@ -641,9 +611,8 @@ ReadObjectEvents:: ; 241f ld h, d ld l, e ret -; 2457 -CopyMapObjectEvents:: ; 2457 +CopyMapObjectEvents:: and a ret z @@ -668,9 +637,8 @@ CopyMapObjectEvents:: ; 2457 dec c jr nz, .loop ret -; 2471 -ClearObjectStructs:: ; 2471 +ClearObjectStructs:: ld hl, wObject1Struct ld bc, OBJECT_STRUCT_LENGTH * (NUM_OBJECT_STRUCTS - 1) xor a @@ -687,9 +655,8 @@ ClearObjectStructs:: ; 2471 dec c jr nz, .loop ret -; 248a -RestoreFacingAfterWarp:: ; 248a +RestoreFacingAfterWarp:: call GetMapScriptsBank rst Bankswitch @@ -719,7 +686,6 @@ RestoreFacingAfterWarp:: ; 248a .skip farcall GetCoordOfUpperLeftCorner ret -; 24ba .backup ld a, [wPrevWarp] @@ -729,9 +695,8 @@ RestoreFacingAfterWarp:: ; 248a ld a, [wPrevMapNumber] ld [wBackupMapNumber], a ret -; 24cd -LoadBlockData:: ; 24cd +LoadBlockData:: ld hl, wOverworldMapBlocks ld bc, wOverworldMapBlocksEnd - wOverworldMapBlocks ld a, 0 @@ -741,9 +706,8 @@ LoadBlockData:: ; 24cd ld a, MAPCALLBACK_TILES call RunMapCallback ret -; 24e4 -ChangeMap:: ; 24e4 +ChangeMap:: ld a, [hROMBank] push af @@ -791,9 +755,8 @@ ChangeMap:: ; 24e4 pop af rst Bankswitch ret -; 2524 -FillMapConnections:: ; 2524 +FillMapConnections:: ; North ld a, [wNorthConnectedMapGroup] @@ -889,10 +852,9 @@ FillMapConnections:: ; 2524 .Done: ret -; 25d3 FillNorthConnectionStrip:: -FillSouthConnectionStrip:: ; 25d3 +FillSouthConnectionStrip:: ld c, 3 .y @@ -925,10 +887,9 @@ FillSouthConnectionStrip:: ; 25d3 dec c jr nz, .y ret -; 25f6 FillWestConnectionStrip:: -FillEastConnectionStrip:: ; 25f6 +FillEastConnectionStrip:: .loop ld a, [wMapWidth] @@ -964,14 +925,12 @@ FillEastConnectionStrip:: ; 25f6 dec b jr nz, .loop ret -; 261b -LoadMapStatus:: ; 261b +LoadMapStatus:: ld [wMapStatus], a ret -; 261f -CallScript:: ; 261f +CallScript:: ; Call a script at a:hl. ld [wScriptBank], a @@ -985,18 +944,16 @@ CallScript:: ; 261f scf ret -; 2631 -CallMapScript:: ; 2631 +CallMapScript:: ; Call a script at hl in the current bank if there isn't already a script running ld a, [wScriptRunning] and a ret nz call GetMapScriptsBank jr CallScript -; 263b -RunMapCallback:: ; 263b +RunMapCallback:: ; Will run the first callback found with execution index equal to a. ld b, a ld a, [hROMBank] @@ -1015,9 +972,8 @@ RunMapCallback:: ; 263b pop af rst Bankswitch ret -; 2653 -.FindCallback: ; 2653 +.FindCallback: ld a, [wCurrMapCallbackCount] ld c, a and a @@ -1046,9 +1002,8 @@ RunMapCallback:: ; 263b ld l, a scf ret -; 2674 -ExecuteCallbackScript:: ; 2674 +ExecuteCallbackScript:: ; Do map callback de and return to script bank b. farcall CallCallback ld a, [wScriptMode] @@ -1064,9 +1019,8 @@ ExecuteCallbackScript:: ; 2674 pop af ld [wScriptMode], a ret -; 269a -MapTextbox:: ; 269a +MapTextbox:: ld a, [hROMBank] push af @@ -1087,9 +1041,8 @@ MapTextbox:: ; 269a pop af rst Bankswitch ret -; 26b7 -Call_a_de:: ; 26b7 +Call_a_de:: ; Call a:de. ld [hBuffer], a @@ -1107,9 +1060,8 @@ Call_a_de:: ; 26b7 .de push de ret -; 26c7 -GetMovementData:: ; 26c7 +GetMovementData:: ; Initialize the movement data for object c at b:hl ld a, [hROMBank] push af @@ -1123,7 +1075,6 @@ GetMovementData:: ; 26c7 ld a, h rst Bankswitch ret -; 26d4 GetScriptByte:: ; 0x26d4 ; Return byte at wScriptBank:wScriptPos in a. @@ -1165,25 +1116,21 @@ ObjectEventText:: db "@" ; 0x26f7 -BGEvent:: ; 26f7 +BGEvent:: jumptext BGEventText -; 26fa -BGEventText:: ; 26fa +BGEventText:: text_jump UnknownText_0x1c46fc db "@" -; 26ff -CoordinatesEvent:: ; 26ff +CoordinatesEvent:: jumptext CoordinatesEventText -; 2702 -CoordinatesEventText:: ; 2702 +CoordinatesEventText:: text_jump UnknownText_0x1c4706 db "@" -; 2707 -CheckObjectMask:: ; 2707 +CheckObjectMask:: ld a, [hMapObjectIndexBuffer] ld e, a ld d, $0 @@ -1191,9 +1138,8 @@ CheckObjectMask:: ; 2707 add hl, de ld a, [hl] ret -; 2712 -MaskObject:: ; 2712 +MaskObject:: ld a, [hMapObjectIndexBuffer] ld e, a ld d, $0 @@ -1201,9 +1147,8 @@ MaskObject:: ; 2712 add hl, de ld [hl], -1 ; , masked ret -; 271e -UnmaskObject:: ; 271e +UnmaskObject:: ld a, [hMapObjectIndexBuffer] ld e, a ld d, $0 @@ -1211,9 +1156,8 @@ UnmaskObject:: ; 271e add hl, de ld [hl], 0 ; unmasked ret -; 272a -ScrollMapDown:: ; 272a +ScrollMapDown:: hlcoord 0, 0 ld de, wBGMapBuffer call BackupBGMapRow @@ -1227,9 +1171,8 @@ ScrollMapDown:: ; 272a ld a, $1 ld [hBGMapUpdate], a ret -; 2748 -ScrollMapUp:: ; 2748 +ScrollMapUp:: hlcoord 0, SCREEN_HEIGHT - 2 ld de, wBGMapBuffer call BackupBGMapRow @@ -1251,9 +1194,8 @@ ScrollMapUp:: ; 2748 ld a, $1 ld [hBGMapUpdate], a ret -; 2771 -ScrollMapRight:: ; 2771 +ScrollMapRight:: hlcoord 0, 0 ld de, wBGMapBuffer call BackupBGMapColumn @@ -1267,9 +1209,8 @@ ScrollMapRight:: ; 2771 ld a, $1 ld [hBGMapUpdate], a ret -; 278f -ScrollMapLeft:: ; 278f +ScrollMapLeft:: hlcoord SCREEN_WIDTH - 2, 0 ld de, wBGMapBuffer call BackupBGMapColumn @@ -1290,9 +1231,8 @@ ScrollMapLeft:: ; 278f ld a, $1 ld [hBGMapUpdate], a ret -; 27b7 -BackupBGMapRow:: ; 27b7 +BackupBGMapRow:: ld c, 2 * SCREEN_WIDTH .loop ld a, [hli] @@ -1301,9 +1241,8 @@ BackupBGMapRow:: ; 27b7 dec c jr nz, .loop ret -; 27c0 -BackupBGMapColumn:: ; 27c0 +BackupBGMapColumn:: ld c, SCREEN_HEIGHT .loop ld a, [hli] @@ -1322,9 +1261,8 @@ BackupBGMapColumn:: ; 27c0 dec c jr nz, .loop ret -; 27d3 -UpdateBGMapRow:: ; 27d3 +UpdateBGMapRow:: ld hl, wBGMapBufferPtrs push de call .iteration @@ -1354,9 +1292,8 @@ UpdateBGMapRow:: ; 27d3 ld a, SCREEN_WIDTH ld [hBGMapTileCount], a ret -; 27f8 -UpdateBGMapColumn:: ; 27f8 +UpdateBGMapColumn:: ld hl, wBGMapBufferPtrs ld c, SCREEN_HEIGHT .loop @@ -1381,7 +1318,6 @@ UpdateBGMapColumn:: ; 27f8 ld a, SCREEN_HEIGHT ld [hBGMapTileCount], a ret -; 2816 Unreferenced_Function2816:: ld hl, wBGMapBuffer @@ -1389,9 +1325,8 @@ Unreferenced_Function2816:: xor a call ByteFill ret -; 2821 -LoadTilesetGFX:: ; 2821 +LoadTilesetGFX:: ld hl, wTilesetAddress ld a, [hli] ld h, [hl] @@ -1446,9 +1381,8 @@ LoadTilesetGFX:: ; 2821 xor a ld [hTileAnimFrame], a ret -; 2879 -BufferScreen:: ; 2879 +BufferScreen:: ld hl, wOverworldMapAnchor ld a, [hli] ld h, [hl] @@ -1475,9 +1409,8 @@ BufferScreen:: ; 2879 dec c jr nz, .row ret -; 289d -SaveScreen:: ; 289d +SaveScreen:: ld hl, wOverworldMapAnchor ld a, [hli] ld h, [hl] @@ -1524,7 +1457,7 @@ SaveScreen:: ; 289d ld c, SCREEN_META_HEIGHT jr SaveScreen_LoadNeighbor -LoadNeighboringBlockData:: ; 28e3 +LoadNeighboringBlockData:: ld hl, wOverworldMapAnchor ld a, [hli] ld h, [hl] @@ -1536,7 +1469,7 @@ LoadNeighboringBlockData:: ; 28e3 ld b, SCREEN_META_WIDTH ld c, SCREEN_META_HEIGHT -SaveScreen_LoadNeighbor:: ; 28f7 +SaveScreen_LoadNeighbor:: .row push bc push hl @@ -1564,9 +1497,8 @@ SaveScreen_LoadNeighbor:: ; 28f7 dec c jr nz, .row ret -; 2914 -GetMovementPermissions:: ; 2914 +GetMovementPermissions:: xor a ld [wTilePermissions], a call .LeftRight @@ -1594,9 +1526,8 @@ GetMovementPermissions:: ; 2914 or [hl] ld [hl], a ret -; 2945 -.MovementPermissionsData: ; 2945 +.MovementPermissionsData: db DOWN_MASK db UP_MASK db LEFT_MASK @@ -1605,7 +1536,6 @@ GetMovementPermissions:: ; 2914 db UP_MASK | RIGHT_MASK db DOWN_MASK | LEFT_MASK db UP_MASK | LEFT_MASK -; 294d .UpDown: ld a, [wPlayerStandingMapX] @@ -1625,7 +1555,6 @@ GetMovementPermissions:: ; 2914 ld [wTileUp], a call .Up ret -; 296c .LeftRight: ld a, [wPlayerStandingMapX] @@ -1645,7 +1574,6 @@ GetMovementPermissions:: ; 2914 ld [wTileRight], a call .Right ret -; 298b .Down: call .CheckHiNybble @@ -1664,7 +1592,6 @@ GetMovementPermissions:: ; 2914 or FACE_DOWN ld [wTilePermissions], a ret -; 29a8 .Up: call .CheckHiNybble @@ -1683,7 +1610,6 @@ GetMovementPermissions:: ; 2914 or FACE_UP ld [wTilePermissions], a ret -; 29c5 .Right: call .CheckHiNybble @@ -1702,7 +1628,6 @@ GetMovementPermissions:: ; 2914 or FACE_RIGHT ld [wTilePermissions], a ret -; 29e2 .Left: call .CheckHiNybble @@ -1721,7 +1646,6 @@ GetMovementPermissions:: ; 2914 or FACE_LEFT ld [wTilePermissions], a ret -; 29ff .CheckHiNybble: and $f0 @@ -1729,9 +1653,8 @@ GetMovementPermissions:: ; 2914 ret z cp $c0 ret -; 2a07 -GetFacingTileCoord:: ; 2a07 +GetFacingTileCoord:: ; Return map coordinates in (d, e) and tile id in a ; of the tile the player is facing. @@ -1774,9 +1697,8 @@ GetFacingTileCoord:: ; 2a07 dw wTileLeft db 1, 0 dw wTileRight -; 2a3c -GetCoordTile:: ; 2a3c +GetCoordTile:: ; Get the collision byte for tile d, e call GetBlockLocation ld a, [hl] @@ -1809,9 +1731,8 @@ GetCoordTile:: ; 2a3c .nope ld a, -1 ret -; 2a66 -GetBlockLocation:: ; 2a66 +GetBlockLocation:: ld a, [wMapWidth] add 6 ld c, a @@ -1839,9 +1760,8 @@ GetBlockLocation:: ; 2a66 ld b, 0 add hl, bc ret -; 2a8b -CheckFacingBGEvent:: ; 2a8b +CheckFacingBGEvent:: call GetFacingTileCoord ; Load facing into b. ld b, a @@ -1866,9 +1786,8 @@ CheckFacingBGEvent:: ; 2a8b ld a, h rst Bankswitch ret -; 2aaa -CheckIfFacingTileCoordIsBGEvent:: ; 2aaa +CheckIfFacingTileCoordIsBGEvent:: ; Checks to see if you are facing a BG event. If so, copies it into wEngineBuffer1 and sets carry. ld hl, wCurrMapBGEventsPointer ld a, [hli] @@ -1905,9 +1824,8 @@ CheckIfFacingTileCoordIsBGEvent:: ; 2aaa call CopyBytes scf ret -; 2ad4 -CheckCurrentMapCoordEvents:: ; 2ad4 +CheckCurrentMapCoordEvents:: ; If there are no coord events, we don't need to be here. ld a, [wCurrMapCoordEventCount] and a @@ -1978,9 +1896,8 @@ CheckCurrentMapCoordEvents:: ; 2ad4 call CopyBytes scf ret -; 2b29 -FadeToMenu:: ; 2b29 +FadeToMenu:: xor a ld [hBGMapMode], a call LoadStandardMenuHeader @@ -1988,24 +1905,22 @@ FadeToMenu:: ; 2b29 call ClearSprites call DisableSpriteUpdates ret -; 2b3c -CloseSubmenu:: ; 2b3c +CloseSubmenu:: call ClearBGPalettes call ReloadTilesetAndPalettes call UpdateSprites call Call_ExitMenu call ret_d90 jr FinishExitMenu -; 2b4d -ExitAllMenus:: ; 2b4d +ExitAllMenus:: call ClearBGPalettes call Call_ExitMenu call ReloadTilesetAndPalettes call UpdateSprites call ret_d90 -FinishExitMenu:: ; 2b5c +FinishExitMenu:: ld b, SCGB_MAPPALS call GetSGBLayout farcall LoadOW_BGPal7 @@ -2013,7 +1928,6 @@ FinishExitMenu:: ; 2b5c farcall FadeInPalettes call EnableSpriteUpdates ret -; 2b74 ReturnToMapWithSpeechTextbox:: ; 0x2b74 push af @@ -2040,7 +1954,7 @@ ReturnToMapWithSpeechTextbox:: ; 0x2b74 ret ; 0x2bae -ReloadTilesetAndPalettes:: ; 2bae +ReloadTilesetAndPalettes:: call DisableLCD call ClearSprites farcall RefreshSprites @@ -2063,9 +1977,8 @@ ReloadTilesetAndPalettes:: ; 2bae call EnableLCD ret -; 2be5 -GetMapPointer:: ; 2be5 +GetMapPointer:: ld a, [wMapGroup] ld b, a ld a, [wMapNumber] @@ -2135,23 +2048,22 @@ GetAnyMapField:: ; 0x2c0c ret ; 0x2c1c -SwitchToMapAttributesBank:: ; 2c1c +SwitchToMapAttributesBank:: ld a, [wMapGroup] ld b, a ld a, [wMapNumber] ld c, a -SwitchToAnyMapAttributesBank:: ; 2c24 +SwitchToAnyMapAttributesBank:: call GetAnyMapAttributesBank rst Bankswitch ret -; 2c29 -GetMapAttributesBank:: ; 2c29 +GetMapAttributesBank:: ld a, [wMapGroup] ld b, a ld a, [wMapNumber] ld c, a -GetAnyMapAttributesBank:: ; 2c31 +GetAnyMapAttributesBank:: push hl push de ld de, MAP_MAPATTRIBUTES_BANK @@ -2160,9 +2072,8 @@ GetAnyMapAttributesBank:: ; 2c31 pop de pop hl ret -; 2c3d -CopyMapPartial:: ; 2c3d +CopyMapPartial:: ; Copy map data bank, tileset, environment, and map data address ; from the current map's entry within its group. ld a, [hROMBank] @@ -2178,20 +2089,17 @@ CopyMapPartial:: ; 2c3d pop af rst Bankswitch ret -; 2c52 -SwitchToMapScriptsBank:: ; 2c52 +SwitchToMapScriptsBank:: ld a, [wMapScriptsBank] rst Bankswitch ret -; 2c57 -GetMapScriptsBank:: ; 2c57 +GetMapScriptsBank:: ld a, [wMapScriptsBank] ret -; 2c5b -GetAnyMapBlocksBank:: ; 2c5b +GetAnyMapBlocksBank:: ; Return the blockdata bank for group b map c. push hl push de @@ -2219,7 +2127,6 @@ GetAnyMapBlocksBank:: ; 2c5b pop de pop hl ret -; 2c7d GetMapAttributesPointer:: ; 0x2c7d ; returns the current map's data pointer in hl. @@ -2232,9 +2139,8 @@ GetMapAttributesPointer:: ; 0x2c7d pop de pop bc ret -; 2c8a -GetMapEnvironment:: ; 2c8a +GetMapEnvironment:: push hl push de push bc @@ -2245,12 +2151,10 @@ GetMapEnvironment:: ; 2c8a pop de pop hl ret -; 2c98 ret ; unused -; 2c99 -GetAnyMapEnvironment:: ; 2c99 +GetAnyMapEnvironment:: push hl push de push bc @@ -2261,14 +2165,12 @@ GetAnyMapEnvironment:: ; 2c99 pop de pop hl ret -; 2ca7 -GetAnyMapTileset:: ; 2ca7 +GetAnyMapTileset:: ld de, MAP_TILESET call GetAnyMapField ld a, c ret -; 2caf GetWorldMapLocation:: ; 0x2caf ; given a map group/id in bc, return its location on the Pokégear map. @@ -2286,7 +2188,7 @@ GetWorldMapLocation:: ; 0x2caf ret ; 0x2cbd -GetMapMusic:: ; 2cbd +GetMapMusic:: push hl push bc ld de, MAP_MUSIC @@ -2329,22 +2231,19 @@ GetMapMusic:: ; 2cbd .clearedmahogany ld de, MUSIC_CHERRYGROVE_CITY jr .done -; 2cff -GetMapTimeOfDay:: ; 2cff +GetMapTimeOfDay:: call GetPhoneServiceTimeOfDayByte and $f ret -; 2d05 -GetMapPhoneService:: ; 2d05 +GetMapPhoneService:: call GetPhoneServiceTimeOfDayByte and $f0 swap a ret -; 2d0d -GetPhoneServiceTimeOfDayByte:: ; 2d0d +GetPhoneServiceTimeOfDayByte:: push hl push bc @@ -2355,9 +2254,8 @@ GetPhoneServiceTimeOfDayByte:: ; 2d0d pop bc pop hl ret -; 2d19 -GetFishingGroup:: ; 2d19 +GetFishingGroup:: push de push hl push bc @@ -2370,9 +2268,8 @@ GetFishingGroup:: ; 2d19 pop hl pop de ret -; 2d27 -LoadTileset:: ; 2d27 +LoadTileset:: push hl push bc @@ -2390,4 +2287,3 @@ LoadTileset:: ; 2d27 pop bc pop hl ret -; 2d43 diff --git a/home/map_objects.asm b/home/map_objects.asm index 5acea782224..6bc30d57105 100644 --- a/home/map_objects.asm +++ b/home/map_objects.asm @@ -1,6 +1,6 @@ ; Functions handling map objects. -GetSpritePalette:: ; 17ff +GetSpritePalette:: push hl push de push bc @@ -13,9 +13,8 @@ GetSpritePalette:: ; 17ff pop de pop hl ret -; 180e -GetSpriteVTile:: ; 180e +GetSpriteVTile:: push hl push bc ld hl, wUsedSprites + 2 @@ -49,9 +48,8 @@ GetSpriteVTile:: ; 180e pop bc pop hl ret -; 1836 -DoesSpriteHaveFacings:: ; 1836 +DoesSpriteHaveFacings:: push de push hl @@ -72,25 +70,22 @@ DoesSpriteHaveFacings:: ; 1836 pop hl pop de ret -; 184a -GetPlayerStandingTile:: ; 184a +GetPlayerStandingTile:: ld a, [wPlayerStandingTile] call GetTileCollision ld b, a ret -; 1852 -CheckOnWater:: ; 1852 +CheckOnWater:: ld a, [wPlayerStandingTile] call GetTileCollision sub WATERTILE ret z and a ret -; 185d -GetTileCollision:: ; 185d +GetTileCollision:: ; Get the collision type of tile a. push de @@ -115,9 +110,8 @@ GetTileCollision:: ; 185d pop hl pop de ret -; 1875 -CheckGrassTile:: ; 1875 +CheckGrassTile:: ld d, a and $f0 cp HI_NYBBLE_TALL_GRASS @@ -140,53 +134,46 @@ CheckGrassTile:: ; 1875 ret z scf ret -; 188e -CheckSuperTallGrassTile:: ; 188e +CheckSuperTallGrassTile:: cp COLL_LONG_GRASS ret z cp COLL_LONG_GRASS_1C ret -; 1894 -CheckCutTreeTile:: ; 1894 +CheckCutTreeTile:: cp COLL_CUT_TREE ret z cp COLL_CUT_TREE_1A ret -; 189a -CheckHeadbuttTreeTile:: ; 189a +CheckHeadbuttTreeTile:: cp COLL_HEADBUTT_TREE ret z cp COLL_HEADBUTT_TREE_1D ret -; 18a0 -CheckCounterTile:: ; 18a0 +CheckCounterTile:: cp COLL_COUNTER ret z cp COLL_COUNTER_98 ret -; 18a6 -CheckPitTile:: ; 18a6 +CheckPitTile:: cp COLL_PIT ret z cp COLL_PIT_68 ret -; 18ac -CheckIceTile:: ; 18ac +CheckIceTile:: cp COLL_ICE ret z cp COLL_ICE_2B ret z scf ret -; 18b4 -CheckWhirlpoolTile:: ; 18b4 +CheckWhirlpoolTile:: nop cp COLL_WHIRLPOOL ret z @@ -194,16 +181,14 @@ CheckWhirlpoolTile:: ; 18b4 ret z scf ret -; 18bd -CheckWaterfallTile:: ; 18bd +CheckWaterfallTile:: cp COLL_WATERFALL ret z cp COLL_CURRENT_DOWN ret -; 18c3 -CheckStandingOnEntrance:: ; 18c3 +CheckStandingOnEntrance:: ld a, [wPlayerStandingTile] cp COLL_DOOR ret z @@ -213,9 +198,8 @@ CheckStandingOnEntrance:: ; 18c3 ret z cp COLL_CAVE ret -; 18d2 -GetMapObject:: ; 18d2 +GetMapObject:: ; Return the location of map object a in bc. ld hl, wMapObjects ld bc, OBJECT_LENGTH @@ -223,9 +207,8 @@ GetMapObject:: ; 18d2 ld b, h ld c, l ret -; 18de -CheckObjectVisibility:: ; 18de +CheckObjectVisibility:: ; Sets carry if the object is not visible on the screen. ld [hMapObjectIndexBuffer], a call GetMapObject @@ -242,9 +225,8 @@ CheckObjectVisibility:: ; 18de .not_visible scf ret -; 18f5 -CheckObjectTime:: ; 18f5 +CheckObjectTime:: ld hl, MAPOBJECT_HOUR add hl, bc ld a, [hl] @@ -317,25 +299,22 @@ CheckObjectTime:: ; 18f5 .no scf ret -; 194d ; unused ld [hMapObjectIndexBuffer], a call GetMapObject call CopyObjectStruct ret -; 1956 -_CopyObjectStruct:: ; 1956 +_CopyObjectStruct:: ld [hMapObjectIndexBuffer], a call UnmaskObject ld a, [hMapObjectIndexBuffer] call GetMapObject farcall CopyObjectStruct ret -; 1967 -ApplyDeletionToMapObject:: ; 1967 +ApplyDeletionToMapObject:: ld [hMapObjectIndexBuffer], a call GetMapObject ld hl, MAPOBJECT_OBJECT_STRUCT_ID @@ -364,15 +343,13 @@ ApplyDeletionToMapObject:: ; 1967 ld [wObjectFollow_Leader], a ld [wObjectFollow_Follower], a ret -; 199f -DeleteObjectStruct:: ; 199f +DeleteObjectStruct:: call ApplyDeletionToMapObject call MaskObject ret -; 19a6 -CopyPlayerObjectTemplate:: ; 19a6 +CopyPlayerObjectTemplate:: push hl call GetMapObject ld d, b @@ -384,7 +361,6 @@ CopyPlayerObjectTemplate:: ; 19a6 ld bc, OBJECT_LENGTH - 1 call CopyBytes ret -; 19b8 Unreferenced_Function19b8: call GetMapObject @@ -414,9 +390,8 @@ Unreferenced_Function19b8: call GetObjectStruct farcall DeleteMapObject ret -; 19e9 -LoadMovementDataPointer:: ; 19e9 +LoadMovementDataPointer:: ; Load the movement data pointer for object a. ld [wMovementObject], a ld a, [hROMBank] @@ -441,9 +416,8 @@ LoadMovementDataPointer:: ; 19e9 set 7, [hl] and a ret -; 1a13 -FindFirstEmptyObjectStruct:: ; 1a13 +FindFirstEmptyObjectStruct:: ; Returns the index of the first empty object struct in A and its address in HL, then sets carry. ; If all object structs are occupied, A = 0 and Z is set. ; Preserves BC and DE. @@ -471,9 +445,8 @@ FindFirstEmptyObjectStruct:: ; 1a13 pop de pop bc ret -; 1a2f -GetSpriteMovementFunction:: ; 1a2f +GetSpriteMovementFunction:: ld hl, OBJECT_MOVEMENTTYPE add hl, bc ld a, [hl] @@ -490,9 +463,8 @@ rept NUM_SPRITEMOVEDATA_FIELDS endr ld a, [hl] ret -; 1a47 -GetInitialFacing:: ; 1a47 +GetInitialFacing:: push bc push de ld e, a @@ -509,9 +481,8 @@ endr pop de pop bc ret -; 1a61 -CopySpriteMovementData:: ; 1a61 +CopySpriteMovementData:: ld l, a ld a, [hROMBank] push af @@ -527,9 +498,8 @@ CopySpriteMovementData:: ; 1a61 rst Bankswitch ret -; 1a71 -.CopyData: ; 1a71 +.CopyData: ld hl, OBJECT_MOVEMENTTYPE add hl, de ld [hl], a @@ -578,9 +548,8 @@ endr add hl, de ld [hl], a ret -; 1aae -_GetMovementByte:: ; 1aae +_GetMovementByte:: ; Switch to the movement data bank ld a, [hROMBank] push af @@ -604,21 +573,18 @@ _GetMovementByte:: ; 1aae ld a, h ret -; 1ac6 -SetVramState_Bit0:: ; 1ac6 +SetVramState_Bit0:: ld hl, wVramState set 0, [hl] ret -; 1acc -ResetVramState_Bit0:: ; 1acc +ResetVramState_Bit0:: ld hl, wVramState res 0, [hl] ret -; 1ad2 -UpdateSprites:: ; 1ad2 +UpdateSprites:: ld a, [wVramState] bit 0, a ret z @@ -626,26 +592,23 @@ UpdateSprites:: ; 1ad2 farcall Function55e0 farcall _UpdateSprites ret -; 1ae5 -GetObjectStruct:: ; 1ae5 +GetObjectStruct:: ld bc, OBJECT_STRUCT_LENGTH ld hl, wObjectStructs call AddNTimes ld b, h ld c, l ret -; 1af1 -DoesObjectHaveASprite:: ; 1af1 +DoesObjectHaveASprite:: ld hl, OBJECT_SPRITE add hl, bc ld a, [hl] and a ret -; 1af8 -SetSpriteDirection:: ; 1af8 +SetSpriteDirection:: ; preserves other flags push af ld hl, OBJECT_FACING @@ -658,12 +621,10 @@ SetSpriteDirection:: ; 1af8 or e ld [hl], a ret -; 1b07 -GetSpriteDirection:: ; 1b07 +GetSpriteDirection:: ld hl, OBJECT_FACING add hl, bc ld a, [hl] maskbits NUM_DIRECTIONS, 2 ret -; 1b0f diff --git a/home/math.asm b/home/math.asm index 6a779e3785c..21582b8f6f4 100644 --- a/home/math.asm +++ b/home/math.asm @@ -9,7 +9,7 @@ AddNTimes:: ; 0x30fe ret ; 0x3105 -SimpleMultiply:: ; 3105 +SimpleMultiply:: ; Return a * c. and a ret z @@ -23,10 +23,9 @@ SimpleMultiply:: ; 3105 jr nz, .loop pop bc ret -; 3110 -SimpleDivide:: ; 3110 +SimpleDivide:: ; Divide a by c. Return quotient b and remainder a. ld b, 0 .loop @@ -36,10 +35,9 @@ SimpleDivide:: ; 3110 dec b add c ret -; 3119 -Multiply:: ; 3119 +Multiply:: ; Multiply hMultiplicand (3 bytes) by hMultiplier. Result in hProduct. ; All values are big endian. push hl @@ -50,10 +48,9 @@ Multiply:: ; 3119 pop bc pop hl ret -; 3124 -Divide:: ; 3124 +Divide:: ; Divide hDividend length b (max 4 bytes) by hDivisor. Result in hQuotient. ; All values are big endian. push hl @@ -64,10 +61,9 @@ Divide:: ; 3124 pop de pop hl ret -; 3136 -SubtractSigned:: ; 3136 +SubtractSigned:: ; Return a - b, sign in carry. sub b ret nc @@ -75,4 +71,3 @@ SubtractSigned:: ; 3136 add 1 scf ret -; 313d diff --git a/home/menu.asm b/home/menu.asm index 05ec1212a1c..97629229104 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -15,59 +15,50 @@ CopyMenuHeader:: ret ; 0x1d4b -StoreTo_wMenuCursorBuffer:: ; 1d4b +StoreTo_wMenuCursorBuffer:: ld [wMenuCursorBuffer], a ret -; 1d4f -MenuTextBox:: ; 1d4f +MenuTextBox:: push hl call LoadMenuTextBox pop hl jp PrintText -; 1d57 ; unused ret -; 1d58 -LoadMenuTextBox:: ; 1d58 +LoadMenuTextBox:: ld hl, .MenuHeader call LoadMenuHeader ret -; 1d5f -.MenuHeader: ; 1d5f +.MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw vTiles0 db 0 ; default option -; 1d67 -MenuTextBoxBackup:: ; 1d67 +MenuTextBoxBackup:: call MenuTextBox call CloseWindow ret -; 1d6e -LoadStandardMenuHeader:: ; 1d6e +LoadStandardMenuHeader:: ld hl, .MenuHeader call LoadMenuHeader ret -; 1d75 -.MenuHeader: ; 1d75 +.MenuHeader: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw 0 db 1 ; default option -; 1d7d -Call_ExitMenu:: ; 1d7d +Call_ExitMenu:: call ExitMenu ret -; 1d81 VerticalMenu:: xor a @@ -92,15 +83,13 @@ VerticalMenu:: .okay and a ret -; 0x1dab -GetMenu2:: ; 1dab +GetMenu2:: call LoadMenuHeader call VerticalMenu call CloseWindow ld a, [wMenuCursorY] ret -; 1db8 CopyNameFromMenu:: push hl @@ -123,17 +112,17 @@ CopyNameFromMenu:: ; 0x1dcf -YesNoBox:: ; 1dcf +YesNoBox:: lb bc, SCREEN_WIDTH - 6, 7 -PlaceYesNoBox:: ; 1dd2 +PlaceYesNoBox:: jr _YesNoBox -PlaceGenericTwoOptionBox:: ; 1dd4 +PlaceGenericTwoOptionBox:: call LoadMenuHeader jr InterpretTwoOptionMenu -_YesNoBox:: ; 1dd9 +_YesNoBox:: ; Return nc (yes) or c (no). push bc ld hl, YesNoMenuHeader @@ -158,7 +147,7 @@ _YesNoBox:: ; 1dd9 ld [wMenuBorderBottomCoord], a call PushWindow -InterpretTwoOptionMenu:: ; 1dfe +InterpretTwoOptionMenu:: call VerticalMenu push af ld c, $f @@ -177,29 +166,25 @@ InterpretTwoOptionMenu:: ; 1dfe ld [wMenuCursorY], a scf ret -; 1e1d -YesNoMenuHeader:: ; 1e1d +YesNoMenuHeader:: db MENU_BACKUP_TILES ; flags menu_coords 10, 5, 15, 9 dw .MenuData db 1 ; default option -; 1e25 -.MenuData: ; 1e25 +.MenuData: db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags db 2 db "YES@" db "NO@" -; 1e2e -OffsetMenuHeader:: ; 1e2e +OffsetMenuHeader:: call _OffsetMenuHeader call PushWindow ret -; 1e35 -_OffsetMenuHeader:: ; 1e35 +_OffsetMenuHeader:: push de call CopyMenuHeader pop de @@ -222,9 +207,8 @@ _OffsetMenuHeader:: ; 1e35 add l ld [wMenuBorderBottomCoord], a ret -; 1e5d -DoNthMenu:: ; 1e5d +DoNthMenu:: call DrawVariableLengthMenuBox call MenuWriteText call InitMenuCursorAndButtonPermissions @@ -232,9 +216,8 @@ DoNthMenu:: ; 1e5d call GetMenuJoypad call MenuClickSound ret -; 1e70 -SetUpMenu:: ; 1e70 +SetUpMenu:: call DrawVariableLengthMenuBox ; ??? call MenuWriteText call InitMenuCursorAndButtonPermissions ; set up selection pointer @@ -265,7 +248,7 @@ MenuWriteText:: ret ; 0x1ea6 -AutomaticGetMenuBottomCoord:: ; 1ea6 +AutomaticGetMenuBottomCoord:: ld a, [wMenuBorderLeftCoord] ld c, a ld a, [wMenuBorderRightCoord] @@ -279,9 +262,8 @@ AutomaticGetMenuBottomCoord:: ; 1ea6 add b ld [wMenuBorderBottomCoord], a ret -; 1ebd -GetMenuIndexSet:: ; 1ebd +GetMenuIndexSet:: ld hl, wMenuDataIndicesPointer ld a, [hli] ld h, [hl] @@ -304,9 +286,8 @@ GetMenuIndexSet:: ; 1ebd ld a, [hl] ld [wMenuDataItems], a ret -; 1eda -RunMenuItemPrintingFunction:: ; 1eda +RunMenuItemPrintingFunction:: call MenuBoxCoord2Tile ld bc, 2 * SCREEN_WIDTH + 2 add hl, bc @@ -327,16 +308,14 @@ RunMenuItemPrintingFunction:: ; 1eda add hl, de pop de jr .loop -; 1efb -._hl_ ; 1efb +._hl_ ld a, [hli] ld h, [hl] ld l, a jp hl -; 1eff -InitMenuCursorAndButtonPermissions:: ; 1eff +InitMenuCursorAndButtonPermissions:: call InitVerticalMenuCursor ld hl, wMenuJoypadFilter ld a, [wMenuDataFlags] @@ -353,21 +332,18 @@ InitMenuCursorAndButtonPermissions:: ; 1eff .disallow_left_right ret -; 1f1a -GetScrollingMenuJoypad:: ; 1f1a +GetScrollingMenuJoypad:: call ScrollingMenuJoypad ld hl, wMenuJoypadFilter and [hl] jr ContinueGettingMenuJoypad -; 1f23 -GetStaticMenuJoypad:: ; 1f23 +GetStaticMenuJoypad:: xor a ld [wMenuJoypad], a call StaticMenuJoypad -; 1f2a ContinueGettingMenuJoypad: bit A_BUTTON_F, a @@ -418,9 +394,8 @@ ContinueGettingMenuJoypad: ld [wMenuSelection], a scf ret -; 1f79 -PlaceMenuStrings:: ; 1f79 +PlaceMenuStrings:: push de ld hl, wMenuDataPointerTableAddr ld a, [hli] @@ -433,9 +408,8 @@ PlaceMenuStrings:: ; 1f79 pop hl call PlaceString ret -; 1f8d -PlaceNthMenuStrings:: ; 1f8d +PlaceNthMenuStrings:: push de ld a, [wMenuSelection] call GetMenuDataPointerTableEntry @@ -447,9 +421,8 @@ PlaceNthMenuStrings:: ; 1f8d pop hl call PlaceString ret -; 1f9e -Unreferenced_Function1f9e:: ; 1f9e +Unreferenced_Function1f9e:: call GetMenuDataPointerTableEntry inc hl inc hl @@ -457,18 +430,16 @@ Unreferenced_Function1f9e:: ; 1f9e ld d, [hl] ld e, a ret -; 1fa7 -MenuJumptable:: ; 1fa7 +MenuJumptable:: ld a, [wMenuSelection] call GetMenuDataPointerTableEntry ld a, [hli] ld h, [hl] ld l, a jp hl -; 1fb1 -GetMenuDataPointerTableEntry:: ; 1fb1 +GetMenuDataPointerTableEntry:: ld e, a ld d, $0 ld hl, wMenuDataPointerTableAddr @@ -480,9 +451,8 @@ GetMenuDataPointerTableEntry:: ; 1fb1 add hl, de add hl, de ret -; 1fbf -ClearWindowData:: ; 1fbf +ClearWindowData:: ld hl, wWindowStackPointer call .bytefill ld hl, wMenuHeader @@ -509,16 +479,14 @@ ClearWindowData:: ; 1fbf pop af ld [rSVBK], a ret -; 1ff0 -.bytefill ; 1ff0 +.bytefill ld bc, $10 xor a call ByteFill ret -; 1ff8 -MenuClickSound:: ; 1ff8 +MenuClickSound:: push af and A_BUTTON | B_BUTTON jr z, .nosound @@ -529,10 +497,9 @@ MenuClickSound:: ; 1ff8 .nosound pop af ret -; 2009 -PlayClickSFX:: ; 2009 +PlayClickSFX:: push de ld de, SFX_READ_TEXT_2 call PlaySFX @@ -540,14 +507,13 @@ PlayClickSFX:: ; 2009 ret ; 0x2012 -MenuTextBoxWaitButton:: ; 2012 +MenuTextBoxWaitButton:: call MenuTextBox call WaitButton call ExitMenu ret -; 201c -Place2DMenuItemName:: ; 201c +Place2DMenuItemName:: ld [hBuffer], a ld a, [hROMBank] push af @@ -559,28 +525,24 @@ Place2DMenuItemName:: ; 201c rst Bankswitch ret -; 202a -_2DMenu:: ; 202a +_2DMenu:: ld a, [hROMBank] ld [wMenuData_2DMenuItemStringsBank], a farcall _2DMenu_ ld a, [wMenuCursorBuffer] ret -; 2039 -InterpretBattleMenu:: ; 2039 +InterpretBattleMenu:: ld a, [hROMBank] ld [wMenuData_2DMenuItemStringsBank], a farcall _InterpretBattleMenu ld a, [wMenuCursorBuffer] ret -; 2048 -InterpretMobileMenu:: ; 2048 +InterpretMobileMenu:: ld a, [hROMBank] ld [wMenuData_2DMenuItemStringsBank], a farcall _InterpretMobileMenu ld a, [wMenuCursorBuffer] ret -; 2057 diff --git a/home/menu_window.asm b/home/menu_window.asm index aceb0034339..2800d19cae6 100644 --- a/home/menu_window.asm +++ b/home/menu_window.asm @@ -1,7 +1,6 @@ -PushWindow:: ; 1c00 +PushWindow:: callfar _PushWindow ret -; 1c07 ExitMenu:: ; 0x1c07 push af @@ -79,7 +78,7 @@ GetMenuBoxDims:: ; 0x1c53 ret ; 0x1c66 -CopyMenuData:: ; 1c66 +CopyMenuData:: push hl push de push bc @@ -96,9 +95,8 @@ CopyMenuData:: ; 1c66 pop de pop hl ret -; 1c7e -GetWindowStackTop:: ; 1c7e +GetWindowStackTop:: ld hl, wWindowStackPointer ld a, [hli] ld h, [hl] @@ -108,9 +106,8 @@ GetWindowStackTop:: ; 1c7e ld h, [hl] ld l, a ret -; 1c89 -PlaceVerticalMenuItems:: ; 1c89 +PlaceVerticalMenuItems:: call CopyMenuData ld hl, wMenuDataPointer ld e, [hl] @@ -143,17 +140,15 @@ PlaceVerticalMenuItems:: ; 1c89 ld b, $0 add hl, bc jp PlaceString -; 1cbb -MenuBox:: ; 1cbb +MenuBox:: call MenuBoxCoord2Tile call GetMenuBoxDims dec b dec c jp TextBox -; 1cc6 -GetMenuTextStartCoord:: ; 1cc6 +GetMenuTextStartCoord:: ld a, [wMenuBorderTopCoord] ld b, a inc b @@ -175,9 +170,8 @@ GetMenuTextStartCoord:: ; 1cc6 .bit_7_clear ret -; 1ce1 -ClearMenuBoxInterior:: ; 1ce1 +ClearMenuBoxInterior:: call MenuBoxCoord2Tile ld bc, SCREEN_WIDTH + 1 add hl, bc @@ -186,27 +180,24 @@ ClearMenuBoxInterior:: ; 1ce1 dec c call ClearBox ret -; 1cf1 -ClearWholeMenuBox:: ; 1cf1 +ClearWholeMenuBox:: call MenuBoxCoord2Tile call GetMenuBoxDims inc c inc b call ClearBox ret -; 1cfd -MenuBoxCoord2Tile:: ; 1cfd +MenuBoxCoord2Tile:: ld a, [wMenuBorderLeftCoord] ld c, a ld a, [wMenuBorderTopCoord] ld b, a -; 1d05 -Coord2Tile:: ; 1d05 +Coord2Tile:: ; Return the address of wTileMap(c, b) in hl. xor a ld h, a @@ -226,15 +217,14 @@ Coord2Tile:: ; 1d05 bccoord 0, 0 add hl, bc ret -; 1d19 -MenuBoxCoord2Attr:: ; 1d19 +MenuBoxCoord2Attr:: ld a, [wMenuBorderLeftCoord] ld c, a ld a, [wMenuBorderTopCoord] ld b, a -Coord2Attr:: ; 1d21 +Coord2Attr:: ; Return the address of wAttrMap(c, b) in hl. xor a ld h, a @@ -254,4 +244,3 @@ Coord2Attr:: ; 1d21 bccoord 0, 0, wAttrMap add hl, bc ret -; 1d35 diff --git a/home/mobile.asm b/home/mobile.asm index 4be526bbccb..c27012098ed 100644 --- a/home/mobile.asm +++ b/home/mobile.asm @@ -1,4 +1,4 @@ -Function3e32:: ; 3e32 +Function3e32:: ; Mobile cp $2 ld [$c988], a @@ -27,9 +27,8 @@ Function3e32:: ; 3e32 rst Bankswitch jp Function110030 -; 3e60 -Function3e60:: ; 3e60 +Function3e60:: ; Return from Function110030 ld [$c986], a ld a, l @@ -50,9 +49,8 @@ Function3e60:: ; 3e60 ld l, a ld a, [$c986] ret -; 3e80 -MobileReceive:: ; 3e80 +MobileReceive:: ld a, [hROMBank] push af ld a, BANK(_MobileReceive) @@ -66,10 +64,9 @@ MobileReceive:: ; 3e80 rst Bankswitch ret -; 3e93 -Timer:: ; 3e93 +Timer:: push af push bc push de @@ -125,9 +122,8 @@ Timer:: ; 3e93 pop bc pop af reti -; 3ed7 -Unreferenced_Function3ed7:: ; 3ed7 +Unreferenced_Function3ed7:: ld [$dc02], a ld a, [hROMBank] push af @@ -141,9 +137,8 @@ Unreferenced_Function3ed7:: ; 3ed7 ld a, [$dc02] ret -; 3eea -Function3eea:: ; 3eea +Function3eea:: push hl push bc ld de, wAttrMap - wTileMap @@ -157,9 +152,8 @@ Function3eea:: ; 3eea pop hl call MobileHome_PlaceBox ret -; 3efd -Unreferenced_Function3efd:: ; 3efd +Unreferenced_Function3efd:: push hl hlcoord 0, 12 ld b, 4 @@ -168,7 +162,6 @@ Unreferenced_Function3efd:: ; 3efd pop hl call PrintTextBoxText ret -; 3f0d .fill_attr push hl @@ -184,9 +177,8 @@ Unreferenced_Function3efd:: ; 3efd pop hl call TextBoxBorder ret -; 3f20 -Function3f20:: ; 3f20 +Function3f20:: hlcoord 0, 0, wAttrMap ld b, 6 ld c, 20 @@ -196,9 +188,8 @@ Function3f20:: ; 3f20 ld c, 18 call MobileHome_PlaceBox ret -; 3f35 -Function3f35:: ; 3f35 +Function3f35:: ld a, 6 ld de, SCREEN_WIDTH .row @@ -214,9 +205,8 @@ Function3f35:: ; 3f35 dec b jr nz, .row ret -; 3f47 -MobileHome_PlaceBox: ; 3f47 +MobileHome_PlaceBox: push bc call .FillTop pop bc @@ -228,7 +218,6 @@ MobileHome_PlaceBox: ; 3f47 jr nz, .RowLoop call .FillBottom ret -; 3f58 .FillTop: ld a, $63 @@ -260,18 +249,16 @@ MobileHome_PlaceBox: ; 3f47 ld de, SCREEN_WIDTH add hl, de ret -; 3f7c -Function3f7c:: ; 3f7c +Function3f7c:: call MenuBoxCoord2Tile call GetMenuBoxDims dec b dec c call Function3eea ret -; 3f88 -Function3f88:: ; 3f88 +Function3f88:: ld hl, wDecompressScratch ld b, 0 .row @@ -290,9 +277,8 @@ Function3f88:: ; 3f88 dec c jr nz, .row ret -; 3f9f -Function3f9f:: ; 3f9f +Function3f9f:: ld hl, wDecompressScratch .row push bc @@ -311,4 +297,3 @@ Function3f9f:: ; 3f9f dec c jr nz, .row ret -; 3fb5 diff --git a/home/mon_data.asm b/home/mon_data.asm index 8fb5bf0c90d..bcfe49ddb0e 100644 --- a/home/mon_data.asm +++ b/home/mon_data.asm @@ -1,13 +1,12 @@ -Unreferenced_GetNthMove:: ; 384d +Unreferenced_GetNthMove:: ld hl, wListMoves_MoveIndicesBuffer ld c, a ld b, 0 add hl, bc ld a, [hl] ret -; 3856 -GetBaseData:: ; 3856 +GetBaseData:: push bc push de push hl @@ -62,13 +61,12 @@ GetBaseData:: ; 3856 pop de pop bc ret -; 389c -GetCurNick:: ; 389c +GetCurNick:: ld a, [wCurPartyMon] ld hl, wPartyMonNicknames -GetNick:: ; 38a2 +GetNick:: ; Get nickname a from list hl. push hl @@ -87,4 +85,3 @@ GetNick:: ; 38a2 pop bc pop hl ret -; 38bb diff --git a/home/mon_data_2.asm b/home/mon_data_2.asm index a5e46d83605..99169eaa829 100644 --- a/home/mon_data_2.asm +++ b/home/mon_data_2.asm @@ -1,4 +1,4 @@ -GetPartyParamLocation:: ; 3917 +GetPartyParamLocation:: ; Get the location of parameter a from wCurPartyMon in hl push bc ld hl, wPartyMons @@ -9,15 +9,13 @@ GetPartyParamLocation:: ; 3917 call GetPartyLocation pop bc ret -; 3927 -GetPartyLocation:: ; 3927 +GetPartyLocation:: ; Add the length of a PartyMon struct to hl a times. ld bc, PARTYMON_STRUCT_LENGTH jp AddNTimes -; 392d -Unreferenced_GetDexNumber:: ; 392d +Unreferenced_GetDexNumber:: ; Probably used in gen 1 to convert index number to dex number ; Not required in gen 2 because index number == dex number push hl @@ -34,4 +32,3 @@ Unreferenced_GetDexNumber:: ; 392d ld c, h pop hl ret -; 3945 diff --git a/home/mon_stats.asm b/home/mon_stats.asm index 3731a246f0f..318d32c9cd4 100644 --- a/home/mon_stats.asm +++ b/home/mon_stats.asm @@ -1,4 +1,4 @@ -IsAPokemon:: ; 3741 +IsAPokemon:: ; Return carry if species a is not a Pokemon. and a jr z, .NotAPokemon @@ -14,9 +14,8 @@ IsAPokemon:: ; 3741 .Pokemon: and a ret -; 3750 -DrawBattleHPBar:: ; 3750 +DrawBattleHPBar:: ; Draw an HP bar d tiles long at hl ; Fill it up to e pixels @@ -75,13 +74,12 @@ DrawBattleHPBar:: ; 3750 pop de pop hl ret -; 3786 -PrepMonFrontpic:: ; 3786 +PrepMonFrontpic:: ld a, $1 ld [wBoxAlignment], a -_PrepMonFrontpic:: ; 378b +_PrepMonFrontpic:: ld a, [wCurPartySpecies] call IsAPokemon jr c, .not_pokemon @@ -104,4 +102,3 @@ _PrepMonFrontpic:: ; 378b inc a ld [wCurPartySpecies], a ret -; 37b6 diff --git a/home/movement.asm b/home/movement.asm index c2c45d12b08..fe36511c5a9 100644 --- a/home/movement.asm +++ b/home/movement.asm @@ -1,4 +1,4 @@ -InitMovementBuffer:: ; 1b1e +InitMovementBuffer:: ld [wMovementBufferObject], a xor a ld [wMovementBufferCount], a @@ -9,18 +9,16 @@ InitMovementBuffer:: ; 1b1e ld a, HIGH(wMovementBuffer) ld [wUnusedMovementBufferPointer + 1], a ret -; 1b35 -DecrementMovementBufferCount:: ; 1b35 +DecrementMovementBufferCount:: ld a, [wMovementBufferCount] and a ret z dec a ld [wMovementBufferCount], a ret -; 1b3f -AppendToMovementBuffer:: ; 1b3f +AppendToMovementBuffer:: push hl push de ld hl, wMovementBufferCount @@ -33,9 +31,8 @@ AppendToMovementBuffer:: ; 1b3f pop de pop hl ret -; 1b50 -AppendToMovementBufferNTimes:: ; 1b50 +AppendToMovementBufferNTimes:: push af ld a, c and a @@ -50,9 +47,8 @@ AppendToMovementBufferNTimes:: ; 1b50 dec c jr nz, .loop ret -; 1b5f -ComputePathToWalkToPlayer:: ; 1b5f +ComputePathToWalkToPlayer:: push af ; compare x coords, load left/right into h, and x distance into d ld a, b @@ -100,9 +96,8 @@ ComputePathToWalkToPlayer:: ; 1b5f ld c, e call AppendToMovementBufferNTimes ret -; 1b92 -.GetMovementData: ; 1b92 +.GetMovementData: push de push hl ld l, b @@ -118,7 +113,6 @@ ComputePathToWalkToPlayer:: ; 1b5f pop hl pop de ret -; 1ba5 .MovementData: slow_step DOWN @@ -133,9 +127,8 @@ ComputePathToWalkToPlayer:: ; 1b5f big_step UP big_step LEFT big_step RIGHT -; 1bb1 -SetMenuAttributes:: ; 1bb1 +SetMenuAttributes:: push hl push bc ld hl, w2DMenuCursorInitY @@ -156,21 +149,18 @@ SetMenuAttributes:: ; 1bb1 pop bc pop hl ret -; 1bc9 -StaticMenuJoypad:: ; 1bc9 +StaticMenuJoypad:: callfar _StaticMenuJoypad call GetMenuJoypad ret -; 1bd3 -ScrollingMenuJoypad:: ; 1bd3 +ScrollingMenuJoypad:: callfar _ScrollingMenuJoypad call GetMenuJoypad ret -; 1bdd -GetMenuJoypad:: ; 1bdd +GetMenuJoypad:: push bc push af ld a, [hJoyLast] @@ -184,23 +174,20 @@ GetMenuJoypad:: ; 1bdd ld a, b pop bc ret -; 1bee -PlaceHollowCursor:: ; 1bee +PlaceHollowCursor:: ld hl, wCursorCurrentTile ld a, [hli] ld h, [hl] ld l, a ld [hl], "▷" ret -; 1bf7 -HideCursor:: ; 1bf7 +HideCursor:: ld hl, wCursorCurrentTile ld a, [hli] ld h, [hl] ld l, a ld [hl], " " ret -; 1c00 diff --git a/home/names.asm b/home/names.asm index 90a15c09301..cbe21b82167 100644 --- a/home/names.asm +++ b/home/names.asm @@ -1,4 +1,4 @@ -NamesPointers:: ; 33ab +NamesPointers:: ; entries correspond to GetName constants (see constants/text_constants.asm) dba PokemonNames ; MON_NAME (not used; jumps to GetPokemonName) dba MoveNames ; MOVE_NAME @@ -8,9 +8,8 @@ NamesPointers:: ; 33ab dbw 0, wOTPartyMonOT ; ENEMY_OT_NAME dba TrainerClassNames ; TRAINER_NAME dbw 4, MoveDescriptions ; MOVE_DESC_NAME_BROKEN (wrong bank) -; 33c3 -GetName:: ; 33c3 +GetName:: ; Return name wCurSpecies from name list wNamedObjectTypeBuffer in wStringBuffer1. ld a, [hROMBank] @@ -67,9 +66,8 @@ GetName:: ; 33c3 pop af rst Bankswitch ret -; 3411 -GetNthString:: ; 3411 +GetNthString:: ; Return the address of the ; ath string starting from hl. @@ -87,9 +85,8 @@ GetNthString:: ; 3411 jr nz, .readChar pop bc ret -; 3420 -GetBasePokemonName:: ; 3420 +GetBasePokemonName:: ; Discards gender (Nidoran). push hl @@ -112,9 +109,8 @@ GetBasePokemonName:: ; 3420 pop hl ret -; 343b -GetPokemonName:: ; 343b +GetPokemonName:: ; Get Pokemon name wd265. ld a, [hROMBank] @@ -150,9 +146,8 @@ GetPokemonName:: ; 343b pop af rst Bankswitch ret -; 3468 -GetItemName:: ; 3468 +GetItemName:: ; Get item name wd265. push hl @@ -174,9 +169,8 @@ GetItemName:: ; 3468 pop bc pop hl ret -; 3487 -GetTMHMName:: ; 3487 +GetTMHMName:: ; Get TM/HM name by item id wd265. push hl @@ -257,11 +251,10 @@ GetTMHMName:: ; 3487 db "HM" .HMTextEnd: db "@" -; 34df INCLUDE "home/hm_moves.asm" -GetMoveName:: ; 34f8 +GetMoveName:: push hl ld a, MOVE_NAME @@ -275,4 +268,3 @@ GetMoveName:: ; 34f8 pop hl ret -; 350c diff --git a/home/palettes.asm b/home/palettes.asm index e8996c160a0..09858145a6f 100644 --- a/home/palettes.asm +++ b/home/palettes.asm @@ -1,7 +1,7 @@ ; Functions dealing with palettes. -UpdatePalsIfCGB:: ; c2f +UpdatePalsIfCGB:: ; update bgp data from wBGPals2 ; update obp data from wOBPals2 ; return carry if successful @@ -12,7 +12,7 @@ UpdatePalsIfCGB:: ; c2f ret z -UpdateCGBPals:: ; c33 +UpdateCGBPals:: ; return carry if successful ; any pals to update? ld a, [hCGBPalUpdate] @@ -20,7 +20,7 @@ UpdateCGBPals:: ; c33 ret z -ForceUpdateCGBPals:: ; c37 +ForceUpdateCGBPals:: ld a, [rSVBK] push af @@ -68,10 +68,9 @@ endr scf ret -; c9f -DmgToCgbBGPals:: ; c9f +DmgToCgbBGPals:: ; exists to forego reinserting cgb-converted image data ; input: a -> bgp @@ -114,10 +113,9 @@ DmgToCgbBGPals:: ; c9f .end pop af ret -; ccb -DmgToCgbObjPals:: ; ccb +DmgToCgbObjPals:: ; exists to forego reinserting cgb-converted image data ; input: d -> obp1 @@ -160,10 +158,9 @@ DmgToCgbObjPals:: ; ccb pop de pop hl ret -; cf8 -DmgToCgbObjPal0:: ; cf8 +DmgToCgbObjPal0:: ld [rOBP0], a push af @@ -200,9 +197,8 @@ DmgToCgbObjPal0:: ; cf8 .dmg pop af ret -; d24 -DmgToCgbObjPal1:: ; d24 +DmgToCgbObjPal1:: ld [rOBP1], a push af @@ -238,11 +234,10 @@ DmgToCgbObjPal1:: ; d24 .dmg pop af ret -; d50 -CopyPals:: ; d50 +CopyPals:: ; copy c palettes in order b from de to hl push bc @@ -293,10 +288,9 @@ endr dec c jr nz, CopyPals ret -; d79 -ClearVBank1:: ; d79 +ClearVBank1:: ld a, [hCGB] and a ret z @@ -312,15 +306,13 @@ ClearVBank1:: ; d79 ld a, 0 ld [rVBK], a ret -; d90 -ret_d90:: ; d90 +ret_d90:: ret -; d91 -ReloadSpritesNoPalettes:: ; d91 +ReloadSpritesNoPalettes:: ld a, [hCGB] and a ret z @@ -338,15 +330,12 @@ ReloadSpritesNoPalettes:: ; d91 ld [hCGBPalUpdate], a call DelayFrame ret -; db1 -FarCallSwapTextboxPalettes:: ; db1 +FarCallSwapTextboxPalettes:: homecall SwapTextboxPalettes ret -; dbd -FarCallScrollBGMapPalettes:: ; dbd +FarCallScrollBGMapPalettes:: homecall ScrollBGMapPalettes ret -; dc9 diff --git a/home/pokedex_flags.asm b/home/pokedex_flags.asm index e9ca2163e1f..809341509be 100644 --- a/home/pokedex_flags.asm +++ b/home/pokedex_flags.asm @@ -1,4 +1,4 @@ -SetSeenAndCaughtMon:: ; 3380 +SetSeenAndCaughtMon:: push af ld c, a ld hl, wPokedexCaught @@ -6,33 +6,28 @@ SetSeenAndCaughtMon:: ; 3380 call PokedexFlagAction pop af ; fallthrough -; 338b -SetSeenMon:: ; 338b +SetSeenMon:: ld c, a ld hl, wPokedexSeen ld b, SET_FLAG jr PokedexFlagAction -; 3393 -CheckCaughtMon:: ; 3393 +CheckCaughtMon:: ld c, a ld hl, wPokedexCaught ld b, CHECK_FLAG jr PokedexFlagAction -; 339b -CheckSeenMon:: ; 339b +CheckSeenMon:: ld c, a ld hl, wPokedexSeen ld b, CHECK_FLAG ; fallthrough -; 33a1 -PokedexFlagAction:: ; 33a1 +PokedexFlagAction:: ld d, 0 predef SmallFarFlagAction ld a, c and a ret -; 33ab diff --git a/home/predef.asm b/home/predef.asm index f03bdaa9402..e829bdc001c 100644 --- a/home/predef.asm +++ b/home/predef.asm @@ -1,4 +1,4 @@ -Predef:: ; 2d83 +Predef:: ; Call predefined function a. ; Preserves bc, de, hl and f. @@ -50,4 +50,3 @@ Predef:: ; 2d83 ld a, [wPredefTemp + 1] ld l, a ret -; 2dba diff --git a/home/print_bcd.asm b/home/print_bcd.asm index aecf8eb969d..89dbeffd55b 100644 --- a/home/print_bcd.asm +++ b/home/print_bcd.asm @@ -1,4 +1,4 @@ -PrintBCDNumber:: ; 38bb +PrintBCDNumber:: ; function to print a BCD (Binary-coded decimal) number ; de = address of BCD number ; hl = destination address @@ -50,7 +50,7 @@ PrintBCDNumber:: ; 38bb ret ; 0x38f2 -PrintBCDDigit:: ; 38f2 +PrintBCDDigit:: and %00001111 and a jr z, .zeroDigit diff --git a/home/print_level.asm b/home/print_level.asm index 578c7cd7868..2ebbbf980a6 100644 --- a/home/print_level.asm +++ b/home/print_level.asm @@ -1,4 +1,4 @@ -PrintLevel:: ; 382d +PrintLevel:: ; Print wTempMonLevel at hl ld a, [wTempMonLevel] @@ -14,18 +14,15 @@ PrintLevel:: ; 382d dec hl inc c jr Print8BitNumRightAlign -; 383d -PrintLevel_Force3Digits:: ; 383d +PrintLevel_Force3Digits:: ; Print :L and all 3 digits ld [hl], "" inc hl ld c, 3 -; 3842 -Print8BitNumRightAlign:: ; 3842 +Print8BitNumRightAlign:: ld [wd265], a ld de, wd265 ld b, PRINTNUM_RIGHTALIGN | 1 jp PrintNum -; 384d diff --git a/home/print_text.asm b/home/print_text.asm index 66f0b5e0134..6002affd6ec 100644 --- a/home/print_text.asm +++ b/home/print_text.asm @@ -1,4 +1,4 @@ -PrintLetterDelay:: ; 313d +PrintLetterDelay:: ; Wait before printing the next letter. ; The text speed setting in wOptions is actually a frame count: @@ -79,9 +79,8 @@ PrintLetterDelay:: ; 313d pop de pop hl ret -; 318c -CopyDataUntil:: ; 318c +CopyDataUntil:: ; Copy [hl .. bc) to de. ; In other words, the source data is @@ -100,17 +99,15 @@ CopyDataUntil:: ; 318c ret ; 0x3198 -PrintNum:: ; 3198 +PrintNum:: homecall _PrintNum ret -; 31a4 -MobilePrintNum:: ; 31a4 +MobilePrintNum:: homecall _MobilePrintNum ret -; 31b0 -FarPrintText:: ; 31b0 +FarPrintText:: ld [hBuffer], a ld a, [hROMBank] push af @@ -122,4 +119,3 @@ FarPrintText:: ; 31b0 pop af rst Bankswitch ret -; 31be diff --git a/home/random.asm b/home/random.asm index ceefdce6f1c..0ee1c50f26f 100644 --- a/home/random.asm +++ b/home/random.asm @@ -1,4 +1,4 @@ -Random:: ; 2f8c +Random:: ; A simple hardware-based random number generator (RNG). ; Two random numbers are generated by adding and subtracting @@ -27,9 +27,8 @@ Random:: ; 2f8c pop bc ret -; 2f9f -BattleRandom:: ; 2f9f +BattleRandom:: ; _BattleRandom lives in another bank. ; It handles all RNG calls in the battle engine, allowing @@ -47,10 +46,9 @@ BattleRandom:: ; 2f9f rst Bankswitch ld a, [wPredefTemp + 1] ret -; 2fb1 -RandomRange:: ; 2fb1 +RandomRange:: ; Return a random number between 0 and a (non-inclusive). push bc @@ -81,4 +79,3 @@ RandomRange:: ; 2fb1 pop bc ret -; 2fcb diff --git a/home/region.asm b/home/region.asm index 00fe1dd47e3..4cb3d47687c 100644 --- a/home/region.asm +++ b/home/region.asm @@ -1,4 +1,4 @@ -IsInJohto:: ; 2f17 +IsInJohto:: ; Return 0 if the player is in Johto, and 1 in Kanto. ld a, [wMapGroup] @@ -30,4 +30,3 @@ IsInJohto:: ; 2f17 .Kanto: ld a, 1 ret -; 2f3e diff --git a/home/rtc.asm b/home/rtc.asm index 9b8bc4ac3f8..0e555048564 100644 --- a/home/rtc.asm +++ b/home/rtc.asm @@ -1,4 +1,4 @@ -RTC:: ; 46f +RTC:: ; update time and time-sensitive palettes ; rtc enabled? @@ -13,12 +13,10 @@ RTC:: ; 46f bit 0, a ; obj update ret z -TimeOfDayPals:: ; 47e +TimeOfDayPals:: callfar _TimeOfDayPals ret -; 485 -UpdateTimePals:: ; 485 +UpdateTimePals:: callfar _UpdateTimePals ret -; 48c diff --git a/home/scrolling_menu.asm b/home/scrolling_menu.asm index cb7d7b1c549..1662f811352 100644 --- a/home/scrolling_menu.asm +++ b/home/scrolling_menu.asm @@ -1,4 +1,4 @@ -ScrollingMenu:: ; 350c +ScrollingMenu:: call CopyMenuData ld a, [hROMBank] push af @@ -15,16 +15,14 @@ ScrollingMenu:: ; 350c ld a, [wMenuJoypad] ret -; 3524 -.UpdatePalettes: ; 3524 +.UpdatePalettes: ld hl, wVramState bit 0, [hl] jp nz, UpdateTimePals jp SetPalettes -; 352f -InitScrollingMenu:: ; 352f +InitScrollingMenu:: ld a, [wMenuBorderTopCoord] dec a ld b, a @@ -41,7 +39,6 @@ InitScrollingMenu:: ; 352f call Coord2Tile pop bc jp TextBox -; 354b JoyTextDelay_ForcehJoyDown:: ; 354b joypad call DelayFrame @@ -62,4 +59,3 @@ JoyTextDelay_ForcehJoyDown:: ; 354b joypad or c ld c, a ret -; 3567 diff --git a/home/serial.asm b/home/serial.asm index c32e559dd10..663f74d3b19 100644 --- a/home/serial.asm +++ b/home/serial.asm @@ -1,4 +1,4 @@ -Serial:: ; 6ef +Serial:: ; The serial interrupt. push af @@ -87,9 +87,8 @@ Serial:: ; 6ef pop bc pop af reti -; 75f -Serial_ExchangeBytes:: ; 75f +Serial_ExchangeBytes:: ld a, $1 ld [hSerialIgnoringInitialData], a .loop @@ -123,9 +122,8 @@ Serial_ExchangeBytes:: ; 75f or c jr nz, .loop ret -; 78a -Serial_ExchangeByte:: ; 78a +Serial_ExchangeByte:: .loop xor a ld [hSerialReceivedNewData], a @@ -232,27 +230,24 @@ Serial_ExchangeByte:: ; 78a dec a jr nz, .delay_cycles ret -; 82b -CheckwLinkTimeoutFramesNonzero:: ; 82b +CheckwLinkTimeoutFramesNonzero:: push hl ld hl, wLinkTimeoutFrames ld a, [hli] or [hl] pop hl ret -; 833 -SerialDisconnected:: ; 833 +SerialDisconnected:: dec a ; a is always 0 when this is called ld [wLinkTimeoutFrames], a ld [wLinkTimeoutFrames + 1], a ret -; 83b ; This is used to exchange the button press and selected menu item on the link menu. ; The data is sent thrice and read twice to increase reliability. -Serial_ExchangeLinkMenuSelection:: ; 83b +Serial_ExchangeLinkMenuSelection:: ld hl, wPlayerLinkAction ld de, wOtherPlayerLinkMode ld c, 2 @@ -276,24 +271,21 @@ Serial_ExchangeLinkMenuSelection:: ; 83b dec c jr nz, .asm_847 ret -; 862 -Serial_PrintWaitingTextAndSyncAndExchangeNybble:: ; 862 +Serial_PrintWaitingTextAndSyncAndExchangeNybble:: call LoadTileMapToTempTileMap callfar PlaceWaitingText call WaitLinkTransfer jp Call_LoadTempTileMapToTileMap -; 871 -Serial_SyncAndExchangeNybble:: ; 871 +Serial_SyncAndExchangeNybble:: call LoadTileMapToTempTileMap callfar PlaceWaitingText jp WaitLinkTransfer -; 87d ; One "giant" leap for machinekind -WaitLinkTransfer:: ; 87d +WaitLinkTransfer:: ld a, $ff ld [wOtherPlayerLinkAction], a .loop @@ -338,9 +330,8 @@ WaitLinkTransfer:: ; 87d ld a, [wOtherPlayerLinkAction] ld [wOtherPlayerLinkMode], a ret -; 8c1 -LinkTransfer:: ; 8c1 +LinkTransfer:: push bc ld b, SERIAL_TIMECAPSULE ld a, [wLinkMode] @@ -370,9 +361,8 @@ LinkTransfer:: ; 8c1 call .Receive pop bc ret -; 8f3 -.Receive: ; 8f3 +.Receive: ld a, [hSerialReceive] ld [wOtherPlayerLinkMode], a and $f0 @@ -384,9 +374,8 @@ LinkTransfer:: ; 8c1 and $f ld [wOtherPlayerLinkAction], a ret -; 908 -LinkDataReceived:: ; 908 +LinkDataReceived:: ; Let the other system know that the data has been received. xor a ld [hSerialSend], a @@ -398,9 +387,8 @@ LinkDataReceived:: ; 908 ld a, (1 << rSC_ON) | 1 ld [rSC], a ret -; 919 -Unreferenced_Function919:: ; 919 +Unreferenced_Function919:: ld a, [wLinkMode] and a ret nz @@ -413,4 +401,3 @@ Unreferenced_Function919:: ; 919 ld a, 1 << rSC_ON ld [rSC], a ret -; 92e diff --git a/home/sine.asm b/home/sine.asm index a32a3161250..821f7c47d69 100644 --- a/home/sine.asm +++ b/home/sine.asm @@ -1,10 +1,9 @@ -Cosine:: ; 1b0f +Cosine:: ; a = d * cos(a * pi/32) add %010000 ; cos(x) = sin(x + pi/2) ; fallthrough -Sine:: ; 1b11 +Sine:: ; a = d * sin(a * pi/32) ld e, a homecall _Sine ret -; 1b1e diff --git a/home/sprite_anims.asm b/home/sprite_anims.asm index b5a3fce56c3..5f3ef82d24f 100644 --- a/home/sprite_anims.asm +++ b/home/sprite_anims.asm @@ -1,4 +1,4 @@ -PushLYOverrides:: ; 3b0c +PushLYOverrides:: ld a, [hLCDCPointer] and a ret z @@ -16,9 +16,8 @@ PushLYOverrides:: ; 3b0c ld a, (wLYOverridesEnd - wLYOverrides) / 16 ld [wRequested2bpp], a ret -; 3b2a -_InitSpriteAnimStruct:: ; 3b2a +_InitSpriteAnimStruct:: ld [wSpriteAnimIDBuffer], a ld a, [hROMBank] push af @@ -33,9 +32,8 @@ _InitSpriteAnimStruct:: ; 3b2a rst Bankswitch ret -; 3b3c -ReinitSpriteAnimFrame:: ; 3b3c +ReinitSpriteAnimFrame:: ld [wSpriteAnimIDBuffer], a ld a, [hROMBank] push af @@ -50,4 +48,3 @@ ReinitSpriteAnimFrame:: ; 3b3c rst Bankswitch ret -; 3b4e diff --git a/home/sprite_updates.asm b/home/sprite_updates.asm index 121afc87b3c..c0129d5ca31 100644 --- a/home/sprite_updates.asm +++ b/home/sprite_updates.asm @@ -9,7 +9,7 @@ DisableSpriteUpdates:: ; 0x2ed3 ret ; 0x2ee4 -EnableSpriteUpdates:: ; 2ee4 +EnableSpriteUpdates:: ld a, $1 ld [wSpriteUpdatesEnabled], a ld a, [wVramState] @@ -18,4 +18,3 @@ EnableSpriteUpdates:: ; 2ee4 ld a, $1 ld [hMapAnims], a ret -; 2ef6 diff --git a/home/sram.asm b/home/sram.asm index 4cfe14cf983..1b1a4f318b2 100644 --- a/home/sram.asm +++ b/home/sram.asm @@ -1,12 +1,11 @@ -GetSRAMBank:: ; 2fcb +GetSRAMBank:: ; load sram bank a ; if invalid bank, sram is disabled cp NUM_SRAM_BANKS jr c, OpenSRAM jr CloseSRAM -; 2fd1 -OpenSRAM:: ; 2fd1 +OpenSRAM:: ; switch to sram bank a push af ; latch clock data @@ -19,9 +18,8 @@ OpenSRAM:: ; 2fd1 pop af ld [MBC3SRamBank], a ret -; 2fe1 -CloseSRAM:: ; 2fe1 +CloseSRAM:: push af ld a, SRAM_DISABLE ; reset clock latch for next time @@ -30,4 +28,3 @@ CloseSRAM:: ; 2fe1 ld [MBC3SRamEnable], a pop af ret -; 2fec diff --git a/home/stone_queue.asm b/home/stone_queue.asm index d41db6fd768..b635cee16aa 100644 --- a/home/stone_queue.asm +++ b/home/stone_queue.asm @@ -1,4 +1,4 @@ -HandleStoneQueue:: ; 3567 +HandleStoneQueue:: ld a, [hROMBank] push af @@ -9,9 +9,8 @@ HandleStoneQueue:: ; 3567 ld a, b rst Bankswitch ret -; 3574 -.WarpAction: ; 3574 +.WarpAction: ld hl, OBJECT_MAP_OBJECT_INDEX add hl, de ld a, [hl] @@ -35,9 +34,8 @@ HandleStoneQueue:: ; 3567 .nope and a ret -; 3599 -.IsObjectOnWarp: ; 3599 +.IsObjectOnWarp: push de ld hl, OBJECT_NEXT_MAP_X @@ -56,9 +54,8 @@ HandleStoneQueue:: ; 3567 pop de ret -; 35b0 -.check_on_warp ; 35b0 +.check_on_warp ld hl, wCurrMapWarpsPointer ld a, [hli] ld h, [hl] @@ -102,9 +99,8 @@ HandleStoneQueue:: ; 3567 inc a scf ret -; 35de -.IsObjectInStoneTable: ; 35de +.IsObjectInStoneTable: inc e ld hl, CMDQUEUE_ADDR add hl, bc @@ -140,4 +136,3 @@ HandleStoneQueue:: ; 3567 .yes scf ret -; 3600 diff --git a/home/string.asm b/home/string.asm index 4922468324a..702ab50ffde 100644 --- a/home/string.asm +++ b/home/string.asm @@ -1,14 +1,13 @@ -InitString:: ; 2ef6 +InitString:: ; Init a string of length c. push hl jr _InitString -; 2ef9 -InitName:: ; 2ef9 +InitName:: ; Intended for names, so this function is limited to ten characters. push hl ld c, 10 -_InitString:: ; 2efc +_InitString:: ; if the string pointed to by hl is empty (defined as "zero or more spaces ; followed by a null"), then initialize it to the string pointed to by de. push bc @@ -34,4 +33,3 @@ _InitString:: ; 2efc pop bc pop hl ret -; 2f17 diff --git a/home/text.asm b/home/text.asm index a1f6b75ebbe..7f07d0813ac 100644 --- a/home/text.asm +++ b/home/text.asm @@ -1,4 +1,4 @@ -ClearBox:: ; fb6 +ClearBox:: ; Fill a c*b box at hl with blank tiles. ld a, " " ; fallthrough @@ -18,10 +18,9 @@ FillBoxWithByte:: dec b jr nz, .row ret -; fc8 -ClearTileMap:: ; fc8 +ClearTileMap:: ; Fill wTileMap with blank tiles. hlcoord 0, 0 @@ -34,19 +33,17 @@ ClearTileMap:: ; fc8 bit rLCDC_ENABLE, a ret z jp WaitBGMap -; fdb -ClearScreen:: ; fdb +ClearScreen:: ld a, PAL_BG_TEXT hlcoord 0, 0, wAttrMap ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call ByteFill jr ClearTileMap -; fe8 -TextBox:: ; fe8 +TextBox:: ; Draw a text box at hl with room for b lines of c characters each. ; Places a border around the textbox, then switches the palette to the ; text black-and-white scheme. @@ -56,10 +53,9 @@ TextBox:: ; fe8 pop hl pop bc jr TextBoxPalette -; ff1 -TextBoxBorder:: ; ff1 +TextBoxBorder:: ; Top push hl @@ -96,9 +92,8 @@ TextBoxBorder:: ; ff1 ld [hl], "┘" ret -; 101e -.PlaceChars: ; 101e +.PlaceChars: ; Place char a c times. ld d, c .loop @@ -106,10 +101,9 @@ TextBoxBorder:: ; ff1 dec d jr nz, .loop ret -; 1024 -TextBoxPalette:: ; 1024 +TextBoxPalette:: ; Fill text box width c height b at hl with pal 7 ld de, wAttrMap - wTileMap add hl, de @@ -132,58 +126,52 @@ TextBoxPalette:: ; 1024 dec b jr nz, .col ret -; 103e -SpeechTextBox:: ; 103e +SpeechTextBox:: ; Standard textbox. hlcoord TEXTBOX_X, TEXTBOX_Y ld b, TEXTBOX_INNERH ld c, TEXTBOX_INNERW jp TextBox -; 1048 -TestText:: ; 1048 +TestText:: text "ゲームフりーク!" done -; 1052 -RadioTerminator:: ; 1052 +RadioTerminator:: ld hl, .stop ret .stop db "@" -; 1057 -PrintText:: ; 1057 +PrintText:: call SetUpTextBox -BuenaPrintText:: ; 105a +BuenaPrintText:: push hl hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW call ClearBox pop hl -PrintTextBoxText:: ; 1065 +PrintTextBoxText:: bccoord TEXTBOX_INNERX, TEXTBOX_INNERY call PlaceHLTextAtBC ret -; 106c -SetUpTextBox:: ; 106c +SetUpTextBox:: push hl call SpeechTextBox call UpdateSprites call ApplyTilemap pop hl ret -; 1078 -PlaceString:: ; 1078 +PlaceString:: push hl -PlaceNextChar:: ; 1079 +PlaceNextChar:: ld a, [de] cp "@" jr nz, CheckDict @@ -193,11 +181,11 @@ PlaceNextChar:: ; 1079 ret pop de -NextChar:: ; 1083 +NextChar:: inc de jp PlaceNextChar -CheckDict:: ; 1087 +CheckDict:: dict: MACRO if \1 == 0 and a @@ -299,12 +287,11 @@ ENDM ; 0x117b -DayOfWeekChar:: ; 117b +DayOfWeekChar:: ld c, l ld b, h farcall Function17f036 jp PlaceNextChar -; 1186 print_name: MACRO @@ -313,35 +300,35 @@ print_name: MACRO jp PlaceCommandCharacter ENDM -PrintMomsName: print_name wMomsName ; 1186 -PrintPlayerName: print_name wPlayerName ; 118d -PrintRivalName: print_name wRivalName ; 1194 -PrintRedsName: print_name wRedsName ; 119b -PrintGreensName: print_name wGreensName ; 11a2 - -TrainerChar: print_name TrainerCharText ; 11a9 -TMChar: print_name TMCharText ; 11b0 -PCChar: print_name PCCharText ; 11b7 -RocketChar: print_name RocketCharText ; 11be -PlacePOKe: print_name PlacePOKeText ; 11c5 -PlaceKougeki: print_name KougekiText ; 11cc -SixDotsChar: print_name SixDotsCharText ; 11d3 -PlacePKMN: print_name PlacePKMNText ; 11da -PlacePOKE: print_name PlacePOKEText ; 11e1 -PlaceJPRoute: print_name PlaceJPRouteText ; 11e8 -PlaceWatashi: print_name PlaceWatashiText ; 11ef -PlaceKokoWa: print_name PlaceKokoWaText ; 11f6 - - -PlaceMoveTargetsName:: ; 11fd +PrintMomsName: print_name wMomsName +PrintPlayerName: print_name wPlayerName +PrintRivalName: print_name wRivalName +PrintRedsName: print_name wRedsName +PrintGreensName: print_name wGreensName + +TrainerChar: print_name TrainerCharText +TMChar: print_name TMCharText +PCChar: print_name PCCharText +RocketChar: print_name RocketCharText +PlacePOKe: print_name PlacePOKeText +PlaceKougeki: print_name KougekiText +SixDotsChar: print_name SixDotsCharText +PlacePKMN: print_name PlacePKMNText +PlacePOKE: print_name PlacePOKEText +PlaceJPRoute: print_name PlaceJPRouteText +PlaceWatashi: print_name PlaceWatashiText +PlaceKokoWa: print_name PlaceKokoWaText + + +PlaceMoveTargetsName:: ld a, [hBattleTurn] xor 1 jr PlaceMoveUsersName.place -PlaceMoveUsersName:: ; 1203 +PlaceMoveUsersName:: ld a, [hBattleTurn] -.place: ; 1205 +.place: push de and a jr nz, .enemy @@ -358,7 +345,7 @@ PlaceMoveUsersName:: ; 1203 jr PlaceCommandCharacter -PlaceEnemysName:: ; 121b +PlaceEnemysName:: push de ld a, [wLinkMode] @@ -392,7 +379,7 @@ PlaceEnemysName:: ; 121b jr PlaceCommandCharacter -PlaceGenderedPlayerName:: ; 1252 +PlaceGenderedPlayerName:: push de ld de, wPlayerName call PlaceString @@ -406,7 +393,7 @@ PlaceGenderedPlayerName:: ; 1252 jr PlaceCommandCharacter -PlaceCommandCharacter:: ; 126a +PlaceCommandCharacter:: call PlaceString ld h, b ld l, c @@ -431,25 +418,22 @@ PlaceWatashiText:: PlaceKokoWaText:: db "@" KunSuffixText:: db "@" ChanSuffixText:: db "@" -; 12a7 -NextLineChar:: ; 12a7 +NextLineChar:: pop hl ld bc, SCREEN_WIDTH * 2 add hl, bc push hl jp NextChar -; 12b0 -LineBreakChar:: ; 12b0 +LineBreakChar:: pop hl ld bc, SCREEN_WIDTH add hl, bc push hl jp NextChar -; 12b9 -TextFar:: ; 12b9 +TextFar:: pop hl push de ld bc, -wTileMap + $10000 @@ -489,17 +473,16 @@ TextFar:: ; 12b9 add hl, bc push hl jp NextChar -; 12ea -LineChar:: ; 12ea +LineChar:: pop hl hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 push hl jp NextChar ; 0x12f2 -Paragraph:: ; 12f2 +Paragraph:: push de ld a, [wLinkMode] @@ -521,10 +504,9 @@ Paragraph:: ; 12f2 hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY pop de jp NextChar -; 131f -_ContText:: ; 131f +_ContText:: ld a, [wLinkMode] or a jr nz, .communication @@ -542,17 +524,16 @@ _ContText:: ; 131f call z, UnloadBlinkingCursor ; fallthrough -_ContTextNoPause:: ; 1337 +_ContTextNoPause:: push de call TextScroll call TextScroll hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 pop de jp NextChar -; 1345 -ContText:: ; 1345 +ContText:: push de ld de, .cont ld b, h @@ -564,18 +545,16 @@ ContText:: ; 1345 jp NextChar .cont: db "<_CONT>@" -; 1356 -PlaceDexEnd:: ; 1356 +PlaceDexEnd:: ; Ends a Pokédex entry in Gen 1. ; Dex entries are now regular strings. ld [hl], "." pop hl ret -; 135a -PromptText:: ; 135a +PromptText:: ld a, [wLinkMode] cp LINK_COLOSSEUM jr z, .ok @@ -593,23 +572,21 @@ PromptText:: ; 135a jr z, DoneText call UnloadBlinkingCursor -DoneText:: ; 137c +DoneText:: pop hl ld de, .stop dec de ret .stop: db "@" -; 1383 -NullChar:: ; 1383 +NullChar:: ld a, "?" ld [hli], a call PrintLetterDelay jp NextChar -; 138c -TextScroll:: ; 138c +TextScroll:: hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY decoord TEXTBOX_INNERX, TEXTBOX_INNERY - 1 ld a, TEXTBOX_INNERH - 1 @@ -640,9 +617,8 @@ TextScroll:: ; 138c ld c, 5 call DelayFrames ret -; 13b6 -Text_WaitBGMap:: ; 13b6 +Text_WaitBGMap:: push bc ld a, [hOAMUpdate] push af @@ -655,25 +631,21 @@ Text_WaitBGMap:: ; 13b6 ld [hOAMUpdate], a pop bc ret -; 13c6 -Diacritic:: ; 13c6 +Diacritic:: ret -; 13c7 -LoadBlinkingCursor:: ; 13c7 +LoadBlinkingCursor:: ld a, "▼" ldcoord_a 18, 17 ret -; 13cd -UnloadBlinkingCursor:: ; 13cd +UnloadBlinkingCursor:: lda_coord 17, 17 ldcoord_a 18, 17 ret -; 13d4 -FarString:: ; 13d4 +FarString:: ld b, a ld a, [hROMBank] push af @@ -685,17 +657,15 @@ FarString:: ; 13d4 pop af rst Bankswitch ret -; 13e0 -PokeFluteTerminatorCharacter:: ; 13e0 +PokeFluteTerminatorCharacter:: ld hl, .stop ret .stop: db "@" -; 13e5 -PlaceHLTextAtBC:: ; 13e5 +PlaceHLTextAtBC:: ld a, [wTextBoxFlags] push af set NO_TEXT_DELAY_F, a @@ -706,9 +676,8 @@ PlaceHLTextAtBC:: ; 13e5 pop af ld [wTextBoxFlags], a ret -; 13f6 -DoTextUntilTerminator:: ; 13f6 +DoTextUntilTerminator:: ld a, [hli] cp "@" ret z @@ -732,9 +701,8 @@ DoTextUntilTerminator:: ; 13f6 ; jp de push de ret -; 1410 -TextCommands:: ; 1410 +TextCommands:: ; entries correspond to TX_* constants (see macros/scripts/text.asm) dw Text_TX ; TX_START dw Text_TX_RAM ; TX_RAM @@ -759,9 +727,8 @@ TextCommands:: ; 1410 dw Text_TX_STRINGBUFFER ; TX_STRINGBUFFER dw Text_TX_DAY ; TX_DAY dw Text_TX_FAR ; TX_FAR -; 143e -Text_TX:: ; 143e +Text_TX:: ; TX ; write text until "@" ; [$00]["...@"] @@ -775,9 +742,8 @@ Text_TX:: ; 143e ld l, e inc hl ret -; 1449 -Text_TX_RAM:: ; 1449 +Text_TX_RAM:: ; text_from_ram ; write text from a ram address ; little endian @@ -793,9 +759,8 @@ Text_TX_RAM:: ; 1449 call PlaceString pop hl ret -; 1455 -Text_TX_FAR:: ; 1455 +Text_TX_FAR:: ; text_jump ; write text from a different bank ; little endian @@ -823,9 +788,8 @@ Text_TX_FAR:: ; 1455 ld [hROMBank], a ld [MBC3RomBank], a ret -; 1470 -Text_TX_BCD:: ; 1470 +Text_TX_BCD:: ; TX_BCD ; write bcd from address, typically ram ; [$02][addr][flags] @@ -845,9 +809,8 @@ Text_TX_BCD:: ; 1470 ld c, l pop hl ret -; 1480 -Text_TX_MOVE:: ; 1480 +Text_TX_MOVE:: ; TX_MOVE ; move to a new tile ; [$03][addr] @@ -859,9 +822,8 @@ Text_TX_MOVE:: ; 1480 ld [wMenuScrollPosition + 2 + 1], a ld b, a ret -; 148b -Text_TX_BOX:: ; 148b +Text_TX_BOX:: ; TX_BOX ; draw a box ; little endian @@ -881,18 +843,16 @@ Text_TX_BOX:: ; 148b call TextBox pop hl ret -; 149b -Text_TX_LOW:: ; 149b +Text_TX_LOW:: ; TX_LOW ; write text at (1,16) ; [$05] bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 ret -; 149f -Text_WAIT_BUTTON:: ; 149f +Text_WAIT_BUTTON:: ; TX_WAITBUTTON ; wait for button press ; show arrow @@ -912,9 +872,8 @@ Text_WAIT_BUTTON:: ; 149f call UnloadBlinkingCursor pop hl ret -; 14ba -Text_TX_SCROLL:: ; 14ba +Text_TX_SCROLL:: ; pushes text up two lines and sets the BC cursor to the border tile ; below the first character column of the text box. push hl @@ -924,9 +883,8 @@ Text_TX_SCROLL:: ; 14ba pop hl bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 ret -; 14c9 -Text_START_ASM:: ; 14c9 +Text_START_ASM:: ; TX_ASM bit 7, h @@ -937,9 +895,8 @@ Text_START_ASM:: ; 14c9 ld a, "@" ld [hl], a ret -; 14d2 -Text_TX_NUM:: ; 14d2 +Text_TX_NUM:: ; TX_NUM ; [$09][addr][hi:bytes lo:digits] ld a, [hli] @@ -963,9 +920,8 @@ Text_TX_NUM:: ; 14d2 ld c, l pop hl ret -; 14ed -Text_TX_EXIT:: ; 14ed +Text_TX_EXIT:: push hl push bc call GetJoypad @@ -978,9 +934,8 @@ Text_TX_EXIT:: ; 14ed pop bc pop hl ret -; 1500 -Text_PlaySound:: ; 1500 +Text_PlaySound:: ; chars: ; $0b, $0e, $0f, $10, $11, $12, $13 ; see TextSFX @@ -1014,9 +969,8 @@ Text_PlaySound:: ; 1500 pop hl pop bc ret -; 1522 -Unreferenced_Function1522:: ; 1522 +Unreferenced_Function1522:: ; TX_CRY push de ld e, [hl] @@ -1027,9 +981,8 @@ Unreferenced_Function1522:: ; 1522 pop hl pop bc ret -; 152d -TextSFX:: ; 152d +TextSFX:: dbw TX_SOUND_DEX_FANFARE_50_79, SFX_DEX_FANFARE_50_79 dbw TX_SOUND_FANFARE, SFX_FANFARE dbw TX_SOUND_DEX_FANFARE_20_49, SFX_DEX_FANFARE_20_49 @@ -1038,9 +991,8 @@ TextSFX:: ; 152d dbw TX_SOUND_DEX_FANFARE_80_109, SFX_DEX_FANFARE_80_109 dbw TX_SOUND_SLOT_MACHINE_START, SFX_SLOT_MACHINE_START db -1 -; 1543 -Text_TX_DOTS:: ; 1543 +Text_TX_DOTS:: ; [$0C][num] ld a, [hli] ld d, a @@ -1067,9 +1019,8 @@ Text_TX_DOTS:: ; 1543 ld c, l pop hl ret -; 1562 -Text_LINK_WAIT_BUTTON:: ; 1562 +Text_LINK_WAIT_BUTTON:: ; wait for key down ; display arrow push hl @@ -1078,9 +1029,8 @@ Text_LINK_WAIT_BUTTON:: ; 1562 pop bc pop hl ret -; 156a -Text_TX_STRINGBUFFER:: ; 156a +Text_TX_STRINGBUFFER:: ; Print a string from one of the following: ; 0: wStringBuffer3 ; 1: wStringBuffer4 @@ -1107,9 +1057,8 @@ Text_TX_STRINGBUFFER:: ; 156a call PlaceString pop hl ret -; 1582 -Text_TX_DAY:: ; 1582 +Text_TX_DAY:: ; TX_DAY call GetWeekday @@ -1134,7 +1083,7 @@ Text_TX_DAY:: ; 1582 pop hl ret -.Days: ; 15a2 +.Days: dw .Sun dw .Mon dw .Tues @@ -1151,4 +1100,3 @@ Text_TX_DAY:: ; 1582 .Fri: db "FRI@" .Satur: db "SATUR@" .Day: db "DAY@" -; 15d8 diff --git a/home/tilemap.asm b/home/tilemap.asm index 926ed8ac4ef..4ed05155aea 100644 --- a/home/tilemap.asm +++ b/home/tilemap.asm @@ -1,6 +1,6 @@ -ClearBGPalettes:: ; 31f3 +ClearBGPalettes:: call ClearPalettes -WaitBGMap:: ; 31f6 +WaitBGMap:: ; Tell VBlank to update BG Map ld a, 1 ; BG Map 0 tiles ld [hBGMapMode], a @@ -8,7 +8,6 @@ WaitBGMap:: ; 31f6 ld c, 4 call DelayFrames ret -; 3200 WaitBGMap2:: ; 0x3200 ld a, [hCGB] @@ -28,13 +27,12 @@ WaitBGMap2:: ; 0x3200 ret ; 0x3218 -IsCGB:: ; 3218 +IsCGB:: ld a, [hCGB] and a ret -; 321c -ApplyTilemap:: ; 321c +ApplyTilemap:: ld a, [hCGB] and a jr z, .dmg @@ -54,23 +52,20 @@ ApplyTilemap:: ; 321c ld c, 4 call DelayFrames ret -; 3238 -CGBOnly_CopyTilemapAtOnce:: ; 3238 +CGBOnly_CopyTilemapAtOnce:: ld a, [hCGB] and a jr z, WaitBGMap -CopyTilemapAtOnce:: ; 323d +CopyTilemapAtOnce:: jr .CopyTilemapAtOnce -; 323f ; unused farcall HDMATransferAttrMapAndTileMapToWRAMBank3 ret -; 3246 -.CopyTilemapAtOnce: ; 3246 +.CopyTilemapAtOnce: ld a, [hBGMapMode] push af xor a @@ -107,9 +102,8 @@ CopyTilemapAtOnce:: ; 323d pop af ld [hBGMapMode], a ret -; 327b -.StackPointerMagic: ; 327b +.StackPointerMagic: ; Copy all tiles to vBGMap ld [hSPBuffer], sp ld sp, hl @@ -149,9 +143,8 @@ endr ld h, a ld sp, hl ret -; 32f9 -SetPalettes:: ; 32f9 +SetPalettes:: ; Inits the Palettes ; depending on the system the monochromes palettes or color palettes ld a, [hCGB] @@ -172,9 +165,8 @@ SetPalettes:: ; 32f9 call DmgToCgbObjPals pop de ret -; 3317 -ClearPalettes:: ; 3317 +ClearPalettes:: ; Make all palettes white ; CGB: make all the palette colors white @@ -209,11 +201,10 @@ ClearPalettes:: ; 3317 ld a, 1 ld [hCGBPalUpdate], a ret -; 333e -GetMemSGBLayout:: ; 333e +GetMemSGBLayout:: ld b, SCGB_RAM -GetSGBLayout:: ; 3340 +GetSGBLayout:: ; load sgb packets unless dmg ld a, [hCGB] @@ -226,4 +217,3 @@ GetSGBLayout:: ; 3340 .sgb predef_jump LoadSGBLayout -; 334e diff --git a/home/time.asm b/home/time.asm index f007fd1db72..abac80e76f3 100644 --- a/home/time.asm +++ b/home/time.asm @@ -1,7 +1,7 @@ ; Functions relating to the timer interrupt and the real-time-clock. -AskTimer:: ; 591 +AskTimer:: push af ld a, [hMobile] and a @@ -11,29 +11,26 @@ AskTimer:: ; 591 .not_mobile pop af reti -; 59c -LatchClock:: ; 59c +LatchClock:: ; latch clock counter data ld a, 0 ld [MBC3LatchClock], a ld a, 1 ld [MBC3LatchClock], a ret -; 5a7 -UpdateTime:: ; 5a7 +UpdateTime:: call GetClock call FixDays call FixTime farcall GetTimeOfDay ret -; 5b7 -GetClock:: ; 5b7 +GetClock:: ; store clock data in hRTCDayHi-hRTCSeconds ; enable clock r/w @@ -72,10 +69,9 @@ GetClock:: ; 5b7 ; unlatch clock / disable clock r/w call CloseSRAM ret -; 5e8 -FixDays:: ; 5e8 +FixDays:: ; fix day count ; mod by 140 @@ -134,10 +130,9 @@ FixDays:: ; 5e8 .quit xor a ret -; 61d -FixTime:: ; 61d +FixTime:: ; add ingame time (set at newgame) to current time ; day hr min sec ; store time in wCurDay, hHours, hMinutes, hSeconds @@ -185,16 +180,15 @@ FixTime:: ; 61d adc c ld [wCurDay], a ret -; 658 -InitTimeOfDay:: ; 658 +InitTimeOfDay:: xor a ld [wStringBuffer2], a ld a, $0 ; useless ld [wStringBuffer2 + 3], a jr InitTime -InitDayOfWeek:: ; 663 +InitDayOfWeek:: call UpdateTime ld a, [hHours] ld [wStringBuffer2 + 1], a @@ -204,20 +198,18 @@ InitDayOfWeek:: ; 663 ld [wStringBuffer2 + 3], a jr InitTime ; useless -InitTime:: ; 677 +InitTime:: farcall _InitTime ret -; 67e -PanicResetClock:: ; 67e +PanicResetClock:: call .ClearhRTC call SetClock ret -; 685 -.ClearhRTC: ; 685 +.ClearhRTC: xor a ld [hRTCSeconds], a ld [hRTCMinutes], a @@ -225,10 +217,9 @@ PanicResetClock:: ; 67e ld [hRTCDayLo], a ld [hRTCDayHi], a ret -; 691 -SetClock:: ; 691 +SetClock:: ; set clock data from hram ; enable clock r/w @@ -274,10 +265,9 @@ SetClock:: ; 691 ; cleanup call CloseSRAM ; unlatch clock, disable clock r/w ret -; 6c4 -ClearRTCStatus:: ; 6c4 +ClearRTCStatus:: ; clear sRTCStatusFlags xor a push af @@ -287,9 +277,8 @@ ClearRTCStatus:: ; 6c4 ld [sRTCStatusFlags], a call CloseSRAM ret -; 6d3 -RecordRTCStatus:: ; 6d3 +RecordRTCStatus:: ; append flags to sRTCStatusFlags ld hl, sRTCStatusFlags push af @@ -300,13 +289,11 @@ RecordRTCStatus:: ; 6d3 ld [hl], a call CloseSRAM ret -; 6e3 -CheckRTCStatus:: ; 6e3 +CheckRTCStatus:: ; check sRTCStatusFlags ld a, BANK(sRTCStatusFlags) call GetSRAMBank ld a, [sRTCStatusFlags] call CloseSRAM ret -; 6ef diff --git a/home/trainers.asm b/home/trainers.asm index 337c67709e0..e9c1c71679d 100644 --- a/home/trainers.asm +++ b/home/trainers.asm @@ -1,4 +1,4 @@ -CheckTrainerBattle2:: ; 3600 +CheckTrainerBattle2:: ld a, [hROMBank] push af @@ -9,9 +9,8 @@ CheckTrainerBattle2:: ; 3600 ld a, b rst Bankswitch ret -; 360d -CheckTrainerBattle:: ; 360d +CheckTrainerBattle:: ; Check if any trainer on the map sees the player and wants to battle. ; Skip the player object. @@ -101,15 +100,14 @@ CheckTrainerBattle:: ; 360d ld a, c ld [wEngineBuffer3], a jr LoadTrainer_continue -; 3674 -TalkToTrainer:: ; 3674 +TalkToTrainer:: ld a, 1 ld [wEngineBuffer2], a ld a, -1 ld [wEngineBuffer3], a -LoadTrainer_continue:: ; 367e +LoadTrainer_continue:: call GetMapScriptsBank ld [wEngineBuffer1], a @@ -128,9 +126,8 @@ LoadTrainer_continue:: ; 367e ld [wRunningTrainerBattleScript], a scf ret -; 36a5 -FacingPlayerDistance_bc:: ; 36a5 +FacingPlayerDistance_bc:: push de call FacingPlayerDistance @@ -138,9 +135,8 @@ FacingPlayerDistance_bc:: ; 36a5 ld c, e pop de ret -; 36ad -FacingPlayerDistance:: ; 36ad +FacingPlayerDistance:: ; Return carry if the sprite at bc is facing the player, ; and its distance in d. @@ -208,9 +204,8 @@ FacingPlayerDistance:: ; 36ad .NotFacing: and a ret -; 36f5 -CheckTrainerFlag:: ; 36f5 +CheckTrainerFlag:: push bc ld hl, OBJECT_MAP_OBJECT_INDEX add hl, bc @@ -233,9 +228,8 @@ CheckTrainerFlag:: ; 36f5 and a pop bc ret -; 3718 -PrintWinLossText:: ; 3718 +PrintWinLossText:: ld a, [wBattleType] cp BATTLETYPE_CANLOSE jr .canlose ; ?????????? @@ -260,4 +254,3 @@ PrintWinLossText:: ; 3718 call WaitBGMap call WaitPressAorB_BlinkCursor ret -; 3741 diff --git a/home/vblank.asm b/home/vblank.asm index 3b33b1ec56e..3ae030ace67 100644 --- a/home/vblank.asm +++ b/home/vblank.asm @@ -7,7 +7,7 @@ ; This prevents the display and audio output from lagging. -VBlank:: ; 283 +VBlank:: push af push bc push de @@ -34,9 +34,8 @@ VBlank:: ; 283 pop bc pop af reti -; 2a1 -.VBlanks: ; 2a1 +.VBlanks: dw VBlank0 dw VBlank1 dw VBlank2 @@ -45,10 +44,9 @@ VBlank:: ; 283 dw VBlank5 dw VBlank6 dw VBlank0 ; just in case -; 2b1 -VBlank0:: ; 2b1 +VBlank0:: ; normal operation ; rng @@ -148,10 +146,9 @@ VBlank0:: ; 2b1 ld [hSecondsBackup], a ret -; 325 -VBlank2:: ; 325 +VBlank2:: ; sound only ld a, [hROMBank] @@ -167,10 +164,9 @@ VBlank2:: ; 325 xor a ld [wVBlankOccurred], a ret -; 337 -VBlank1:: ; 337 +VBlank1:: ; scx, scy ; palettes ; bg map @@ -235,10 +231,9 @@ VBlank1:: ; 337 ld a, b ld [rIF], a ret -; 37f -UpdatePals:: ; 37f +UpdatePals:: ; update pals for either dmg or cgb ld a, [hCGB] @@ -255,10 +250,9 @@ UpdatePals:: ; 37f and a ret -; 396 -VBlank3:: ; 396 +VBlank3:: ; scx, scy ; palettes ; bg map @@ -321,10 +315,9 @@ VBlank3:: ; 396 ld a, b ld [rIF], a ret -; 3df -VBlank4:: ; 3df +VBlank4:: ; bg map ; tiles ; oam @@ -354,10 +347,9 @@ VBlank4:: ; 3df ld a, [hROMBankBackup] rst Bankswitch ret -; 400 -VBlank5:: ; 400 +VBlank5:: ; scx ; palettes ; bg map @@ -404,10 +396,9 @@ VBlank5:: ; 400 ld a, %1111 ; serial timer lcdstat vblank ld [rIE], a ret -; 436 -VBlank6:: ; 436 +VBlank6:: ; palettes ; tiles ; dma transfer @@ -438,4 +429,3 @@ VBlank6:: ; 436 ld a, [hROMBankBackup] rst Bankswitch ret -; 45a diff --git a/home/video.asm b/home/video.asm index 1066197fff8..434783ba174 100644 --- a/home/video.asm +++ b/home/video.asm @@ -1,6 +1,6 @@ ; Functions dealing with VRAM. -DMATransfer:: ; 15d8 +DMATransfer:: ; Return carry if the transfer is completed. ld a, [hDMATransfer] @@ -16,10 +16,9 @@ DMATransfer:: ; 15d8 ld [hDMATransfer], a scf ret -; 15e3 -UpdateBGMapBuffer:: ; 15e3 +UpdateBGMapBuffer:: ; Copy [hBGMapTileCount] 16x8 tiles from wBGMapBuffer ; to bg map addresses in wBGMapBufferPtrs. @@ -97,10 +96,9 @@ endr ld [hBGMapUpdate], a scf ret -; 163a -WaitTop:: ; 163a +WaitTop:: ; Wait until the top third of the BG Map is being updated. ld a, [hBGMapMode] @@ -118,10 +116,9 @@ WaitTop:: ; 163a xor a ld [hBGMapMode], a ret -; 164c -UpdateBGMap:: ; 164c +UpdateBGMap:: ; Update the BG Map, in thirds, from wTileMap and wAttrMap. ld a, [hBGMapMode] @@ -279,10 +276,9 @@ endr ld h, a ld sp, hl ret -; 170a -Serve1bppRequest:: ; 170a +Serve1bppRequest:: ; Only call during the first fifth of VBlank ld a, [wRequested1bpp] @@ -360,10 +356,9 @@ endr ld h, a ld sp, hl ret -; 1769 -Serve2bppRequest:: ; 1769 +Serve2bppRequest:: ; Only call during the first fifth of VBlank ld a, [wRequested2bpp] @@ -379,13 +374,13 @@ Serve2bppRequest:: ; 1769 jr _Serve2bppRequest -Serve2bppRequest_VBlank:: ; 1778 +Serve2bppRequest_VBlank:: ld a, [wRequested2bpp] and a ret z -_Serve2bppRequest:: ; 177d +_Serve2bppRequest:: ; Copy [wRequested2bpp] 2bpp tiles from [wRequested2bppSource] to [wRequested2bppDest] ld [hSPBuffer], sp @@ -442,10 +437,9 @@ endr ld h, a ld sp, hl ret -; 17d3 -AnimateTileset:: ; 17d3 +AnimateTileset:: ; Only call during the first fifth of VBlank ld a, [hMapAnims] @@ -483,4 +477,3 @@ AnimateTileset:: ; 17d3 pop af rst Bankswitch ret -; 17ff diff --git a/home/window.asm b/home/window.asm index f3a646f9a46..f288e4eec30 100644 --- a/home/window.asm +++ b/home/window.asm @@ -1,4 +1,4 @@ -RefreshScreen:: ; 2dba +RefreshScreen:: call ClearWindowData ld a, [hROMBank] push af @@ -12,10 +12,9 @@ RefreshScreen:: ; 2dba pop af rst Bankswitch ret -; 2dcf -CloseText:: ; 2dcf +CloseText:: ld a, [hOAMUpdate] push af ld a, $1 @@ -28,9 +27,8 @@ CloseText:: ; 2dcf ld hl, wVramState res 6, [hl] ret -; 2de2 -.CloseText: ; 2de2 +.CloseText: call ClearWindowData xor a ld [hBGMapMode], a @@ -45,9 +43,8 @@ CloseText:: ; 2dcf farcall ReturnFromMapSetupScript farcall LoadOverworldFont ret -; 2e08 -OpenText:: ; 2e08 +OpenText:: call ClearWindowData ld a, [hROMBank] push af @@ -62,9 +59,8 @@ OpenText:: ; 2e08 rst Bankswitch ret -; 2e20 -_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 2e20 +_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ld a, [hOAMUpdate] push af ld a, $1 @@ -75,9 +71,8 @@ _OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 2e20 pop af ld [hOAMUpdate], a ret -; 2e31 -SafeUpdateSprites:: ; 2e31 +SafeUpdateSprites:: ld a, [hOAMUpdate] push af ld a, [hBGMapMode] @@ -101,4 +96,3 @@ SafeUpdateSprites:: ; 2e31 ; unused scf ret -; 2e50 diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm index a2ac008ca77..3e3657f7e4a 100644 --- a/lib/mobile/main.asm +++ b/lib/mobile/main.asm @@ -7,7 +7,7 @@ INCLUDE "constants/hardware_constants.asm" SECTION "Mobile Adapter SDK", ROMX -Function110000: ; 110000 (44:4000) +Function110000: ; Copy b bytes from hl to de .loop ld a, [hli] @@ -16,9 +16,8 @@ Function110000: ; 110000 (44:4000) dec b jr nz, .loop ret -; 110007 (44:4007) -Function110007: ; 110007 +Function110007: ; Copy bytes from hl to de until a 0 is encountered. ; Include the 0 in the copy, and count the number of ; nonzero bytes copied. Keep the de pointer at the @@ -31,9 +30,8 @@ Function110007: ; 110007 inc de inc bc jr .loop -; 11000f -Function11000f: ; 11000f +Function11000f: ; Copy bytes from hl to de until a 0 is encountered, ; or a bytes have been copied, whichever comes first. ; Add the byte count to the count previously stored @@ -63,9 +61,8 @@ Function11000f: ; 11000f adc 0 ld b, a ret -; 110029 -Function110029: ; 110029 (44:4029) +Function110029: ; Clear two bytes at $ca3a. xor a ld hl, $ca3a @@ -73,7 +70,7 @@ Function110029: ; 110029 (44:4029) ld [hl], a ret -Function110030:: ; 110030 (44:4030) +Function110030:: ; Use the byte at $c988 as a parameter ; for a dw. ; If [$c988] not in {12, 14, 16}, @@ -121,9 +118,8 @@ Function110030:: ; 110030 (44:4030) ld h, [hl] ld l, a ret ; indirectly jump to the function loaded from the dw, which returns to Function3e60. -; 110070 (44:4070) -.dw ; 110070 +.dw dw Function110115 dw Function110236 dw Function110291 @@ -158,9 +154,8 @@ Function110030:: ; 110030 (44:4030) dw Function1103ac dw Function110235 dw Function111540 -; 1100b4 -Function1100b4: ; 1100b4 (44:40b4) +Function1100b4: push bc .loop di @@ -187,9 +182,8 @@ Function1100b4: ; 1100b4 (44:40b4) .done pop bc ret -; 1100dc (44:40dc) -Function1100dc: ; 1100dc +Function1100dc: xor a ld [rTAC], a ld e, c @@ -225,9 +219,8 @@ Function1100dc: ; 1100dc ld a, $6 ld [$ff00+c], a ret -; 110115 -Function110115: ; 110115 +Function110115: ld hl, $c821 bit 1, [hl] jr nz, .asm_110120 @@ -384,27 +377,24 @@ Function110115: ; 110115 ld h, [hl] ld l, a jp .asm_11015b -; 110226 -Function110226: ; 110226 (44:4226) +Function110226: ld a, $21 -Function110228: ; 110228 +Function110228: ld [$c80f], a ld hl, $c821 set 1, [hl] ret -; 110231 (44:4231) -Function110231: ; 110231 +Function110231: ld a, $20 jr Function110228 -; 110235 -Function110235: ; 110235 +Function110235: nop -Function110236: ; 110236 +Function110236: ld a, [$c988] push af push bc @@ -459,9 +449,8 @@ Function110236: ; 110236 .asm_11028b ld [$c86a], a jp Function110432 -; 110291 -Function110291: ; 110291 +Function110291: ld a, [$c821] bit 1, a jr z, .asm_1102a6 @@ -554,9 +543,8 @@ Function110291: ; 110291 res 1, [hl] set 0, [hl] ret -; 11032c -Function11032c: ; 11032c +Function11032c: ld a, [$c821] bit 1, a jp nz, Function110226 @@ -613,17 +601,15 @@ Function11032c: ; 11032c ld a, $2d ld [$c86a], a jp Function110432 -; 110393 -Function110393: ; 110393 +Function110393: ld c, LOW(rIE) ld a, [$ff00+c] or $c ld [$ff00+c], a ret -; 11039a -Function11039a: ; 11039a +Function11039a: ld b, $0 .asm_11039c inc b @@ -642,9 +628,8 @@ Function11039a: ; 11039a .asm_1103aa scf ret -; 1103ac -Function1103ac: ; 1103ac +Function1103ac: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -713,13 +698,12 @@ Function1103ac: ; 1103ac ld a, $b ld [$c86a], a -Function110432: ; 110432 +Function110432: ld hl, $c821 set 0, [hl] ret -; 110438 -Function110438: ; 110438 +Function110438: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -759,9 +743,8 @@ Function110438: ; 110438 ld a, $c ld [$c86a], a jr Function110432 -; 110485 -Function110485: ; 110485 +Function110485: ld de, $cb47 ld hl, Unknown_11201d ld b, $6 @@ -787,9 +770,8 @@ Function110485: ; 110485 ld a, c ld [$cb4c], a ret -; 1104b0 -Function1104b0: ; 1104b0 +Function1104b0: xor a ld [$c81e], a call Function110393 @@ -799,9 +781,8 @@ Function1104b0: ; 1104b0 ld hl, Unknown_112000 ld b, $1 jp Function111f07 -; 1104c6 -Function1104c6: ; 1104c6 +Function1104c6: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -886,33 +867,29 @@ Function1104c6: ; 1104c6 ld a, $e ld [$c86a], a jp Function110432 -; 110578 -Function110578: ; 110578 +Function110578: ld b, $25 call Function110596 or a jp nz, Function1135ba ret -; 110582 -Function110582: ; 110582 +Function110582: ld b, $26 call Function110596 or a jp nz, Function11359d ret -; 11058c -Function11058c: ; 11058c +Function11058c: ld b, $27 call Function110596 or a jp nz, Function1135ad ret -; 110596 -Function110596: ; 110596 +Function110596: ld a, [$c821] bit 0, a jr nz, .asm_1105d9 @@ -949,9 +926,8 @@ Function110596: ; 110596 .asm_1105d9 pop hl jp Function110226 -; 1105dd -Function1105dd: ; 1105dd +Function1105dd: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -979,9 +955,8 @@ Function1105dd: ; 1105dd ld a, $d ld [$c86a], a jp Function110432 -; 110615 -Function110615: ; 110615 +Function110615: ld b, $15 ld [$c86e], a or a @@ -1102,9 +1077,8 @@ Function110615: ; 110615 ld a, $50 ld b, $40 jp .asm_110631 -; 1106ef -Function1106ef: ; 1106ef +Function1106ef: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -1158,9 +1132,8 @@ Function1106ef: ; 1106ef call Function11295e ld a, $0 jp Function110615 -; 110757 -Function110757: ; 110757 +Function110757: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -1243,9 +1216,8 @@ Function110757: ; 110757 .asm_1107fb pop hl jp Function110231 -; 1107ff -Function1107ff: ; 1107ff +Function1107ff: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -1315,21 +1287,19 @@ Function1107ff: ; 1107ff ld a, $16 ld [$c86a], a jp Function110432 -; 110899 -Function110899: ; 110899 +Function110899: ld a, [$c86a] cp $3 jp nz, Function110226 jr Function1108ab -; 1108a3 -Function1108a3: ; 1108a3 +Function1108a3: ld a, [$c86a] cp $4 jp nz, Function110226 -Function1108ab: ; 1108ab +Function1108ab: ld hl, $c821 bit 0, [hl] jp nz, Function110226 @@ -1368,9 +1338,8 @@ Function1108ab: ; 1108ab ld a, $17 ld [$c86a], a jp Function110432 -; 110905 -Function110905: ; 110905 +Function110905: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -1450,9 +1419,8 @@ Function110905: ; 110905 call Function110000 ld a, $1 jp Function110615 -; 1109a4 -Function1109a4: ; 1109a4 +Function1109a4: ld hl, $c821 bit 0, [hl] jp nz, Function110226 @@ -1489,9 +1457,8 @@ Function1109a4: ; 1109a4 ld a, $18 ld [$c86a], a jp Function110432 -; 1109f9 -Function1109f9: ; 1109f9 +Function1109f9: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -1535,9 +1502,8 @@ Function1109f9: ; 1109f9 ld a, $1d ld [$c86a], a jp Function110432 -; 110a5b -Function110a5b: ; 110a5b +Function110a5b: ld a, [$c821] bit 2, a jr z, .asm_110a6d @@ -1620,9 +1586,8 @@ Function110a5b: ; 110a5b ld a, $1a ld [$c86a], a jp Function110432 -; 110af4 -Function110af4: ; 110af4 +Function110af4: ld hl, $c827 ld a, e ld [hli], a @@ -1832,9 +1797,8 @@ Function110af4: ; 110af4 ld e, a pop hl jp .asm_110b1c -; 110c3c -Function110c3c: ; 110c3c +Function110c3c: ld a, [$c821] bit 0, a jp nz, Function110226 @@ -1878,9 +1842,8 @@ Function110c3c: ; 110c3c ld a, $1b ld [$c86a], a jp Function110432 -; 110c9e -Function110c9e: ; 110c9e +Function110c9e: ld a, [$c821] bit 2, a jr z, .asm_110cb0 @@ -1963,9 +1926,8 @@ Function110c9e: ; 110c9e ld a, $1c ld [$c86a], a jp Function110432 -; 110d37 -Function110d37: ; 110d37 +Function110d37: push bc push de ld b, 0 @@ -2100,9 +2062,8 @@ Function110d37: ; 110d37 cp $a jr nz, .last_loop ret -; 110ddd -Function110ddd: ; 110ddd +Function110ddd: ld a, [$c821] bit 2, a ld a, [$c86a] @@ -2300,7 +2261,7 @@ Function110ddd: ; 110ddd xor a ld [$c994], a -Function110f07: ; 110f07 +Function110f07: ld hl, $c833 ld a, [hli] ld h, [hl] @@ -2387,7 +2348,6 @@ Function110f07: ; 110f07 ld a, $f ld [$c86a], a jp Function110432 -; 110fad URIPrefix: ; 0x110fad db "http://" @@ -2409,7 +2369,7 @@ HTTPRankingURL: ; 0x111020 db "gameboy.datacenter.ne.jp/cgb/ranking" .End -Function111044: ; 111044 +Function111044: ld hl, $c827 ld a, e ld [hli], a @@ -2581,9 +2541,8 @@ Function111044: ; 111044 ld [$c86d], a ei ret -; 11115f -Function11115f: ; 11115f +Function11115f: ld e, a xor a cp b @@ -2658,17 +2617,15 @@ Function11115f: ; 11115f ld [hl], a pop af ret -; 1111ca -Function1111ca: ; 1111ca +Function1111ca: ld hl, $c821 res 2, [hl] ld a, $6 ld [$c86b], a jp Function112430 -; 1111d7 -Function1111d7: ; 1111d7 +Function1111d7: push hl ld hl, $c866 ld a, [hli] @@ -2700,9 +2657,8 @@ Function1111d7: ; 1111d7 ld a, b ld [hl], a ret -; 1111fe -Function1111fe: ; 1111fe +Function1111fe: ld a, [$c821] bit 2, a ld a, [$c86a] @@ -2899,9 +2855,8 @@ endr xor $1 ld [$c994], a jp Function110f07 -; 111335 -Function111335: ; 111335 +Function111335: ld hl, $c876 ld a, [hli] ld h, [hl] @@ -3028,27 +2983,24 @@ Function111335: ; 111335 ld [de], a inc de ret -; 1113ea -Function1113ea: ; 1113ea +Function1113ea: cp $14 jp z, Function111044 cp $24 jp z, Function111044 jp Function110226 -; 1113f7 -Function1113f7: ; 1113f7 +Function1113f7: pop hl -Function1113f8: ; 1113f8 +Function1113f8: pop hl pop hl pop hl jp Function110231 -; 1113fe -Function1113fe: ; 1113fe +Function1113fe: ld a, [$c822] bit 4, a jp z, .asm_11147f @@ -3136,9 +3088,8 @@ Function1113fe: ; 1113fe call Function110231 ld a, $ff ret -; 11148c -Function11148c: ; 11148c +Function11148c: ld a, [$c822] bit 4, a jp z, Function110226 @@ -3258,12 +3209,11 @@ Function11148c: ; 11148c ld [hl], a pop hl jr .asm_1114d2 -; 111540 -Function111540: ; 111540 +Function111540: nop -Function111541: ; 111541 +Function111541: ld hl, $c821 bit 0, [hl] jp nz, Function110226 @@ -3307,9 +3257,8 @@ Function111541: ; 111541 ld a, $1 ld [$c86b], a jr .asm_11156f -; 111596 -Function111596: ; 111596 +Function111596: ld hl, $c86a ld a, [hl] cp $1 @@ -3352,9 +3301,8 @@ Function111596: ; 111596 ld a, $1 ld [hl], a ret -; 1115e4 -Function1115e4: ; 1115e4 +Function1115e4: di push af ld hl, $c821 @@ -3383,9 +3331,8 @@ Function1115e4: ; 1115e4 .asm_11160d ei jr .asm_111604 -; 111610 -Function111610: ; 111610 +Function111610: ld hl, $c86a ld a, [hl] dec a @@ -3404,9 +3351,8 @@ Function111610: ; 111610 ld [hli], a ld [hl], b ret -; 11162d -Function11162d: ; 11162d +Function11162d: ld a, [$c86a] cp $1 jp nz, Function110226 @@ -3426,9 +3372,8 @@ Function11162d: ; 11162d or b jr nz, .asm_111647 ret -; 11164f -Function11164f: ; 11164f (44:564f) +Function11164f: ld hl, $c815 xor a ld [hli], a @@ -3443,7 +3388,7 @@ Function11164f: ; 11164f (44:564f) ld [hl], a ret -Function111664: ; 111664 (44:5664) +Function111664: ld hl, $ca3a ld a, [hli] ld e, a @@ -3467,7 +3412,7 @@ Function111664: ; 111664 (44:5664) ld [hl], d ret -Function111686: ; 111686 (44:5686) +Function111686: xor a ld [rTAC], a ld c, $ff @@ -3483,17 +3428,16 @@ Function111686: ; 111686 (44:5686) or c ld [hl], a ret -; 1116a0 (44:56a0) -Function1116a0: ; 1116a0 +Function1116a0: ld a, $1 jr Function1116a9 -Function1116a4: ; 1116a4 +Function1116a4: set 1, [hl] ld a, [$c86a] -Function1116a9: ; 1116a9 +Function1116a9: ld [$cb48], a ld hl, $c815 xor a @@ -3510,9 +3454,8 @@ Function1116a9: ; 1116a9 and b ld [$cb47], a ret -; 1116c5 -_MobileReceive:: ; 1116c5 (44:56c5) +_MobileReceive:: ld a, [$c800] rrca jp nc, Function1118bc @@ -3618,7 +3561,7 @@ _MobileReceive:: ; 1116c5 (44:56c5) .asm_111778 xor a ld [$c800], a -Function11177c: ; 11177c (44:577c) +Function11177c: ld hl, $c820 ld a, [hld] ld e, a @@ -3638,18 +3581,18 @@ Function11177c: ; 11177c (44:577c) ld [hl], e jp Function1118bc -Function111796: ; 111796 (44:5796) +Function111796: ld b, $a jr asm_1117a2 -asm_11179a: ; 11179a (44:579a) +asm_11179a: xor a ld [hli], a ld [hl], a jp Function1118bc -Function1117a0: ; 1117a0 (44:57a0) +Function1117a0: ld b, $3 -asm_1117a2: ; 1117a2 (44:57a2) +asm_1117a2: ld hl, $c822 set 3, [hl] ld hl, $c815 @@ -3686,7 +3629,7 @@ asm_1117a2: ; 1117a2 (44:57a2) ld [hl], a jp Function1118bc -Function1117e7: ; 1117e7 (44:57e7) +Function1117e7: ld a, [$c80b] or a jr z, .asm_1117f8 @@ -3765,7 +3708,7 @@ Function1117e7: ; 1117e7 (44:57e7) ld [hl], a jr Function1118bc -Function11186e: ; 11186e (44:586e) +Function11186e: call Function1118c2 ld a, $4 cp [hl] @@ -3780,7 +3723,7 @@ Function11186e: ; 11186e (44:586e) inc [hl] jr Function1118bc -Function111884: ; 111884 (44:5884) +Function111884: call Function1118c2 ld a, [$c80c] cp [hl] @@ -3790,7 +3733,7 @@ Function111884: ; 111884 (44:5884) inc [hl] jr Function1118bc -Function111892: ; 111892 (44:5892) +Function111892: ld a, [rSB] ld c, a call Function111664 @@ -3816,12 +3759,12 @@ Function111892: ; 111892 (44:5892) xor a ld [hli], a inc [hl] -Function1118bc: ; 1118bc (44:58bc) +Function1118bc: ld hl, $c822 res 1, [hl] ret -Function1118c2: ; 1118c2 (44:58c2) +Function1118c2: ld a, [rSB] ld c, a ld b, $0 @@ -3839,7 +3782,7 @@ Function1118c2: ; 1118c2 (44:58c2) inc [hl] ret -_Timer:: ; 1118de (44:58de) +_Timer:: ld a, [$c80b] cp $4 call z, Function111b3c @@ -3975,7 +3918,7 @@ _Timer:: ; 1118de (44:58de) ld [$c80f], a jr .asm_1119a9 -Function1119f0: ; 1119f0 (44:59f0) +Function1119f0: ld a, $90 ld [$c81e], a ld [$c808], a @@ -3987,7 +3930,7 @@ Function1119f0: ; 1119f0 (44:59f0) ld [$c806], a jp Function111b3b -Function111a0b: ; 111a0b (44:5a0b) +Function111a0b: ld a, [hl] cp $6 jp z, Function111b3b @@ -4006,7 +3949,7 @@ Function111a0b: ; 111a0b (44:5a0b) call Function111f07 jp Function111b3b -Function111a2a: ; 111a2a (44:5a2a) +Function111a2a: ld hl, $c80b ld a, [hld] or a @@ -4018,13 +3961,13 @@ Function111a2a: ; 111a2a (44:5a2a) jp z, Function111ab9 cp $3 jp z, Function111abd -asm_111a40: ; 111a40 (44:5a40) +asm_111a40: ld a, $4b -Function111a42: ; 111a42 (44:5a42) +Function111a42: ld [rSB], a jp Function111b2e -asm_111a47: ; 111a47 (44:5a47) +asm_111a47: ld hl, $c815 dec [hl] jr nz, asm_111a40 @@ -4084,11 +4027,11 @@ asm_111a47: ; 111a47 (44:5a47) ei jp Function111b3b -Function111ab9: ; 111ab9 (44:5ab9) +Function111ab9: ld a, $80 jr Function111a42 -Function111abd: ; 111abd (44:5abd) +Function111abd: ld a, [$c814] or a jr nz, .asm_111acb @@ -4143,7 +4086,7 @@ Function111abd: ; 111abd (44:5abd) ld a, $f1 jp Function111a42 -Function111b21: ; 111b21 (44:5b21) +Function111b21: ld hl, $c803 ld a, [hli] ld e, a @@ -4155,7 +4098,7 @@ Function111b21: ; 111b21 (44:5b21) ld [hld], a ld [hl], e -Function111b2e: ; 111b2e (44:5b2e) +Function111b2e: ld hl, $c822 set 1, [hl] ld a, $3 @@ -4163,10 +4106,10 @@ Function111b2e: ; 111b2e (44:5b2e) ld a, $83 ld [rSC], a -Function111b3b: ; 111b3b (44:5b3b) +Function111b3b: ret -Function111b3c: ; 111b3c (44:5b3c) +Function111b3c: xor a ld [$c819], a ld [$c80b], a @@ -4268,7 +4211,7 @@ Function111b3c: ; 111b3c (44:5b3c) ld [$c807], a ret -Function111c06: ; 111c06 (44:5c06) +Function111c06: ld de, $c872 ld hl, $ca40 ld b, $2 @@ -4277,7 +4220,7 @@ Function111c06: ; 111c06 (44:5c06) ld [$c807], a ret -Function111c17: ; 111c17 (44:5c17) +Function111c17: ld a, [$ca3c] cp $9f jp z, Function111d07 @@ -4376,7 +4319,7 @@ Function111c17: ; 111c17 (44:5c17) call Function110000 jr Function111d07 -Function111cc2: ; 111cc2 (44:5cc2) +Function111cc2: xor a cp d jr nz, .asm_111cda @@ -4425,7 +4368,7 @@ Function111cc2: ; 111cc2 (44:5cc2) jr nc, Function111d07 inc [hl] -Function111d07: ; 111d07 (44:5d07) +Function111d07: ld a, [$c822] bit 4, a jr z, .asm_111d1c @@ -4440,7 +4383,7 @@ Function111d07: ; 111d07 (44:5d07) ld [$c807], a ret -Function111d23: ; 111d23 (44:5d23) +Function111d23: ld a, [$c829] ld e, a ld a, [$c82a] @@ -4452,7 +4395,7 @@ Function111d23: ; 111d23 (44:5d23) ld [$c807], a ret -Function111d39: ; 111d39 (44:5d39) +Function111d39: ld de, $ca3f ld hl, Unknown_112006 ld b, $9 @@ -4482,14 +4425,14 @@ Function111d39: ; 111d39 (44:5d39) xor a jr .asm_111d59 -Function111d65: ; 111d65 (44:5d65) +Function111d65: ld a, $3 ld [$c807], a ld hl, $c821 set 4, [hl] ret -Function111d70: ; 111d70 (44:5d70) +Function111d70: ld hl, $c822 bit 0, [hl] jr z, .asm_111dc0 @@ -4544,7 +4487,7 @@ Function111d70: ; 111d70 (44:5d70) ld [$c807], a ret -Function111dd9: ; 111dd9 (44:5dd9) +Function111dd9: cp $ff jr z, .asm_111de7 or a @@ -4585,7 +4528,7 @@ Function111dd9: ; 111dd9 (44:5dd9) ld b, $3 ret -Function111e15: ; 111e15 (44:5e15) +Function111e15: ld a, b and $7 rrca @@ -4599,13 +4542,11 @@ Function111e15: ; 111e15 (44:5e15) ld [$c821], a pop hl ret -; 111e28 (44:5e28) -Function111e28: ; 111e28 +Function111e28: jp Function110029 -; 111e2b -Function111e2b: ; 111e2b (44:5e2b) +Function111e2b: ld a, [$c81e] cp $ff jp z, Function111ef8 @@ -4720,20 +4661,19 @@ Function111e2b: ; 111e2b (44:5e2b) ld [$c807], a ret -Function111ef8: ; 111ef8 (44:5ef8) +Function111ef8: ld a, [$c805] ld [$c807], a ret -; 111eff (44:5eff) -Function111eff: ; 111eff +Function111eff: ld de, $000a -Function111f02: ; 111f02 (44:5f02) +Function111f02: ld [$c81e], a ld b, $5 -Function111f07: ; 111f07 (44:5f07) +Function111f07: call Function1100b4 ret c ld a, [$c800] @@ -4783,9 +4723,8 @@ Function111f07: ; 111f07 (44:5f07) set 5, [hl] ei ret -; 111f63 (44:5f63) -Function111f63: ; 111f63 +Function111f63: push de ld hl, 0 ld c, b @@ -4819,9 +4758,8 @@ Function111f63: ; 111f63 ld e, c ld d, b ret -; 111f8d -Function111f8d: ; 111f8d +Function111f8d: dec de ld a, [de] add l @@ -4831,9 +4769,8 @@ Function111f8d: ; 111f8d ld h, a dec b ret -; 111f97 -Function111f97: ; 111f97 (44:5f97) +Function111f97: ld hl, $c822 bit 0, [hl] ret nz @@ -4880,62 +4817,61 @@ Function111f97: ; 111f97 (44:5f97) ld hl, Unknown_112001 ld de, $12 jp Function111f07 -; 111ff2 (44:5ff2) ds 14 -Unknown_112000: ; 112000 +Unknown_112000: db $4b -Unknown_112001: ; 112001 +Unknown_112001: db $99, $66, $10, $00, $00 -Unknown_112006: ; 112006 +Unknown_112006: db $08, "NINTENDO", $02, $77, $80, $00 -Unknown_112013: ; 112013 +Unknown_112013: db $99, $66, $11, $00, $00, $00, $00, $11, $80, $00 -Unknown_11201d: ; 11201d +Unknown_11201d: db $99, $66, $12, $00, $00, $00 -Unknown_112023: ; 112023 +Unknown_112023: db $99, $66, $13, $00, $00, $00, $00, $13, $80, $00 -Unknown_11202d: ; 11202d +Unknown_11202d: db $99, $66, $17, $00, $00, $00, $00, $17, $80, $00 -Unknown_112037: ; 112037 +Unknown_112037: db $99, $66, $21, $00, $00 -Unknown_11203c: ; 11203c +Unknown_11203c: db $99, $66, $22, $00, $00, $00, $00, $22, $80, $00 -Unknown_112046: ; 112046 +Unknown_112046: db $99, $66, $19, $00, $00, $02, $00, $60, $00, $7b, $80, $00 -Unknown_112052: ; 112052 +Unknown_112052: db $99, $66, $19, $00, $00, $02, $60, $60, $00, $db, $80, $00 -Unknown_11205e: ; 11205e +Unknown_11205e: db $99, $66, $1a, $00, $00 -Unknown_112063: ; 112063 +Unknown_112063: db $99, $66, $28, $00, $00 -Unknown_112068: ; 112068 +Unknown_112068: db $99, $66, $14, $00, $00, $00, $00, $14, $80, $00 -Unknown_112072: ; 112072 +Unknown_112072: db $99, $66, $15, $00, $00, $01, $ff, $01, $15, $80, $00 -Unknown_11207d: ; 11207d +Unknown_11207d: db $99, $66, $23, $00, $00, $06 -Unknown_112083: ; 112083 +Unknown_112083: db $99, $66, $24, $00, $00, $01 -Unknown_112089: ; 112089 +Unknown_112089: db $ec, $14, $c9 db $e4, $0f, $0e db $e0, $0c, $53 @@ -4943,7 +4879,6 @@ Unknown_112089: ; 112089 db $b0, $05, $ee db $ec, $10, $b4 db $e4, $0c, $dd -; 11209e Unknown_11209e: db "HELO ", 0 @@ -4981,9 +4916,8 @@ Unknown_112137: db "POST ", 0 Unknown_11213d: db "Content-Length: ", 0 -; 11214e -Function11214e: ; 11214e (44:614e) +Function11214e: ld a, [$c822] bit 5, a ret nz @@ -5037,9 +4971,8 @@ Function11214e: ; 11214e (44:614e) ld hl, $c821 res 1, [hl] jr .asm_112175 -; 1121ac (44:61ac) -Jumptable_1121ac: ; 1121ac +Jumptable_1121ac: dw Function1121f6 dw Function112271 dw Function112373 @@ -5077,9 +5010,8 @@ Jumptable_1121ac: ; 1121ac dw Function1134cb dw Function113672 dw Function113626 -; 1121f6 -Function1121f6: ; 1121f6 +Function1121f6: dec a jr z, .asm_1121fe dec a @@ -5147,30 +5079,27 @@ Function1121f6: ; 1121f6 call Function11225d jp Function1116a4 -Function112251: ; 112251 +Function112251: xor a ld [$c821], a ld [$c807], a inc a ld [$c86a], a ret -; 11225d -Function11225d: ; 11225d +Function11225d: ld [$c80f], a ld a, $5 ld [$c86a], a ld hl, $c821 ret -; 112269 -Function112269: ; 112269 +Function112269: ld a, $91 ld hl, Unknown_112013 jp Function111eff -; 112271 -Function112271: ; 112271 +Function112271: dec a jr z, .asm_11228c dec a @@ -5304,7 +5233,7 @@ Function112271: ; 112271 call Function11225d jp Function1116a4 -Function11234b: ; 11234b +Function11234b: ld a, [$cb4c] add $a ld e, a @@ -5313,7 +5242,7 @@ Function11234b: ; 11234b ld a, b jp Function111f02 -Function11235a: ; 11235a +Function11235a: ld hl, $c86e ld a, $80 ld [hli], a @@ -5322,15 +5251,13 @@ Function11235a: ; 11235a ld a, $97 ld hl, Unknown_11202d jp Function111eff -; 11236b -Function11236b: ; 11236b +Function11236b: ld a, $99 ld de, $000c jp Function111f02 -; 112373 -Function112373: ; 112373 +Function112373: dec a jr z, Function11235a dec a @@ -5374,9 +5301,8 @@ Function112373: ; 112373 ld a, [$c872] call Function11225d jp Function1116a4 -; 1123b6 -Function1123b6: ; 1123b6 +Function1123b6: dec a jr z, .asm_1123be dec a @@ -5404,9 +5330,8 @@ Function1123b6: ; 1123b6 set 6, [hl] set 5, [hl] ret -; 1123e1 -Function1123e1: ; 1123e1 +Function1123e1: dec a jr z, .asm_1123f2 dec a @@ -5458,7 +5383,7 @@ Function1123e1: ; 1123e1 ld [hl], a jp Function1116a0 -Function112430: ; 112430 +Function112430: ld a, $3 ld [$c807], a ld de, $cb47 @@ -5473,9 +5398,8 @@ Function112430: ; 112430 ld a, $a4 ld hl, $cb47 jp Function111f02 -; 112451 -Function112451: ; 112451 +Function112451: dec a jr z, .asm_112458 dec a @@ -5607,9 +5531,8 @@ Function112451: ; 112451 .asm_112531 jp Function1125bf -; 112534 -Function112534: ; 112534 +Function112534: ld b, $fa ld hl, $c880 xor a @@ -5632,9 +5555,8 @@ Function112534: ; 112534 ld a, $95 ld hl, $cb53 jp Function111f02 -; 112566 -Function112566: ; 112566 +Function112566: call Function1125c7 ld a, [$cb5a] and $1 @@ -5661,7 +5583,7 @@ Function112566: ; 112566 ld [$c86a], a jr Function1125bf -Function112597: ; 112597 +Function112597: call Function1125c7 call Function11269b ld a, $5 @@ -5683,14 +5605,13 @@ Function112597: ; 112597 .asm_1125bc ld [$c86a], a -Function1125bf: ; 1125bf +Function1125bf: ld hl, $c821 set 0, [hl] res 2, [hl] ret -; 1125c7 -Function1125c7: ; 1125c7 +Function1125c7: ld hl, $c872 ld a, [hli] ld c, a @@ -5741,9 +5662,8 @@ Function1125c7: ; 1125c7 ld [de], a inc de ret -; 11261c -Function11261c: ; 11261c +Function11261c: xor a ld [$c86b], a ld a, [$c86c] @@ -5768,13 +5688,12 @@ Function11261c: ; 11261c ld a, $11 ld [$c86a], a -Function11264e: ; 11264e +Function11264e: ld hl, $c821 set 0, [hl] ret -; 112654 -Function112654: ; 112654 +Function112654: xor a ld [$c86b], a ld a, [$c86c] @@ -5809,9 +5728,8 @@ Function112654: ; 112654 ld a, $12 ld [$c86a], a jr Function11264e -; 11269b -Function11269b: ; 11269b +Function11269b: ld bc, $0001 ld hl, Unknown_112110 ld a, [$c994] @@ -5819,19 +5737,16 @@ Function11269b: ; 11269b call nz, Function1126ac call Function110007 ret -; 1126ac -Function1126ac: ; 1126ac +Function1126ac: ld hl, Unknown_112137 ret -; 1126b0 -Function1126b0: ; 1126b0 +Function1126b0: ld hl, Unknown_112115 jp Function110007 -; 1126b6 -Function1126b6: ; 1126b6 +Function1126b6: ld hl, Unknown_112121 call Function110007 ld hl, $013f @@ -5856,9 +5771,8 @@ Function1126b6: ; 1126b6 ld c, a ld hl, Unknown_112132 jp Function110007 -; 1126e6 -Function1126e6: ; 1126e6 +Function1126e6: xor a ld [$c86b], a ld hl, Unknown_11213d @@ -5891,9 +5805,8 @@ Function1126e6: ; 1126e6 ld c, a or c ret -; 112715 -Function112715: ; 112715 +Function112715: xor a ld [$c86c], a ld a, $2 @@ -5901,13 +5814,12 @@ Function112715: ; 112715 ld hl, $c821 res 0, [hl] ret -; 112724 -Function112724: ; 112724 +Function112724: ld a, $ff ld [$c86e], a -Function112729: ; 112729 +Function112729: push hl ld hl, $c82c xor a @@ -5920,9 +5832,8 @@ Function112729: ; 112729 ld [hl], a pop hl ret -; 11273a -Function11273a: ; 11273a +Function11273a: dec a jr z, .asm_112752 dec a @@ -6002,12 +5913,12 @@ Function11273a: ; 11273a ld [$c86b], a jp Function112430 -Function1127c5: ; 1127c5 +Function1127c5: ld de, $000b ld a, $95 jp Function111f02 -Function1127cd: ; 1127cd +Function1127cd: ld hl, $c810 xor a ld [hli], a @@ -6019,13 +5930,12 @@ Function1127cd: ; 1127cd set 1, [hl] res 0, [hl] ret -; 1127e1 -Function1127e1: ; 1127e1 +Function1127e1: call Function112807 ld hl, $c832 -Function1127e7: ; 1127e7 +Function1127e7: ld a, [hli] cp $d ret nz @@ -6035,9 +5945,8 @@ Function1127e7: ; 1127e7 ld a, $20 ld [hl], a ret -; 1127f3 -Function1127f3: ; 1127f3 +Function1127f3: call Function112807 ld hl, $c82f ld a, [hli] @@ -6050,9 +5959,8 @@ Function1127f3: ; 1127f3 cp $2e ret nz jr Function1127e7 -; 112807 -Function112807: ; 112807 +Function112807: push bc push de ld hl, $ca3f @@ -6090,9 +5998,8 @@ Function112807: ; 112807 ld b, $5 ld de, $c82f jr .asm_11282a -; 112840 -Function112840: ; 112840 +Function112840: dec a jr z, .asm_112844 ret @@ -6161,7 +6068,7 @@ Function112840: ; 112840 ld hl, $cb47 jp Function1127c5 -Function1128bd: ; 1128bd +Function1128bd: ld hl, $c880 call Function112b11 ld hl, $c810 @@ -6173,16 +6080,14 @@ Function1128bd: ; 1128bd set 1, [hl] res 0, [hl] ret -; 1128d3 -Function1128d3: ; 1128d3 +Function1128d3: ld hl, $c821 res 0, [hl] res 2, [hl] ret -; 1128db -Function1128db: ; 1128db +Function1128db: dec a jr z, .asm_112947 dec a @@ -6259,9 +6164,8 @@ Function1128db: ; 1128db .asm_11295b jp Function1128bd -; 11295e -Function11295e: ; 11295e +Function11295e: ld a, $d ld [de], a inc de @@ -6271,9 +6175,8 @@ Function11295e: ; 11295e inc de inc c ret -; 112969 -Function112969: ; 112969 +Function112969: dec a jr z, .asm_112970 dec a @@ -6304,9 +6207,8 @@ Function112969: ; 112969 res 7, [hl] set 5, [hl] ret -; 11299c -Function11299c: ; 11299c +Function11299c: dec a jr z, .asm_1129aa dec a @@ -6385,7 +6287,7 @@ Function11299c: ; 11299c inc de .asm_112a2c -Function112a2c: ; 112a2c +Function112a2c: ld hl, $c821 set 1, [hl] res 0, [hl] @@ -6399,7 +6301,7 @@ Function112a2c: ; 112a2c ld [$c86a], a ret -Function112a42: ; 112a42 +Function112a42: ld hl, $c810 xor a ld [hli], a @@ -6411,9 +6313,8 @@ Function112a42: ; 112a42 set 1, [hl] res 0, [hl] ret -; 112a56 -Function112a56: ; 112a56 +Function112a56: dec a jr z, .asm_112a5a ret @@ -6468,9 +6369,8 @@ Function112a56: ; 112a56 .asm_112aa6 ld de, $0005 jp Function112a2c -; 112aac -Function112aac: ; 112aac +Function112aac: ld a, [$c872] push af ld a, [$c873] @@ -6530,9 +6430,8 @@ Function112aac: ; 112aac pop af ld [$c872], a ret -; 112b11 -Function112b11: ; 112b11 +Function112b11: ld a, [$c872] push af ld a, [$c873] @@ -6588,9 +6487,8 @@ Function112b11: ; 112b11 pop af ld [$c872], a ret -; 112b60 -Function112b60: ; 112b60 +Function112b60: ld a, [hli] cp $30 jr c, .asm_112b6f @@ -6605,9 +6503,8 @@ Function112b60: ; 112b60 .asm_112b6f scf ret -; 112b71 -Function112b71: ; 112b71 +Function112b71: dec a jr z, .asm_112b75 ret @@ -6654,9 +6551,8 @@ Function112b71: ; 112b71 .asm_112bb5 ld de, $0004 jp Function112a2c -; 112bbb -Function112bbb: ; 112bbb +Function112bbb: dec a jr z, .asm_112bbf ret @@ -6684,9 +6580,8 @@ Function112bbb: ; 112bbb .asm_112be6 ld de, $0004 jp Function112a2c -; 112bec -Function112bec: ; 112bec +Function112bec: dec a jr z, .asm_112bf7 dec a @@ -6878,9 +6773,8 @@ Function112bec: ; 112bec ld hl, $c82d ld b, $2 jp Function110000 -; 112d20 -Function112d20: ; 112d20 +Function112d20: ld a, [$c86a] cp $1a jr nz, .asm_112d2d @@ -6890,9 +6784,8 @@ Function112d20: ; 112d20 .asm_112d2d ld de, $0004 jp Function112a2c -; 112d33 -Function112d33: ; 112d33 +Function112d33: dec a jr z, .asm_112d87 dec a @@ -7221,9 +7114,8 @@ Function112d33: ; 112d33 ld hl, $c821 res 0, [hl] ret -; 112f61 -Function112f61: ; 112f61 +Function112f61: ld hl, $c989 ld a, [hl] or a @@ -7294,9 +7186,8 @@ Function112f61: ; 112f61 call Function11306b ld a, [$c990] ret -; 112fd5 -Function112fd5: ; 112fd5 +Function112fd5: ld de, Unknown_113001 push hl call Function113281 @@ -7331,13 +7222,11 @@ Function112fd5: ; 112fd5 pop hl pop bc ret -; 113001 -Unknown_113001: ; 113001 +Unknown_113001: db "date: ", 0 -; 113008 -Function113008: ; 113008 +Function113008: ld de, Unknown_1132a6 push hl call Function113273 @@ -7358,9 +7247,8 @@ Function113008: ; 113008 ld a, $2 ld [$c990], a ret -; 113026 -Function113026: ; 113026 +Function113026: ld de, Unknown_1132b2 push hl call Function113273 @@ -7392,9 +7280,8 @@ Function113026: ; 113026 pop hl pop bc ret -; 113054 -Function113054: ; 113054 +Function113054: ld de, Unknown_1132bf push hl call Function113273 @@ -7410,14 +7297,13 @@ Function113054: ; 113054 pop bc pop hl ret -; 11306b -Function11306b: ; 11306b +Function11306b: ld hl, $c880 ld a, [$c82d] ld b, a -Function113072: ; 113072 +Function113072: call Function113268 jp nc, Function113089 ld a, [$ca3c] @@ -7429,7 +7315,7 @@ Function113072: ; 113072 pop hl jr Function113095 -Function113089: ; 113089 +Function113089: ld a, [hl] cp $d jr z, .asm_113094 @@ -7440,7 +7326,7 @@ Function113089: ; 113089 .asm_113094 inc hl -Function113095: ; 113095 +Function113095: inc hl push bc ld a, [$c872] @@ -7575,9 +7461,8 @@ Function113095: ; 113095 ld a, $2 ld [$c989], a ret -; 113167 -Function113167: ; 113167 +Function113167: ld de, Unknown_1132ff push hl call Function113273 @@ -7598,7 +7483,7 @@ Function113167: ; 113167 jr nz, .asm_113178 jr Function113197 -Function113180: ; 113180 +Function113180: ld de, Unknown_11330c push hl call Function113273 @@ -7618,7 +7503,7 @@ Function113180: ; 113180 cp $a jr nz, .asm_113191 -Function113197: ; 113197 +Function113197: pop hl ld c, b ld de, $cb57 @@ -7633,9 +7518,8 @@ Function113197: ; 113197 pop hl pop bc ret -; 1131a9 -Function1131a9: ; 1131a9 +Function1131a9: ld hl, $c979 ld de, $c880 ld b, $0 @@ -7697,9 +7581,8 @@ Function1131a9: ; 1131a9 dec [hl] ld a, $4 ret -; 113206 -Function113206: ; 113206 +Function113206: ld a, b sub e ld [$c991], a @@ -7735,9 +7618,8 @@ Function113206: ; 113206 ld a, $3 ld [$c86b], a ret -; 113245 -Function113245: ; 113245 +Function113245: ld a, b sub e ld [$c992], a @@ -7758,9 +7640,8 @@ Function113245: ; 113245 ld a, $3 ld [$c86b], a ret -; 113268 -Function113268: ; 113268 +Function113268: .asm_113268 dec b ld a, [hli] @@ -7771,9 +7652,8 @@ Function113268: ; 113268 jr nz, .asm_113268 scf ret -; 113273 -Function113273: ; 113273 +Function113273: ld c, $0 .asm_113275 ld a, [de] @@ -7787,9 +7667,8 @@ Function113273: ; 113273 jr z, .asm_113275 scf ret -; 113281 -Function113281: ; 113281 +Function113281: ld c, $0 push hl ld l, e @@ -7816,16 +7695,14 @@ Function113281: ; 113281 ld h, d pop de ret -; 11329d -Function11329d: ; 11329d +Function11329d: cp $41 ret c cp $5b ret nc or $20 ret -; 1132a6 Unknown_1132a6: db "Gb-Status: ", 0 @@ -7839,9 +7716,8 @@ Unknown_1132ff: db "URI-header: ", 0 Unknown_11330c: db "Location: ", 0 -; 113317 -Function113317: ; 113317 +Function113317: ld a, $1 ld [$c86b], a ld de, $cb59 @@ -7888,13 +7764,11 @@ Function113317: ; 113317 ld hl, Unknown_113372 call Function110007 jr .asm_113351 -; 113372 -Unknown_113372: ; 113372 +Unknown_113372: db "Content-Length: 0", $d, "\n", 0 -; 113386 -Function113386: ; 113386 +Function113386: call Function113482 ld a, $1 ld [$c86b], a @@ -7931,9 +7805,8 @@ Function113386: ; 113386 ld a, $95 ld hl, $cb53 jp Function111f02 -; 1133de -Function1133de: ; 1133de +Function1133de: call Function1126e6 xor a ld [$c86b], a @@ -7946,9 +7819,8 @@ Function1133de: ; 1133de ld a, [$c9ad] ld [$c87f], a ret -; 1133fe -Function1133fe: ; 1133fe +Function1133fe: ld hl, $cb58 ld a, [hli] cp $68 @@ -8039,9 +7911,8 @@ Function1133fe: ; 1133fe jr nz, .asm_113478 dec de jr .asm_113455 -; 113482 -Function113482: ; 113482 +Function113482: ld hl, $c87f ld a, [hld] ld b, a @@ -8091,9 +7962,8 @@ Function113482: ; 113482 ld hl, $cb47 ld a, $95 jp Function111f02 -; 1134cb -Function1134cb: ; 1134cb +Function1134cb: dec a jr z, .asm_1134d9 dec a @@ -8145,9 +8015,8 @@ Function1134cb: ; 1134cb cp $1e jp nz, Function112251 jp Function1116a0 -; 113519 -Function113519: ; 113519 +Function113519: dec a jr z, .asm_113527 dec a @@ -8228,9 +8097,8 @@ Function113519: ; 113519 .asm_11358c call Function11225d jp Function1116a4 -; 113592 -Function113592: ; 113592 +Function113592: push de ld l, e ld h, d @@ -8240,9 +8108,8 @@ Function113592: ; 113592 call Function110000 pop de ret -; 11359d -Function11359d: ; 11359d +Function11359d: ld b, $20 call Function113592 ld a, $21 @@ -8251,17 +8118,15 @@ Function11359d: ; 11359d xor a ld [de], a ret -; 1135ad -Function1135ad: ; 1135ad +Function1135ad: ld b, $1e call Function113592 ld a, $1f ld hl, $c8ac jp Function11000f -; 1135ba -Function1135ba: ; 1135ba +Function1135ba: ld b, $65 call Function113592 ld hl, $c8f6 @@ -8281,9 +8146,8 @@ Function1135ba: ; 1135ba ld a, $11 ld hl, $c92e jp Function11000f -; 1135eb -Function1135eb: ; 1135eb +Function1135eb: ld b, $8 .asm_1135ed ld a, [hl] @@ -8317,19 +8181,16 @@ Function1135eb: ; 1135eb ld [de], a inc de ret -; 113620 -Function113620: ; 113620 +Function113620: ld a, $23 ret -; 113623 -Function113623: ; 113623 +Function113623: ld a, $2a ret -; 113626 -Function113626: ; 113626 +Function113626: dec a jr z, .asm_113634 dec a @@ -8383,9 +8244,8 @@ Function113626: ; 113626 .asm_11366f jp Function1116a0 -; 113672 -Function113672: ; 113672 +Function113672: dec a jr z, .asm_113680 dec a @@ -8438,9 +8298,8 @@ Function113672: ; 113672 .asm_1136be jp Function1116a0 -; 1136c1 -Function1136c1: ; 1136c1 +Function1136c1: xor a ld [$cc28], a ld a, l @@ -8812,9 +8671,8 @@ endr xor a ld [hl], a ret -; 113909 -Function113909: ; 113909 +Function113909: call Function11391e ld a, c and $f0 @@ -8827,7 +8685,7 @@ Function113909: ; 113909 jp z, Function1139b7 jp Function1139de -Function11391e: ; 11391e +Function11391e: and $f ld e, a ld d, $0 @@ -8837,7 +8695,7 @@ Function11391e: ; 11391e ld b, $8 jp Function110000 -Function11392f: ; 11392f +Function11392f: ld hl, $cbf9 ld a, [hli] ld h, [hl] @@ -8871,7 +8729,7 @@ Function11392f: ; 11392f call Function113a15 ret -Function113973: ; 113973 +Function113973: ld hl, $cbf9 ld a, [hli] ld h, [hl] @@ -8904,9 +8762,8 @@ Function113973: ; 113973 ld de, $cc03 call Function113a15 ret -; 1139b7 -Function1139b7: ; 1139b7 +Function1139b7: ld hl, $cbf9 ld a, [hli] ld h, [hl] @@ -8927,9 +8784,8 @@ Function1139b7: ; 1139b7 ld hl, $cbff call Function113a28 ret -; 1139de -Function1139de: ; 1139de +Function1139de: ld hl, $cbfd ld a, [hli] ld h, [hl] @@ -8952,9 +8808,8 @@ Function1139de: ; 1139de ld hl, $cbff call Function113a28 ret -; 113a0b -Function113a0b: ; 113a0b +Function113a0b: ld b, $4 .asm_113a0d ld a, [de] @@ -8964,9 +8819,8 @@ Function113a0b: ; 113a0b dec b jr nz, .asm_113a0d ret -; 113a15 -Function113a15: ; 113a15 +Function113a15: ld b, $4 .asm_113a17 ld a, [de] @@ -8976,9 +8830,8 @@ Function113a15: ; 113a15 dec b jr nz, .asm_113a17 ret -; 113a1f -Function113a1f: ; 113a1f +Function113a1f: ld b, $4 .asm_113a21 ld a, [hl] @@ -8987,9 +8840,8 @@ Function113a1f: ; 113a1f dec b jr nz, .asm_113a21 ret -; 113a28 -Function113a28: ; 113a28 +Function113a28: ld b, $4 .asm_113a2a ld a, [de] @@ -8999,9 +8851,8 @@ Function113a28: ; 113a28 dec b jr nz, .asm_113a2a ret -; 113a32 -Function113a32: ; 113a32 +Function113a32: ld a, [de] inc de add [hl] @@ -9015,9 +8866,8 @@ Function113a32: ; 113a32 dec b jr nz, .asm_113a38 ret -; 113a40 -Function113a40: ; 113a40 +Function113a40: .asm_113a40 or a push hl @@ -9039,11 +8889,9 @@ Function113a40: ; 113a40 dec b jr nz, .asm_113a40 ret -; 113a55 -Unknown_113a55: ; 113a55 +Unknown_113a55: db "Authorization: GB00 name=", $22, 0 -; 113a70 Unknown_113a70: db $00, $00, $00, $07, $06, $04, $00, $0c, $04, $08, $00, $11, $02, $0c, $00, $16 @@ -9062,9 +8910,8 @@ Unknown_113a70: db $30, $30, $00, $06, $36, $0c, $00, $0a, $34, $28, $00, $0f, $32, $04, $00, $15 db $30, $20, $00, $06, $36, $3c, $00, $0a, $34, $18, $00, $0f, $32, $34, $00, $15 db $30, $10, $00, $06, $36, $2c, $00, $0a, $34, $08, $00, $0f, $32, $24, $00, $15 -; 113b70 -Unknown_113b70: ; 113b70 +Unknown_113b70: dw $cbe7 dw $cbeb dw $cbef @@ -9073,7 +8920,7 @@ Unknown_113b70: ; 113b70 dw $cbeb dw $cbef -Unknown_113b7e: ; 113b7e +Unknown_113b7e: db $01, $23, $45, $67, $89, $ab, $cd, $ef db $fe, $dc, $ba, $98, $76, $54, $32, $10 @@ -9095,7 +8942,7 @@ Unknown_113b8e: db $4f, $7e, $a8, $6f, $e0, $e6, $2c, $fe, $14, $43, $01, $a3, $a1, $11, $08, $4e db $82, $7e, $53, $f7, $35, $f2, $3a, $bd, $bb, $d2, $d7, $2a, $91, $d3, $86, $eb -Function113c8e: ; 113c8e +Function113c8e: ld a, c ld [$cc10], a ld a, b @@ -9229,9 +9076,8 @@ Function113c8e: ; 113c8e ld a, $0 ld [hl], a ret -; 113d47 -Function113d47: ; 113d47 +Function113d47: cp $1a jr c, .asm_113d5a cp $34 @@ -9258,9 +9104,8 @@ Function113d47: ; 113d47 .asm_113d63 ld a, $2b ret -; 113d66 -Function113d66: ; 113d66 +Function113d66: ld a, c ld [$cc10], a ld a, b @@ -9427,9 +9272,8 @@ endr .asm_113e3f sub $47 ret -; 113e42 -Function113e42: ; 113e42 +Function113e42: dec a jr z, .asm_113e4f dec a @@ -9504,18 +9348,16 @@ Function113e42: ; 113e42 ld a, $1 ld [$c86b], a jp .asm_113e6d -; 113eb8 -Function113eb8: ; 113eb8 +Function113eb8: ld a, $ff ld [$c81e], a ld hl, $c822 res 5, [hl] res 0, [hl] jp Function111f97 -; 113ec7 -Unreferenced_Function113ec7: ; 113ec7 +Unreferenced_Function113ec7: ld hl, $c822 ld a, [hl] push af @@ -9543,9 +9385,8 @@ Unreferenced_Function113ec7: ; 113ec7 ld hl, $c822 set 0, [hl] ret -; 113ef2 -Function113ef2: ; 113ef2 +Function113ef2: dec a jr z, .asm_113efa dec a @@ -9588,9 +9429,8 @@ Function113ef2: ; 113ef2 dec a ld [hl], a ret -; 113f2d -Function113f2d: ; 113f2d +Function113f2d: dec a jr z, .asm_113f35 dec a @@ -9649,4 +9489,3 @@ Function113f2d: ; 113f2d inc a ld [hl], a ret -; 113f84 diff --git a/macros/wram.asm b/macros/wram.asm index 6096d2bbae3..cbf13a1e596 100644 --- a/macros/wram.asm +++ b/macros/wram.asm @@ -146,30 +146,30 @@ channel_struct: MACRO \1Octave:: db ; 7-0 (0 is highest) \1PitchOffset:: db ; raises existing octaves (to repeat phrases) \1NoteDuration:: db ; frames remaining for the current note -\1Field16:: ds 1 ; c117 - ds 1 ; c118 +\1Field16:: ds 1 + ds 1 \1LoopCount:: db \1Tempo:: dw \1Tracks:: db ; hi:left lo:right -\1SFXDutyLoop:: db ; c11d +\1SFXDutyLoop:: db \1VibratoDelayCount:: db ; initialized by \1VibratoDelay \1VibratoDelay:: db ; number of frames a note plays until vibrato starts \1VibratoExtent:: db \1VibratoRate:: db ; hi:frames for each alt lo:frames to the next alt \1PitchWheelTarget:: dw ; frequency endpoint for pitch wheel -\1PitchWheelAmount:: db ; c124 -\1PitchWheelAmountFraction:: db ; c125 -\1Field25:: db ; c126 - ds 1 ; c127 +\1PitchWheelAmount:: db +\1PitchWheelAmountFraction:: db +\1Field25:: db + ds 1 \1CryPitch:: dw \1Field29:: ds 1 \1Field2a:: ds 2 \1Field2c:: ds 1 \1NoteLength:: db ; frames per 16th note -\1Field2e:: ds 1 ; c12f -\1Field2f:: ds 1 ; c130 -\1Field30:: ds 1 ; c131 - ds 1 ; c132 +\1Field2e:: ds 1 +\1Field2f:: ds 1 +\1Field30:: ds 1 + ds 1 ENDM battle_tower_struct: MACRO diff --git a/main.asm b/main.asm index 93a530079c7..6cdf4d5a40d 100644 --- a/main.asm +++ b/main.asm @@ -131,10 +131,10 @@ INCLUDE "engine/link/link.asm" INCLUDE "engine/overworld/wildmons.asm" INCLUDE "engine/battle/link_result.asm" -ChrisBackpic: ; 2ba1a +ChrisBackpic: INCBIN "gfx/player/chris_back.2bpp.lz" -DudeBackpic: ; 2bbaa +DudeBackpic: INCBIN "gfx/battle/dude.2bpp.lz" @@ -216,10 +216,10 @@ INCLUDE "data/maps/scenes.asm" INCLUDE "engine/overworld/load_map_part.asm" INCLUDE "engine/phone/phonering_copytilemapatonce.asm" -Shrink1Pic: ; 4d249 +Shrink1Pic: INCBIN "gfx/new_game/shrink1.2bpp.lz" -Shrink2Pic: ; 4d2d9 +Shrink2Pic: INCBIN "gfx/new_game/shrink2.2bpp.lz" INCLUDE "engine/link/link_2.asm" @@ -266,7 +266,7 @@ INCLUDE "data/pokemon/base_stats.asm" INCLUDE "data/pokemon/names.asm" INCLUDE "data/unused_53d84.asm" -UnknownEggPic:: ; 53d9c +UnknownEggPic:: ; Another egg pic. This is shifted up a few pixels. INCBIN "gfx/unknown/unknown_egg.2bpp.lz" @@ -376,7 +376,7 @@ INCLUDE "engine/battle_anims/bg_effects.asm" INCLUDE "data/moves/animations.asm" INCLUDE "engine/events/poisonstep_pals.asm" -TheEndGFX:: ; cbd2e +TheEndGFX:: INCBIN "gfx/credits/theend.2bpp" @@ -440,7 +440,7 @@ INCLUDE "engine/pokemon/bills_pc.asm" SECTION "bank39", ROMX -CopyrightGFX:: ; e4000 +CopyrightGFX:: INCBIN "gfx/splash/copyright.2bpp" INCLUDE "engine/menus/options_menu.asm" @@ -489,7 +489,7 @@ INCLUDE "mobile/mobile_42.asm" SECTION "Intro Logo", ROMX -IntroLogoGFX: ; 109407 +IntroLogoGFX: INCBIN "gfx/intro/logo.2bpp.lz" @@ -576,7 +576,7 @@ INCLUDE "engine/overworld/landmarks.asm" SECTION "bank77", ROMX -UnownFont: ; 1dc000 +UnownFont: INCBIN "gfx/font/unown_font.2bpp" INCLUDE "engine/printer/print_party.asm" @@ -590,7 +590,7 @@ INCLUDE "engine/pokedex/pokedex_3.asm" INCLUDE "engine/events/catch_tutorial_input.asm" INCLUDE "engine/pokegear/townmap_convertlinebreakcharacters.asm" -PokegearGFX: ; 1de2e4 +PokegearGFX: INCBIN "gfx/pokegear/pokegear.2bpp.lz" INCLUDE "engine/pokemon/european_mail.asm" diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm index 2e49a874bea..288ec01d3a1 100644 --- a/maps/GoldenrodGameCorner.asm +++ b/maps/GoldenrodGameCorner.asm @@ -57,7 +57,7 @@ GoldenrodGameCornerTMVendorScript: checkitem COIN_CASE iffalse GoldenrodGameCornerPrizeVendor_NoCoinCaseScript writetext GoldenrodGameCornerPrizeVendorWhichPrizeText -GoldenrodGameCornerTMVendor_LoopScript: ; 056c36 +GoldenrodGameCornerTMVendor_LoopScript: special DisplayCoinCaseBalance loadmenu GoldenrodGameCornerTMVendorMenuHeader verticalmenu diff --git a/maps/Route35NationalParkGate.asm b/maps/Route35NationalParkGate.asm index d45bc862b34..61026384425 100644 --- a/maps/Route35NationalParkGate.asm +++ b/maps/Route35NationalParkGate.asm @@ -131,7 +131,7 @@ Route35NationalParkGate_LeaveTheRestBehind: checkcode VAR_BOXSPACE ifequal 0, Route35NationalParkGate_NoRoomInBox -Route35NationalParkGate_LessThanFullParty: ; 6a27d +Route35NationalParkGate_LessThanFullParty: special CheckFirstMonIsEgg ifequal TRUE, Route35NationalParkGate_FirstMonIsEgg writetext UnknownText_0x6a4c6 diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm index 602639b8201..839529faf83 100644 --- a/mobile/fixed_words.asm +++ b/mobile/fixed_words.asm @@ -1,7 +1,7 @@ ; These functions seem to be related to the selection of preset phrases ; for use in mobile communications. Annoyingly, they separate the ; Battle Tower function above from the data it references. -Function11c05d: ; 11c05d +Function11c05d: ld a, e or d jr z, .error @@ -21,9 +21,8 @@ Function11c05d: ; 11c05d ld b, h scf ret -; 11c075 -Function11c075: ; 11c075 +Function11c075: push de ld a, c call Function11c254 @@ -31,9 +30,8 @@ Function11c075: ; 11c075 ld bc, wcd36 call Function11c08f ret -; 11c082 -Unreferenced_Function11c082: ; 11c082 +Unreferenced_Function11c082: push de ld a, c call Function11c254 @@ -41,9 +39,8 @@ Unreferenced_Function11c082: ; 11c082 ld bc, wcd36 call PrintEZChatBattleMessage ret -; 11c08f -Function11c08f: ; 11c08f +Function11c08f: ld l, e ld h, d push hl @@ -93,9 +90,8 @@ Function11c08f: ; 11c08f dec a jr nz, .loop2 ret -; 11c0c6 -PrintEZChatBattleMessage: ; 11c0c6 +PrintEZChatBattleMessage: ; Use up to 6 words from bc to print text starting at de. ; Preserve $cf63, $cf64 ld a, [wJumptableIndex] @@ -210,9 +206,8 @@ PrintEZChatBattleMessage: ; 11c0c6 ld a, h ld [wcf64], a ret -; 11c14a -GetLengthOfWordAtC608: ; 11c14a +GetLengthOfWordAtC608: ld c, $0 ld hl, $c608 .loop @@ -221,9 +216,8 @@ GetLengthOfWordAtC608: ; 11c14a ret z inc c jr .loop -; 11c156 -CopyMobileEZChatToC608: ; 11c156 +CopyMobileEZChatToC608: ld a, [rSVBK] push af ld a, $1 @@ -272,9 +266,8 @@ CopyMobileEZChatToC608: ; 11c156 ld hl, wStringBuffer1 ld bc, MON_NAME_LENGTH - 1 jr .copy_string -; 11c1ab -Function11c1ab: ; 11c1ab +Function11c1ab: ld a, [hInMenu] push af ld a, $1 @@ -283,9 +276,8 @@ Function11c1ab: ; 11c1ab pop af ld [hInMenu], a ret -; 11c1b9 -Function11c1b9: ; 11c1b9 +Function11c1b9: call .InitKanaMode ld a, [rSVBK] push af @@ -295,9 +287,8 @@ Function11c1b9: ; 11c1b9 pop af ld [rSVBK], a ret -; 11c1ca -.InitKanaMode: ; 11c1ca +.InitKanaMode: xor a ld [wJumptableIndex], a ld [wcf64], a @@ -345,9 +336,8 @@ Function11c1b9: ; 11c1b9 call EZChat_GetCategoryWordsByKana call EZChat_GetSeenPokemonByKana ret -; 11c254 -Function11c254: ; 11c254 +Function11c254: push af ld a, $4 call GetSRAMBank @@ -366,16 +356,15 @@ Function11c254: ; 11c254 call CopyBytes call CloseSRAM ret -; 11c277 -EZChat_ClearBottom12Rows: ; 11c277 (47:4277) +EZChat_ClearBottom12Rows: ld a, " " hlcoord 0, 6 ld bc, (SCREEN_HEIGHT - 6) * SCREEN_WIDTH call ByteFill ret -EZChat_MasterLoop: ; 11c283 +EZChat_MasterLoop: .loop call JoyTextDelay ld a, [hJoyPressed] @@ -392,13 +381,11 @@ EZChat_MasterLoop: ; 11c283 farcall ClearSpriteAnims call ClearSprites ret -; 11c2ac -.DoJumptableFunction: ; 11c2ac +.DoJumptableFunction: jumptable .Jumptable, wJumptableIndex -; 11c2bb -.Jumptable: ; 11c2bb (47:42bb) +.Jumptable: dw .SpawnObjects ; 00 dw .InitRAM ; 01 dw Function11c35f ; 02 @@ -423,7 +410,7 @@ EZChat_MasterLoop: ; 11c283 dw Function11ce0b ; 15 dw Function11ce2b ; 16 -.SpawnObjects: ; 11c2e9 (47:42e9) +.SpawnObjects: depixel 3, 1, 2, 5 ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR call _InitSpriteAnimStruct @@ -473,7 +460,7 @@ EZChat_MasterLoop: ; 11c283 set 2, [hl] jp Function11cfb5 -.InitRAM: ; 11c346 (47:4346) +.InitRAM: ld a, $9 ld [wcd2d], a ld a, $2 @@ -484,7 +471,7 @@ EZChat_MasterLoop: ; 11c283 call Function11cfce jp Function11cfb5 -Function11c35f: ; 11c35f (47:435f) +Function11c35f: ld hl, wcd2f inc [hl] inc [hl] @@ -498,7 +485,7 @@ Function11c35f: ; 11c35f (47:435f) ret nz jp Function11cfb5 -Function11c373: ; 11c373 (47:4373) +Function11c373: ld hl, wcd30 inc [hl] inc [hl] @@ -513,7 +500,7 @@ Function11c373: ; 11c373 (47:4373) call Function11c38a jp Function11cfb5 -Function11c38a: ; 11c38a (47:438a) +Function11c38a: ld hl, Unknown_11c986 ld bc, wcd36 ld a, $6 @@ -551,13 +538,11 @@ Function11c38a: ; 11c38a (47:438a) dec a jr nz, .asm_11c392 ret -; 11c3bc (47:43bc) -String_11c3bc: ; 11c3bc +String_11c3bc: db "ーーーーー@" -; 11c3c2 -Function11c3c2: ; 11c3c2 (47:43c2) +Function11c3c2: call EZChat_ClearBottom12Rows ld de, Unknown_11cfbe call Function11d035 @@ -574,7 +559,7 @@ Function11c3c2: ; 11c3c2 (47:43c2) res 0, [hl] call Function11cfb5 -Function11c3ed: ; 11c3ed (47:43ed) +Function11c3ed: ld hl, wcd20 ; wcd20 ld de, hJoypadPressed ; $ffa3 ld a, [de] @@ -692,7 +677,7 @@ Function11c3ed: ; 11c3ed (47:43ed) ld [hl], a ret -Function11c4a5: ; 11c4a5 (47:44a5) +Function11c4a5: ld hl, wcd23 res 0, [hl] ld a, [wcd2b] @@ -709,7 +694,7 @@ Function11c4a5: ; 11c4a5 (47:44a5) ld a, $15 ret -Function11c4be: ; 11c4be (47:44be) +Function11c4be: ld a, $1 hlcoord 0, 6, wAttrMap ld bc, $a0 @@ -720,21 +705,18 @@ Function11c4be: ; 11c4be (47:44be) call ByteFill farcall ReloadMapPart ret -; 11c4db (47:44db) -String_11c4db: ; 11c4db +String_11c4db: db "6つのことば¯くみあわせます" next "かえたいところ¯えらぶと でてくる" next "ことばのグループから いれかえたい" next "たんご¯えらんでください" db "@" -; 11c51b -String_11c51b: ; 11c51b +String_11c51b: db "ぜんぶけす やめる   けってい@" -; 11c52c -Function11c52c: ; 11c52c (47:452c) +Function11c52c: call EZChat_ClearBottom12Rows call EZChat_PlaceCategoryNames call Function11c618 @@ -742,7 +724,7 @@ Function11c52c: ; 11c52c (47:452c) res 1, [hl] call Function11cfb5 -Function11c53d: ; 11c53d (47:453d) +Function11c53d: ld hl, wcd21 ld de, hJoypadPressed ; $ffa3 @@ -879,9 +861,8 @@ Function11c53d: ; 11c53d (47:453d) .finish_dpad ld [hl], a ret -; 11c5f0 -EZChat_PlaceCategoryNames: ; 11c5f0 (47:45f0) +EZChat_PlaceCategoryNames: ld de, MobileEZChatCategoryNames ld bc, Coords_11c63a ld a, 15 @@ -912,20 +893,18 @@ EZChat_PlaceCategoryNames: ; 11c5f0 (47:45f0) call PlaceString ret -Function11c618: ; 11c618 (47:4618) +Function11c618: ld a, $2 hlcoord 0, 6, wAttrMap ld bc, $c8 call ByteFill farcall ReloadMapPart ret -; 11c62a (47:462a) -EZChatString_Stop_Mode_Cancel: ; 11c62a +EZChatString_Stop_Mode_Cancel: db "けす    モード   やめる@" -; 11c63a -Coords_11c63a: ; 11c63a +Coords_11c63a: dwcoord 1, 7 dwcoord 7, 7 dwcoord 13, 7 @@ -941,9 +920,8 @@ Coords_11c63a: ; 11c63a dwcoord 1, 15 dwcoord 7, 15 dwcoord 13, 15 -; 11c658 -Function11c658: ; 11c658 (47:4658) +Function11c658: call EZChat_ClearBottom12Rows call Function11c770 ld de, Unknown_11cfc2 @@ -955,7 +933,7 @@ Function11c658: ; 11c658 (47:4658) res 3, [hl] call Function11cfb5 -Function11c675: ; 11c675 (47:4675) +Function11c675: ld hl, wMobileCommsJumptableIndex ld de, hJoypadPressed ; $ffa3 ld a, [de] @@ -1114,7 +1092,7 @@ Function11c675: ; 11c675 (47:4675) ld [hl], a ret -Function11c770: ; 11c770 (47:4770) +Function11c770: xor a ld [wMobileCommsJumptableIndex], a ld [wcd26], a @@ -1165,7 +1143,7 @@ Function11c770: ; 11c770 (47:4770) ld [wcd28], a jr .div_12 -Function11c7bc: ; 11c7bc (47:47bc) +Function11c7bc: ld bc, Unknown_11c854 ld a, [wcd2b] and a @@ -1284,9 +1262,8 @@ Function11c7bc: ; 11c7bc (47:47bc) pop hl pop de ret -; 11c854 (47:4854) -Unknown_11c854: ; 11c854 +Unknown_11c854: dwcoord 2, 8 dwcoord 8, 8 dwcoord 14, 8 @@ -1300,9 +1277,8 @@ Unknown_11c854: ; 11c854 dwcoord 8, 14 dwcoord 14, 14 dw -1 -; 11c86e -Function11c86e: ; 11c86e (47:486e) +Function11c86e: ld a, [wcd26] and a jr z, .asm_11c88a @@ -1357,9 +1333,8 @@ Function11c86e: ; 11c86e (47:486e) dec c jr nz, .asm_11c8c2 ret -; 11c8c7 (47:48c7) -BCD2String: ; 11c8c7 +BCD2String: inc a push af and $f @@ -1380,21 +1355,17 @@ BCD2String: ; 11c8c7 add "0" ld [hli], a ret -; 11c8ec -MobileString_Page: ; 11c8ec +MobileString_Page: db "ぺージ@" -; 11c8f0 -MobileString_Prev: ; 11c8f0 +MobileString_Prev: db "まえ@" -; 11c8f3 -MobileString_Next: ; 11c8f3 +MobileString_Next: db "つぎ@" -; 11c8f6 -Function11c8f6: ; 11c8f6 (47:48f6) +Function11c8f6: ld a, [wcd20] ; wcd20 call Function11c95d push hl @@ -1464,7 +1435,7 @@ Function11c8f6: ; 11c8f6 (47:48f6) ld d, a jr .asm_11c912 -Function11c95d: ; 11c95d (47:495d) +Function11c95d: sla a ld c, a ld b, 0 @@ -1496,7 +1467,6 @@ Function11c95d: ; 11c95d (47:495d) jr nz, .asm_11c980 pop hl ret -; 11c986 (47:4986) Unknown_11c986: dwcoord 1, 2 @@ -1505,9 +1475,8 @@ Unknown_11c986: dwcoord 1, 4 dwcoord 7, 4 dwcoord 13, 4 -; 11c992 -Function11c992: ; 11c992 (47:4992) +Function11c992: ld a, $8 hlcoord 2, 7 .asm_11c997 @@ -1524,7 +1493,7 @@ Function11c992: ; 11c992 (47:4992) jr nz, .asm_11c997 ret -Function11c9ab: ; 11c9ab (47:49ab) +Function11c9ab: ld a, $7 hlcoord 0, 6, wAttrMap ld bc, $c8 @@ -1532,11 +1501,11 @@ Function11c9ab: ; 11c9ab (47:49ab) farcall ReloadMapPart ret -Function11c9bd: ; 11c9bd (47:49bd) +Function11c9bd: ld de, String_11ca38 call Function11ca7f -Function11c9c3: ; 11c9c3 (47:49c3) +Function11c9c3: ld hl, wcd2a ld de, hJoypadPressed ; $ffa3 ld a, [de] @@ -1582,7 +1551,7 @@ Function11c9c3: ; 11c9c3 (47:49c3) inc [hl] ret -Function11ca01: ; 11ca01 (47:4a01) +Function11ca01: hlcoord 14, 7, wAttrMap ld de, $14 ld a, $5 @@ -1601,7 +1570,7 @@ Function11ca01: ; 11ca01 (47:4a01) dec c jr nz, .asm_11ca0a -Function11ca19: ; 11ca19 (47:4a19) +Function11ca19: hlcoord 0, 12, wAttrMap ld de, $14 ld a, $6 @@ -1621,19 +1590,16 @@ Function11ca19: ; 11ca19 (47:4a19) jr nz, .asm_11ca22 farcall ReloadMapPart ret -; 11ca38 (47:4a38) -String_11ca38: ; 11ca38 +String_11ca38: db "とうろくちゅうあいさつ¯ぜんぶ" next "けしても よろしいですか?@" -; 11ca57 -String_11ca57: ; 11ca57 +String_11ca57: db "はい" next "いいえ@" -; 11ca5e -Function11ca5e: ; 11ca5e (47:4a5e) +Function11ca5e: xor a .loop push af @@ -1644,7 +1610,7 @@ Function11ca5e: ; 11ca5e (47:4a5e) jr nz, .loop ret -Function11ca6a: ; 11ca6a (47:4a6a) +Function11ca6a: ld hl, wcd36 ld c, a ld b, $0 @@ -1658,7 +1624,7 @@ Function11ca6a: ; 11ca6a (47:4a6a) call PlaceString ret -Function11ca7f: ; 11ca7f (47:4a7f) +Function11ca7f: push de ld de, Unknown_11cfc6 call Function11cfce @@ -1678,11 +1644,11 @@ Function11ca7f: ; 11ca7f (47:4a7f) call Function11cfb5 ret -Function11caad: ; 11caad (47:4aad) +Function11caad: ld de, String_11cb1c call Function11ca7f -Function11cab3: ; 11cab3 (47:4ab3) +Function11cab3: ld hl, wcd2a ld de, hJoypadPressed ; $ffa3 ld a, [de] @@ -1750,19 +1716,16 @@ Function11cab3: ; 11cab3 (47:4ab3) ret nz inc [hl] ret -; 11cb1c (47:4b1c) -String_11cb1c: ; 11cb1c +String_11cb1c: db "あいさつとうろく¯ちゅうし" next "しますか?@" -; 11cb31 -String_11cb31: ; 11cb31 +String_11cb31: db "とうろくちゅうあいさつほぞん" next "されませんよろしい ですか?@" -; 11cb52 -Function11cb52: ; 11cb52 (47:4b52) +Function11cb52: ld hl, Unknown_11cc01 ld a, [wMenuCursorY] .asm_11cb58 @@ -1778,7 +1741,7 @@ Function11cb52: ; 11cb52 (47:4b52) ld d, a call Function11ca7f -Function11cb66: ; 11cb66 (47:4b66) +Function11cb66: ld hl, wcd2a ld de, hJoypadPressed ; $ffa3 ld a, [de] @@ -1872,7 +1835,7 @@ Function11cb66: ; 11cb66 (47:4b66) inc [hl] ret -Function11cbf5: ; 11cbf5 (47:4bf5) +Function11cbf5: call WaitSFX ld hl, wcf64 dec [hl] @@ -1880,55 +1843,52 @@ Function11cbf5: ; 11cbf5 (47:4bf5) dec hl set 7, [hl] ret -; 11cc01 (47:4c01) -Unknown_11cc01: ; 11cc01 +Unknown_11cc01: dw String_11cc09 dw String_11cc23 dw String_11cc42 dw String_11cc60 -String_11cc09: ; 11cc09 +String_11cc09: db "じこしょうかい は" next "この あいさつで いいですか?@" -String_11cc23: ; 11cc23 +String_11cc23: db "たいせん はじまるとき は" next "この あいさつで いいですか?@" -String_11cc42: ; 11cc42 +String_11cc42: db "たいせん かったとき は" next "この あいさつで いいですか?@" -String_11cc60: ; 11cc60 +String_11cc60: db "たいせん まけたとき は" next "この あいさつで いいですか?@" -; 11cc7e -Unknown_11cc7e: ; 11cc7e +Unknown_11cc7e: dw String_11cc86 dw String_11cc9d dw String_11ccb9 dw String_11ccd4 -String_11cc86: ; 11cc86 +String_11cc86: db "じこしょうかい の" next "あいさつ¯とうろくした!@" -String_11cc9d: ; 11cc9d +String_11cc9d: db "たいせん はじまるとき の" next "あいさつ¯とうろくした!@" -String_11ccb9: ; 11ccb9 +String_11ccb9: db "たいせん かったとき の" next "あいさつ¯とうろくした!@" -String_11ccd4: ; 11ccd4 +String_11ccd4: db "たいせん まけたとき の" next "あいさつ¯とうろくした!@" -; 11ccef -Function11ccef: ; 11ccef (47:4cef) +Function11ccef: ld de, Unknown_11cfc6 call Function11cfce hlcoord 1, 14 @@ -1937,7 +1897,7 @@ Function11ccef: ; 11ccef (47:4cef) call Function11ca19 call Function11cfb5 -Function11cd04: ; 11cd04 (47:4d04) +Function11cd04: ld de, hJoypadPressed ; $ffa3 ld a, [de] and a @@ -1945,13 +1905,11 @@ Function11cd04: ; 11cd04 (47:4d04) ld a, $4 ld [wJumptableIndex], a ret -; 11cd10 (47:4d10) -String_11cd10: ; 11cd10 +String_11cd10: db "なにか ことば¯いれてください@" -; 11cd20 -Function11cd20: ; 11cd20 (47:4d20) +Function11cd20: call EZChat_ClearBottom12Rows ld de, Unknown_11cfc6 call Function11cfce @@ -1974,7 +1932,7 @@ Function11cd20: ; 11cd20 (47:4d20) res 5, [hl] call Function11cfb5 -Function11cd54: ; 11cd54 (47:4d54) +Function11cd54: ld hl, wcd2c ld de, hJoypadPressed ; $ffa3 ld a, [de] @@ -2033,7 +1991,7 @@ Function11cd54: ; 11cd54 (47:4d54) call PlaceString ret -Function11cdaa: ; 11cdaa (47:4daa) +Function11cdaa: ld a, $2 hlcoord 0, 6, wAttrMap ld bc, 6 * SCREEN_WIDTH @@ -2044,26 +2002,22 @@ Function11cdaa: ; 11cdaa (47:4daa) call ByteFill farcall ReloadMapPart ret -; 11cdc7 (47:4dc7) -String_11cdc7: ; 11cdc7 +String_11cdc7: ; Words will be displayed by category db "ことば¯しゅるいべつに" next "えらべます@" -; 11cdd9 -String_11cdd9: ; 11cdd9 +String_11cdd9: ; Words will be displayed in alphabetical order db "ことば¯アイウエオ の" next "じゅんばんで ひょうじ します@" -; 11cdf5 -String_11cdf5: ; 11cdf5 +String_11cdf5: db "しゅるいべつ モード" ; Category mode next "アイウエオ  モード@" ; ABC mode -; 11ce0b -Function11ce0b: ; 11ce0b (47:4e0b) +Function11ce0b: call EZChat_ClearBottom12Rows hlcoord 1, 7 ld de, String_11cf79 @@ -2076,7 +2030,7 @@ Function11ce0b: ; 11ce0b (47:4e0b) res 2, [hl] call Function11cfb5 -Function11ce2b: ; 11ce2b (47:4e2b) +Function11ce2b: ld a, [wcd22] sla a sla a @@ -2172,9 +2126,8 @@ Function11ce2b: ; 11ce2b (47:4e2b) ret z ld [wcd22], a ret -; 11ceb9 (47:4eb9) -Unknown_11ceb9: ; 11ceb9 +Unknown_11ceb9: ; up left down right db $ff, $01 db $05, $ff @@ -2272,22 +2225,19 @@ Unknown_11ceb9: ; 11ceb9 db $ff, $2d db $2c, $ff db $ff, $2e -; 11cf79 -String_11cf79: ; 11cf79 +String_11cf79: ; Hiragana table db "あいうえお なにぬねの や ゆ よ" next "かきくけこ はひふへほ わ" next "さしすせそ まみむめも そのた" next "たちつてと らりるれろ" db "@" -; 11cfb5 -Function11cfb5: ; 11cfb5 (47:4fb5) +Function11cfb5: ld hl, wJumptableIndex inc [hl] ret -; 11cfba (47:4fba) Unknown_11cfba: db 0, 0 ; start coords @@ -2308,9 +2258,8 @@ Unknown_11cfc6: Unknown_11cfca: db 14, 7 ; start coords db 6, 5 ; end coords -; 11cfce -Function11cfce: ; 11cfce (47:4fce) +Function11cfce: hlcoord 0, 0 ld bc, SCREEN_WIDTH ld a, [de] @@ -2397,7 +2346,7 @@ Function11cfce: ; 11cfce (47:4fce) ld [hl], a ret -Function11d035: ; 11d035 (47:5035) +Function11d035: hlcoord 0, 0 ld bc, SCREEN_WIDTH ld a, [de] @@ -2493,7 +2442,7 @@ Function11d035: ; 11d035 (47:5035) jr nz, .loop3 ret -.AddNMinusOneTimes: ; 11d0ac (47:50ac) +.AddNMinusOneTimes: ld a, [de] dec a ld bc, SCREEN_WIDTH @@ -2503,7 +2452,7 @@ Function11d035: ; 11d035 (47:5035) jr nz, .add_n_minus_one_times ret -AnimateEZChatCursor: ; 11d0b6 (47:50b6) +AnimateEZChatCursor: ld hl, SPRITEANIMSTRUCT_0C add hl, bc ld a, [hl] @@ -2530,21 +2479,21 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) dw .nine dw .ten -.zero ; 11d0dd (47:50dd) +.zero ld a, [wcd20] ; wcd20 sla a ld hl, .Coords_Zero ld e, $1 jr .load -.one ; 11d0e9 (47:50e9) +.one ld a, [wcd21] sla a ld hl, .Coords_One ld e, $2 jr .load -.two ; 11d0f5 (47:50f5) +.two ld hl, .FramesetsIDs_Two ld a, [wcd22] ld e, a @@ -2559,14 +2508,14 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) ld e, $4 jr .load -.three ; 11d10f (47:510f) +.three ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2 call ReinitSpriteAnimFrame ld a, [wMobileCommsJumptableIndex] sla a ld hl, .Coords_Three ld e, $8 -.load ; 11d11e (47:511e) +.load push de ld e, a ld d, $0 @@ -2585,7 +2534,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) call .UpdateObjectFlags ret -.four ; 11d134 (47:5134) +.four ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2 call ReinitSpriteAnimFrame ld a, [wcd2a] @@ -2594,7 +2543,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) ld e, $10 jr .load -.five ; 11d145 (47:5145) +.five ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2 call ReinitSpriteAnimFrame ld a, [wcd2c] @@ -2603,7 +2552,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) ld e, $20 jr .load -.six ; 11d156 (47:5156) +.six ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_5 call ReinitSpriteAnimFrame ; X = [wcd4a] * 8 + 24 @@ -2624,7 +2573,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) call .UpdateObjectFlags ret -.seven ; 11d175 (47:5175) +.seven ld a, [wEZChatCursorYCoord] cp $4 jr z, .cursor0 @@ -2682,15 +2631,15 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) call .UpdateObjectFlags ret -.nine ; 11d1d1 (47:51d1) +.nine ld d, -13 * 8 ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_7 jr .eight_nine_load -.eight ; 11d1d7 (47:51d7) +.eight ld d, 2 * 8 ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_6 -.eight_nine_load ; 11d1db (47:51db) +.eight_nine_load push de call ReinitSpriteAnimFrame ld a, [wcd4a] @@ -2711,16 +2660,15 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) call .UpdateObjectFlags ret -.ten ; 11d1fc (47:51fc) +.ten ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 call ReinitSpriteAnimFrame ld a, $8 ld e, a call .UpdateObjectFlags ret -; 11d208 (47:5208) -.Coords_Zero: ; 11d208 +.Coords_Zero: dbpixel 1, 3, 5, 2 dbpixel 7, 3, 5, 2 dbpixel 13, 3, 5, 2 @@ -2731,7 +2679,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) dbpixel 7, 17, 5, 2 dbpixel 13, 17, 5, 2 -.Coords_One: ; 11d21a +.Coords_One: dbpixel 1, 8, 5, 2 dbpixel 7, 8, 5, 2 dbpixel 13, 8, 5, 2 @@ -2751,7 +2699,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) dbpixel 7, 18, 5, 2 dbpixel 13, 18, 5, 2 -.Coords_Two: ; 11d23e +.Coords_Two: dbpixel 2, 9 ; 00 dbpixel 3, 9 ; 01 dbpixel 4, 9 ; 02 @@ -2801,7 +2749,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) dbpixel 7, 18, 5, 2 ; 2e dbpixel 13, 18, 5, 2 ; 2f -.Coords_Three: ; 11d29e +.Coords_Three: dbpixel 2, 10 dbpixel 8, 10 dbpixel 14, 10 @@ -2815,15 +2763,15 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) dbpixel 8, 16 dbpixel 14, 16 -.Coords_Four: ; 11d2b6 +.Coords_Four: dbpixel 16, 10 dbpixel 16, 12 -.Coords_Five: ; 11d2ba +.Coords_Five: dbpixel 4, 10 dbpixel 4, 12 -.FramesetsIDs_Two: ; 11d2be +.FramesetsIDs_Two: db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 00 db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 01 db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 02 @@ -2873,7 +2821,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 2e db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 2f -.UpdateObjectFlags: ; 11d2ee (47:52ee) +.UpdateObjectFlags: ld hl, wcd24 and [hl] jr nz, .update_y_offset @@ -2914,7 +2862,7 @@ AnimateEZChatCursor: ; 11d0b6 (47:50b6) ld [hl], a ret -Function11d323: ; 11d323 +Function11d323: ld a, [rSVBK] push af ld a, $5 @@ -2926,7 +2874,6 @@ Function11d323: ; 11d323 pop af ld [rSVBK], a ret -; 11d33a Palette_11d33a: RGB 31, 31, 31 @@ -3008,9 +2955,8 @@ Palette_11d33a: RGB 00, 00, 00 RGB 00, 00, 00 RGB 00, 00, 00 -; 11d3ba -EZChat_GetSeenPokemonByKana: ; 11d3ba +EZChat_GetSeenPokemonByKana: ld a, [rSVBK] push af ld hl, $c648 @@ -3039,7 +2985,7 @@ EZChat_GetSeenPokemonByKana: ; 11d3ba ld hl, EZChat_SortedWords ld a, (EZChat_SortedWords.End - EZChat_SortedWords) / 4 -.MasterLoop: ; 11d3ef +.MasterLoop: push af ; read row ; offset @@ -3186,9 +3132,8 @@ EZChat_GetSeenPokemonByKana: ; 11d3ba pop af ld [rSVBK], a ret -; 11d493 -.CheckSeenMon: ; 11d493 +.CheckSeenMon: push hl push bc push de @@ -3204,9 +3149,8 @@ EZChat_GetSeenPokemonByKana: ; 11d3ba pop bc pop hl ret -; 11d4aa -EZChat_GetCategoryWordsByKana: ; 11d4aa +EZChat_GetCategoryWordsByKana: ld a, [rSVBK] push af ld a, $3 @@ -3289,19 +3233,16 @@ EZChat_GetCategoryWordsByKana: ; 11d4aa pop af ld [rSVBK], a ret -; 11d4fe INCLUDE "data/pokemon/ezchat_order.asm" GFX_11d67e: INCBIN "gfx/pokedex/select_start.2bpp" -; 11d6de LZ_11d6de: INCBIN "gfx/pokedex/slowpoke.2bpp.lz" -; 11da52 -MobileEZChatCategoryNames: ; 11da52 +MobileEZChatCategoryNames: ; Fixed message categories db "ポケモン@@" ; 00 db "タイプ@@@" ; 01 @@ -3318,9 +3259,8 @@ MobileEZChatCategoryNames: ; 11da52 db "じかん@@@" ; 0c db "むすび@@@" ; 0d db "あれこれ@@" ; 0e -; 11daac -MobileEZChatCategoryPointers: ; 11daac +MobileEZChatCategoryPointers: ; entries correspond to EZCHAT_* constants dw .Types ; 01 dw .Greetings ; 02 @@ -3337,7 +3277,7 @@ MobileEZChatCategoryPointers: ; 11daac dw .Farewells ; 0d dw .ThisAndThat ; 0e -.Types: ; 11dac8 +.Types: db "あく@@@", $26, $0, $0 db "いわ@@@", $aa, $0, $0 db "エスパー@", $da, $0, $0 @@ -3357,7 +3297,7 @@ MobileEZChatCategoryPointers: ; 11daac db "みず@@@", $f4, $4, $0 db "むし@@@", $12, $5, $0 -.Greetings: ; 11db58 +.Greetings: db "ありがと@", $58, $0, $0 db "ありがとう", $5a, $0, $0 db "いくぜ!@", $80, $0, $0 @@ -3395,7 +3335,7 @@ MobileEZChatCategoryPointers: ; 11daac db "よろしく@", $80, $5, $0 db "らっしゃい", $94, $5, $0 -.People: ; 11dc78 +.People: db "あいて@@", $1c, $0, $0 db "あたし@@", $36, $0, $0 db "あなた@@", $40, $0, $0 @@ -3466,7 +3406,7 @@ MobileEZChatCategoryPointers: ; 11daac db "わたしは@", $ca, $5, $0 db "わたしを@", $cc, $5, $0 -.Battle: ; 11dea0 +.Battle: db "あいしょう", $18, $0, $0 db "いけ!@@", $88, $0, $0 db "いちばん@", $96, $0, $0 @@ -3537,7 +3477,7 @@ MobileEZChatCategoryPointers: ; 11daac db "レべル@@", $a6, $5, $0 db "わざ@@@", $be, $5, $0 -.Exclamations: ; 11e0c8 +.Exclamations: db "!@@@@", $0, $0, $0 db "!!@@@", $2, $0, $0 db "!?@@@", $4, $0, $0 @@ -3605,7 +3545,7 @@ MobileEZChatCategoryPointers: ; 11daac db "わっ!!@", $ce, $5, $0 db "わははは!", $d0, $5, $0 -.Conversation: ; 11e2d8 +.Conversation: db "あのね@@", $50, $0, $0 db "あんまり@", $6e, $0, $0 db "いじわる@", $8e, $0, $0 @@ -3673,7 +3613,7 @@ MobileEZChatCategoryPointers: ; 11daac db "より@@@", $7c, $5, $0 db "れば@@@", $a4, $5, $0 -.Feelings: ; 11e4e8 +.Feelings: db "あいたい@", $1a, $0, $0 db "あそびたい", $32, $0, $0 db "いきたい@", $7c, $0, $0 @@ -3744,7 +3684,7 @@ MobileEZChatCategoryPointers: ; 11daac db "わかり@@", $b6, $5, $0 db "わくわく@", $ba, $5, $0 -.Conditions: ; 11e710 +.Conditions: db "あつい@@", $38, $0, $0 db "あった@@", $3a, $0, $0 db "あり@@@", $56, $0, $0 @@ -3812,7 +3752,7 @@ MobileEZChatCategoryPointers: ; 11daac db "らしい@@", $90, $5, $0 db "わるい@@", $d4, $5, $0 -.Life: ; 11e920 +.Life: db "アルバイト", $64, $0, $0 db "うち@@@", $ba, $0, $0 db "おかね@@", $ee, $0, $0 @@ -3853,7 +3793,7 @@ MobileEZChatCategoryPointers: ; 11daac db "ラジオ@@", $92, $5, $0 db "ワールド@", $ae, $5, $0 -.Hobbies: ; 11ea58 +.Hobbies: db "アイドル@", $1e, $0, $0 db "アニメ@@", $4c, $0, $0 db "うた@@@", $b8, $0, $0 @@ -3894,7 +3834,7 @@ MobileEZChatCategoryPointers: ; 11daac db "やすみ@@", $44, $5, $0 db "よてい@@", $74, $5, $0 -.Actions: ; 11eb90 +.Actions: db "あう@@@", $20, $0, $0 db "あきらめ@", $24, $0, $0 db "あげる@@", $28, $0, $0 @@ -3965,7 +3905,7 @@ MobileEZChatCategoryPointers: ; 11daac db "わかる@@", $b8, $5, $0 db "わすれ@@", $c0, $5, $0 -.Time: ; 11edb8 +.Time: db "あき@@@", $22, $0, $0 db "あさ@@@", $2a, $0, $0 db "あした@@", $2c, $0, $0 @@ -4006,7 +3946,7 @@ MobileEZChatCategoryPointers: ; 11daac db "よる@@@", $7e, $5, $0 db "らいしゅう", $88, $5, $0 -.Farewells: ; 11eef0 +.Farewells: db "いたします", $92, $0, $0 db "おります@", $32, $1, $0 db "か!?@@", $3c, $1, $0 @@ -4074,7 +4014,7 @@ MobileEZChatCategoryPointers: ; 11daac db "わけ@@@", $bc, $5, $0 db "わよ!@@", $d2, $5, $0 -.ThisAndThat: ; 11f100 +.ThisAndThat: db "ああ@@@", $12, $0, $0 db "あっち@@", $3c, $0, $0 db "あの@@@", $4e, $0, $0 @@ -4111,7 +4051,6 @@ MobileEZChatCategoryPointers: ; 11daac db "なんで@@", $f6, $3, $0 db "なんなんだ", $0, $4, $0 db "なんの@@", $2, $4, $0 -; 11f220 MobileEZChatData_WordAndPageCounts: macro_11f220: MACRO diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm index 9e2e35dec01..927b9dbaa35 100644 --- a/mobile/mobile_12.asm +++ b/mobile/mobile_12.asm @@ -1,4 +1,4 @@ -InitMobileProfile: ; 4802f (12:402f) +InitMobileProfile: xor a set 6, a ld [wd002], a @@ -120,12 +120,12 @@ InitMobileProfile: ; 4802f (12:402f) push bc jr asm_4815f -Function48157: ; 48157 (12:4157) +Function48157: call ScrollingMenuJoypad ld hl, wMenuCursorY ld b, [hl] push bc -asm_4815f: ; 4815f (12:415f) +asm_4815f: bit A_BUTTON_F, a jp nz, Function4820d ld b, a @@ -148,7 +148,7 @@ asm_4815f: ; 4815f (12:415f) ld a, $ff ret -Function48187: ; 48187 (12:4187) +Function48187: ld a, [wd479] bit 1, a jr nz, .asm_481f1 @@ -207,13 +207,11 @@ Function48187: ; 48187 (12:4187) call PlaceString .asm_48201 ret -; 48202 (12:4202) -.String_TellLater: ; 48202 +.String_TellLater: db "Tell Later@" -; 4820d -Function4820d: ; 4820d (12:420d) +Function4820d: call PlaceHollowCursor ld hl, wMenuCursorY ld a, [hl] @@ -240,7 +238,6 @@ Function4820d: ; 4820d (12:420d) bit 6, a jr z, .asm_4825c jr .asm_4825c -; 48241 (12:4241) hlcoord 1, 15 ld b, $2 @@ -265,21 +262,19 @@ Function4820d: ; 4820d (12:420d) xor a ret -Function48272: ; 48272 (12:4272) +Function48272: jp Function4840c -; 48275 (12:4275) -MobileString_PersonalInfo: ; 48275 +MobileString_PersonalInfo: db "Personal Info@" -; 48283 -Function48283: ; 48283 (12:4283) +Function48283: lb bc, 2, 18 hlcoord 1, 15 call ClearBox ret -asm_4828d: ; 4828d (12:428d) +asm_4828d: call Function48283 hlcoord 1, 16 ld de, MobileDesc_Gender @@ -331,7 +326,7 @@ asm_4828d: ; 4828d (12:428d) ld [wd003], a jp Function4840c -Function48304: ; 48304 (12:4304) +Function48304: call Function48283 hlcoord 1, 16 ld de, MobileDesc_Address @@ -388,7 +383,7 @@ Function48304: ; 48304 (12:4304) farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap jp Function4840c -Function48383: ; 48383 (12:4383) +Function48383: push bc push af bit 5, a @@ -425,7 +420,7 @@ Function48383: ; 48383 (12:4383) pop bc ret -Function483bb: ; 483bb (12:43bb) +Function483bb: ld hl, wScrollingMenuCursorPosition ld a, [hl] inc a @@ -454,9 +449,8 @@ Function483bb: ; 483bb (12:43bb) hlcoord 11, 8 call PlaceString ret -; 483e8 (12:43e8) -Function483e8: ; 483e8 +Function483e8: push de ld hl, Prefectures ld a, [wMenuSelection] @@ -483,9 +477,8 @@ Function483e8: ; 483e8 pop hl call PlaceString ret -; 4840c -Function4840c: ; 4840c (12:440c) +Function4840c: call Function48187 call Function48283 hlcoord 1, 16 @@ -511,7 +504,7 @@ Function4840c: ; 4840c (12:440c) call ClearBox jp Function48157 -Mobile12_Bin2Dec: ; 48444 (12:4444) +Mobile12_Bin2Dec: push bc push af push de @@ -533,10 +526,8 @@ Mobile12_Bin2Dec: ; 48444 (12:4444) pop af pop bc ret -; 4845d (12:445d) -.DigitStrings: ; 4845d -; 4845d +.DigitStrings: db "0@" db "1@" db "2@" @@ -547,7 +538,6 @@ Mobile12_Bin2Dec: ; 48444 (12:4444) db "7@" db "8@" db "9@" -; 48471 MobileProfileString: db " Mobile Profile@" MobileString_Gender: db "Gender@" @@ -560,7 +550,6 @@ MobileDesc_Gender: db "Boy or girl?@" MobileDesc_Age: db "How old are you?@" MobileDesc_Address: db "Where do you live?@" MobileDesc_ZipCode: db "Your zip code?@" -; 484f1 MenuHeader_0x484f1: ; 0x484f1 db MENU_BACKUP_TILES ; flags @@ -600,7 +589,7 @@ MenuData_0x4851b: ; 0x4851b db SCROLLINGMENU_DISPLAY_ARROWS | SCROLLINGMENU_ENABLE_RIGHT | SCROLLINGMENU_ENABLE_LEFT | SCROLLINGMENU_CALL_FUNCTION1_CANCEL ; flags db 6 ; items -Unknown_4851d: ; 4851d +Unknown_4851d: db $00, $01, $12, $2b, $45, $12, $e8, $43, $00, $00, $00, $00, $00, $00, $2e, $00, $01, $02, $03, $04 db $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $0f, $10, $11, $12, $13, $14, $15, $16, $17, $18 db $19, $1a, $1b, $1c, $1d, $1e, $1f, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $2a, $2b, $2c @@ -654,9 +643,8 @@ Yamagata: db "やまがたけん@" ; Yamagata Yamaguchi: db "やまぐちけん@" ; Yamaguchi Yamanashi: db "やまなしけん@" ; Yamanashi Wakayama: db "わかやまけん@" ; Wakayama -; 48689 -Function48689: ; 48689 (12:4689) +Function48689: ld c, 7 call DelayFrames ld b, $1 @@ -681,7 +669,7 @@ Function48689: ; 48689 (12:4689) call Function48cdc ret -Function486bf: ; 486bf (12:46bf) +Function486bf: ld hl, w2DMenuCursorInitY ld a, [wd002] bit 6, a @@ -752,7 +740,7 @@ Function486bf: ; 486bf (12:46bf) ld [hli], a ; cursor tile + 1 ret -Function48725: ; 48725 (12:4725) +Function48725: ; ld a, [wd003] ; and $f ; cp $f @@ -779,7 +767,7 @@ Function48725: ; 48725 (12:4725) and a ret -Function4873c: ; 4873c (12:473c) +Function4873c: ld hl, w2DMenuCursorInitY ld a, 4 ld [hli], a @@ -820,7 +808,7 @@ Function4873c: ; 4873c (12:473c) ld [hli], a ; cursor tile + 1 ret -Function4876f: ; 4876f (12:476f) +Function4876f: call Function48283 hlcoord 1, 16 ld de, MobileDesc_Age @@ -879,7 +867,7 @@ Function4876f: ; 4876f (12:476f) ld [hInMenu], a jp Function4840c -Function487ec: ; 487ec (12:47ec) +Function487ec: push hl ld de, wd473 call Function487ff @@ -891,7 +879,7 @@ endr call PlaceString ret -Function487ff: ; 487ff (12:47ff) +Function487ff: push hl ld a, " " ld [hli], a @@ -901,13 +889,11 @@ Function487ff: ; 487ff (12:47ff) ld c, 3 call PrintNum ret -; 4880d (12:480d) -String_4880d: ; 4880d +String_4880d: db "@" -; 4880e -Function4880e: ; 4880e (12:480e) +Function4880e: ld a, [hJoyPressed] and A_BUTTON jp nz, Function488b9 @@ -1001,27 +987,26 @@ Function4880e: ; 4880e (12:480e) and a ret -Function488b4: ; 488b4 (12:48b4) +Function488b4: ld a, $0 and a scf ret -Function488b9: ; 488b9 (12:48b9) +Function488b9: ld a, [wd003] set 1, a ld [wd003], a scf ret -; 488c3 (12:48c3) -MobileUpArrowGFX: ; 488c3 +MobileUpArrowGFX: INCBIN "gfx/mobile/up_arrow.2bpp" -MobileDownArrowGFX: ; 488cb +MobileDownArrowGFX: INCBIN "gfx/mobile/down_arrow.2bpp" -Function488d3: ; 488d3 (12:48d3) +Function488d3: call Function48283 hlcoord 1, 16 ld de, MobileDesc_ZipCode @@ -1057,7 +1042,7 @@ Function488d3: ; 488d3 (12:48d3) ld d, $0 ld b, $0 -asm_48922: ; 48922 (12:4922) +asm_48922: push bc call JoyTextDelay ld a, [hJoyDown] @@ -1089,9 +1074,8 @@ asm_48922: ; 48922 (12:4922) ld c, 10 call DelayFrames jr asm_48972 -; 4895a (12:495a) -Function4895a: ; 4895a +Function4895a: ld a, [hJoyPressed] and a jr z, .asm_48965 @@ -1109,12 +1093,12 @@ Function4895a: ; 4895a ld b, $1 push bc -Function4896e: ; 4896e (12:496e) +Function4896e: pop bc ld b, $0 push bc -asm_48972: ; 48972 (12:4972) +asm_48972: call Function48ab5 push af cp $f0 @@ -1181,7 +1165,7 @@ asm_48972: ; 48972 (12:4972) ld [hInMenu], a jp Function4840c -Function489ea: ; 489ea (12:49ea) +Function489ea: push de ld a, [wd475] and $f @@ -1218,13 +1202,11 @@ Function489ea: ; 489ea (12:49ea) call Mobile12_Bin2Dec pop de ret -; 48a38 (12:4a38) -String_48a38: ; 48a38 +String_48a38: db "-@" -; 48a3a -Function48a3a: ; 48a3a (12:4a3a) +Function48a3a: ld hl, MenuHeader_0x48a9c call LoadMenuHeader call Function4873c @@ -1266,22 +1248,20 @@ Function48a3a: ; 48a3a (12:4a3a) and a ret -Function48a9a: ; 48a9a (12:4a9a) +Function48a9a: scf ret -; 48a9c (12:4a9c) MenuHeader_0x48a9c: ; 0x48a9c db MENU_BACKUP_TILES ; flags menu_coords 10, 8, SCREEN_WIDTH - 1, 13 -String_48aa1: ; 48aa1 +String_48aa1: db "Tell Now" next "Tell Later@" -; 48ab5 -Function48ab5: ; 48ab5 (12:4ab5) +Function48ab5: ld a, [hJoyPressed] and A_BUTTON jp nz, Function48c0f @@ -1457,7 +1437,7 @@ Function48ab5: ; 48ab5 (12:4ab5) ld a, [hl] and $f -asm_48bc7: ; 48bc7 (12:4bc7) +asm_48bc7: hlcoord 11, 10 push af ld a, d @@ -1470,7 +1450,7 @@ asm_48bc7: ; 48bc7 (12:4bc7) ld a, $f jr Function48c00 -Function48bd7: ; 48bd7 (12:4bd7) +Function48bd7: push de hlcoord 10, 9 ld b, $1 @@ -1501,7 +1481,7 @@ Function48bd7: ; 48bd7 (12:4bd7) and $f jr asm_48bc7 -Function48c00: ; 48c00 (12:4c00) +Function48c00: push af hlcoord 11, 10 call Function489ea @@ -1511,15 +1491,15 @@ Function48c00: ; 48c00 (12:4c00) ld a, b ret -Function48c0d: ; 48c0d (12:4c0d) +Function48c0d: xor a and a -Function48c0f: ; 48c0f (12:4c0f) +Function48c0f: scf ret -Function48c11: ; 48c11 (12:4c11) +Function48c11: ld a, [wd002] bit 7, a jr z, .asm_48c20 @@ -1556,7 +1536,7 @@ Function48c11: ; 48c11 (12:4c11) ld [wd002], a ret -Function48c4d: ; 48c4d (12:4c4d) +Function48c4d: swap a and $f0 push af @@ -1568,7 +1548,7 @@ Function48c4d: ; 48c4d (12:4c4d) ld [hl], a ret -Function48c5a: ; 48c5a (12:4c5a) +Function48c5a: push af ld a, [hl] and $f0 @@ -1578,7 +1558,7 @@ Function48c5a: ; 48c5a (12:4c5a) ld [hl], a ret -Function48c63: ; 48c63 +Function48c63: ld a, "@" ld [de], a ld a, c @@ -1613,9 +1593,8 @@ Function48c63: ; 48c63 .asm_48c8c scf ret -; 48c8e -Unreferenced_Function48c8e: ; 48c8e +Unreferenced_Function48c8e: ld hl, wd019 + $11 ld d, h ld e, l @@ -1624,9 +1603,8 @@ Unreferenced_Function48c8e: ; 48c8e call PlaceString call WaitBGMap ret -; 48ca3 -Function48ca3: ; 48ca3 +Function48ca3: push af push bc push de @@ -1669,13 +1647,12 @@ Function48ca3: ; 48ca3 pop bc pop af ret -; 48cda -Function48cda: ; 48cda (12:4cda) +Function48cda: ld h, d ld l, e -Function48cdc: ; 48cdc (12:4cdc) +Function48cdc: push bc push hl call Function48cfd @@ -1703,7 +1680,7 @@ Function48cdc: ; 48cdc (12:4cdc) jr nz, .asm_48ced ret -Function48cfd: ; 48cfd (12:4cfd) +Function48cfd: push hl ld a, $4 ld [hli], a @@ -1733,7 +1710,7 @@ Function48cfd: ; 48cfd (12:4cfd) ld [hl], $b ret -Function48d2a: ; 48d2a (12:4d2a) +Function48d2a: ld d, c .asm_48d2b ld [hli], a @@ -1741,21 +1718,21 @@ Function48d2a: ; 48d2a (12:4d2a) jr nz, .asm_48d2b ret -Function48d30: ; 48d30 (12:4d30) +Function48d30: ld hl, wd475 call Function48d4a ld hl, wd477 call Function48d4a ret -Function48d3d: ; 48d3d (12:4d3d) +Function48d3d: ld hl, wd475 call Function48d94 ld hl, wd477 call Function48d94 ret -Function48d4a: ; 48d4a (12:4d4a) +Function48d4a: inc hl ld a, [hl] ld b, a @@ -1805,7 +1782,7 @@ Function48d4a: ; 48d4a (12:4d4a) ld [hl], b ret -Function48d94: ; 48d94 (12:4d94) +Function48d94: xor a ld [hDividend + 0], a ld [hDividend + 1], a diff --git a/mobile/mobile_12_2.asm b/mobile/mobile_12_2.asm index 47eb2f3bf00..f2b548b55d7 100644 --- a/mobile/mobile_12_2.asm +++ b/mobile/mobile_12_2.asm @@ -1,4 +1,4 @@ -MobileCheckOwnMonAnywhere: ; 4a843 +MobileCheckOwnMonAnywhere: ; Like CheckOwnMonAnywhere, but only check for species. ; OT/ID don't matter. @@ -103,9 +103,8 @@ MobileCheckOwnMonAnywhere: ; 4a843 call CloseSRAM and a ret -; 4a8dc -.CheckMatch: ; 4a8dc +.CheckMatch: push bc push hl push de @@ -130,9 +129,8 @@ MobileCheckOwnMonAnywhere: ; 4a843 pop bc scf ret -; 4a8f4 -.BoxAddrs: ; 4a8f4 +.BoxAddrs: dba sBox1 dba sBox2 dba sBox3 @@ -147,9 +145,8 @@ MobileCheckOwnMonAnywhere: ; 4a843 dba sBox12 dba sBox13 dba sBox14 -; 4a91e -.CopyName: ; 4a91e +.CopyName: push hl ld hl, NAME_LENGTH add hl, bc @@ -157,9 +154,8 @@ MobileCheckOwnMonAnywhere: ; 4a843 ld c, l pop hl ret -; 4a927 -UnusedFindItemInPCOrBag: ; 4a927 +UnusedFindItemInPCOrBag: ld a, [wScriptVar] ld [wCurItem], a ld hl, wPCItems @@ -180,9 +176,8 @@ UnusedFindItemInPCOrBag: ; 4a927 ld a, 1 ld [wScriptVar], a ret -; 4a94e -Function4a94e: ; 4a94e +Function4a94e: call FadeToMenu ld a, -1 ld hl, wd002 @@ -243,7 +238,6 @@ Function4a94e: ; 4a94e ld hl, UnknownText_0x4a9be call PrintText jr .asm_4a974 -; 4a9be UnknownText_0x4a9be: ; 0x4a9be ; Pick three #MON for battle. @@ -251,7 +245,7 @@ UnknownText_0x4a9be: ; 0x4a9be db "@" ; 0x4a9c3 -Function4a9c3: ; 4a9c3 +Function4a9c3: ld hl, wd002 ld a, $ff cp [hl] @@ -268,9 +262,8 @@ Function4a9c3: ; 4a9c3 .asm_4a9d5 scf ret -; 4a9d7 -Function4a9d7: ; 4a9d7 +Function4a9d7: ld a, [wd002] ld hl, wPartyMonNicknames call GetNick @@ -299,7 +292,6 @@ Function4a9d7: ; 4a9d7 call PrintText call YesNoBox ret -; 4aa1d UnknownText_0x4aa1d: ; 0x4aa1d ; , @ and @ . Use these three? @@ -307,15 +299,15 @@ UnknownText_0x4aa1d: ; 0x4aa1d db "@" ; 0x4aa22 -Function4aa22: ; 4aa22 +Function4aa22: call ClearBGPalettes -Function4aa25: ; 4aa25 +Function4aa25: farcall LoadPartyMenuGFX farcall InitPartyMenuWithCancel call Function4aad3 -Function4aa34: ; 4aa34 +Function4aa34: ld a, PARTYMENUACTION_MOBILE ld [wPartyMenuActionText], a farcall WritePartyMenuTilemap @@ -343,17 +335,15 @@ Function4aa34: ; 4aa34 set 1, [hl] pop af ret -; 4aa6e -Function4aa6e: ; 4aa6e +Function4aa6e: pop af ld de, SFX_WRONG call PlaySFX call WaitSFX jr Function4aa34 -; 4aa7a -Function4aa7a: ; 4aa7a +Function4aa7a: ld hl, wd002 ld d, $3 .loop @@ -406,9 +396,8 @@ Function4aa7a: ; 4aa7a .finished ret -; 4aab6 -Function4aab6: ; 4aab6 +Function4aab6: ld hl, wd002 ld d, $3 .loop @@ -428,9 +417,8 @@ Function4aab6: ; 4aab6 .done ret -; 4aad3 -Function4aad3: ; 4aad3 +Function4aad3: ld hl, wPartyCount ld a, [hli] and a @@ -455,9 +443,8 @@ Function4aad3: ; 4aad3 call Function4aa7a farcall PlaySpriteAnimations ret -; 4aafb -Function4aafb: ; 4aafb +Function4aafb: ld a, [wCurPartySpecies] cp EGG jr z, .egg @@ -467,9 +454,8 @@ Function4aafb: ; 4aafb .egg scf ret -; 4ab06 -Function4ab06: ; 4ab06 +Function4ab06: ld a, [wCurPartyMon] ld bc, PARTYMON_STRUCT_LENGTH ld hl, wPartyMon1HP @@ -483,9 +469,8 @@ Function4ab06: ; 4ab06 .NotFainted: ret -; 4ab1a -Function4ab1a: ; 4ab1a +Function4ab1a: .asm_4ab1a ld a, $fb ld [wMenuJoypadFilter], a @@ -549,9 +534,8 @@ Function4ab1a: ; 4ab1a ld [wd018], a and a ret -; 4ab99 -Function4ab99: ; 4ab99 +Function4ab99: bit 1, a jr z, .asm_4aba6 ld a, [wd002] @@ -563,9 +547,8 @@ Function4ab99: ; 4ab99 .asm_4aba6 and a ret -; 4aba8 -Function4aba8: ; 4aba8 +Function4aba8: ld hl, wd004 ld a, [hl] cp $ff @@ -586,9 +569,8 @@ Function4aba8: ; 4aba8 ld [hl], a scf ret -; 4abc3 -Function4abc3: ; 4abc3 +Function4abc3: bit 3, a jr z, .asm_4abd5 ld a, [wPartyCount] @@ -677,9 +659,8 @@ Function4abc3: ; 4abc3 .asm_4ac56 and a ret -; 4ac58 -Function4ac58: ; 4ac58 +Function4ac58: lb bc, 2, 18 hlcoord 1, 15 call ClearBox @@ -712,7 +693,6 @@ Function4ac58: ; 4ac58 call ExitMenu and a ret -; 4aca2 MenuHeader_0x4aca2: ; 0x4aca2 db MENU_BACKUP_TILES ; flags @@ -721,7 +701,7 @@ MenuHeader_0x4aca2: ; 0x4aca2 db 1 ; default option ; 0x4acaa -Function4acaa: ; 4acaa +Function4acaa: .asm_4acaa ld a, $a0 ld [wMenuDataFlags], a @@ -780,7 +760,7 @@ Function4acaa: ; 4acaa jr z, Function4ad56 jr .asm_4acf3 -Function4ad17: ; 4ad17 +Function4ad17: call Function4adb2 jr z, .asm_4ad4a ld hl, wd002 @@ -821,22 +801,19 @@ UnknownText_0x4ad51: ; 0x4ad51 db "@" ; 0x4ad56 -Function4ad56: ; 4ad56 +Function4ad56: farcall OpenPartyStats call WaitBGMap2 ret -; 4ad60 -Function4ad60: ; 4ad60 +Function4ad60: farcall ManagePokemonMoves ret -; 4ad67 -Function4ad67: ; 4ad67 +Function4ad67: ret -; 4ad68 -Function4ad68: ; 4ad68 +Function4ad68: hlcoord 13, 12 ld de, String_4ad88 call PlaceString @@ -853,28 +830,23 @@ Function4ad68: ; 4ad68 .asm_4ad84 call PlaceString ret -; 4ad88 -String_4ad88: ; 4ad88 +String_4ad88: db "つよさをみる" next "つかえるわざ" next "もどる@" -; 4ad9a -String_4ad9a: ; 4ad9a +String_4ad9a: db "さんかする@" -; 4ada0 -String_4ada0: ; 4ada0 +String_4ada0: db "さんかしない@" -; 4ada7 -String_4ada7: ; 4ada7 +String_4ada7: db "つよさをみる" next "もどる@" ; BACK -; 4adb2 -Function4adb2: ; 4adb2 +Function4adb2: ld hl, wd002 ld a, [wCurPartyMon] cp [hl] @@ -887,9 +859,8 @@ Function4adb2: ; 4adb2 ret z scf ret -; 4adc2 -Function4adc2: ; 4adc2 +Function4adc2: ld a, [wd002] cp $ff jr nz, .skip @@ -917,9 +888,8 @@ Function4adc2: ; 4adc2 ld a, b ld [wd004], a ret -; 4adf7 -Function4adf7: ; 4adf7 +Function4adf7: ld a, [wd019] bit 0, a ret z @@ -932,4 +902,3 @@ Function4adf7: ; 4adf7 res 0, a ld [wd019], a ret -; 4ae12 diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm index 99963bcebdb..3535b90e56b 100644 --- a/mobile/mobile_22.asm +++ b/mobile/mobile_22.asm @@ -1,52 +1,48 @@ String_89116: db "-----@" -String_8911c: ; 8911c +String_8911c: db "でんわばんごうが ただしく" ; Phone number is not next "はいって いません!@" ; entered correctly! -; 89135 -String_89135: ; 89135 +String_89135: db "データが かわって いますが" ; The data has changed. next "かきかえないで やめますか?@" ; Quit anyway? -; 89153 -String_89153: ; 89153 +String_89153: db "メッセージは ありません@" ; No message -; 89160 -OpenSRAMBank4: ; 89160 +OpenSRAMBank4: push af ld a, $4 call GetSRAMBank pop af ret -; 89168 -Function89168: ; 89168 (22:5168) +Function89168: ld hl, wGameTimerPause set GAMETIMERPAUSE_MOBILE_7_F, [hl] ret -Function8916e: ; 8916e (22:516e) +Function8916e: ld hl, wGameTimerPause res GAMETIMERPAUSE_MOBILE_7_F, [hl] ret -Function89174: ; 89174 (22:5174) +Function89174: ld hl, wGameTimerPause bit GAMETIMERPAUSE_MOBILE_7_F, [hl] ret -Function8917a: ; 8917a (22:517a) +Function8917a: ld hl, wd002 ld bc, $32 xor a call ByteFill ret -Function89185: ; 89185 (22:5185) +Function89185: ; strcmp(hl, de, c) ; Compares c bytes starting at de and hl and incrementing together until a mismatch is found. ; Preserves hl and de. @@ -65,7 +61,7 @@ Function89185: ; 89185 (22:5185) pop de ret -Function89193: ; 89193 +Function89193: ; copy(hl, de, 4) ; Copies c bytes from hl to de. ; Preserves hl and de. @@ -80,10 +76,9 @@ Function89193: ; 89193 pop hl pop de ret -; 8919e -Function8919e: ; 8919e (22:519e) +Function8919e: ; Searches for the c'th string starting at de. Returns the pointer in de. ld a, c and a @@ -97,14 +92,13 @@ Function8919e: ; 8919e (22:519e) jr nz, .loop ret -Function891ab: ; 891ab +Function891ab: call Mobile22_SetBGMapMode1 farcall ReloadMapPart call Mobile22_SetBGMapMode0 ret -; 891b8 -Function891b8: ; 891b8 +Function891b8: call Mobile22_SetBGMapMode0 hlcoord 0, 0 ld a, " " @@ -112,17 +106,16 @@ Function891b8: ; 891b8 call ByteFill call DelayFrame ret -; 891ca -Function891ca: ; 891ca (22:51ca) +Function891ca: push bc call Function891b8 call WaitBGMap pop bc ret -Function891d3: ; 891d3 (22:51d3) +Function891d3: push bc call Function891ca ld c, $10 @@ -130,7 +123,7 @@ Function891d3: ; 891d3 (22:51d3) pop bc ret -Function891de: ; 891de +Function891de: call Mobile22_SetBGMapMode0 call ClearPalettes hlcoord 0, 0, wAttrMap @@ -143,30 +136,26 @@ Function891de: ; 891de call ByteFill call Function891ab ret -; 891fe -Function891fe: ; 891fe +Function891fe: push bc call Function891de ld c, $10 call DelayFrames pop bc ret -; 89209 -Function89209: ; 89209 +Function89209: ld a, 1 ld [wSpriteUpdatesEnabled], a ret -; 8920f -Function8920f: ; 8920f +Function8920f: ld a, 0 ld [wSpriteUpdatesEnabled], a ret -; 89215 -Function89215: ; 89215 +Function89215: push hl push bc ld bc, wAttrMap - wTileMap @@ -175,10 +164,9 @@ Function89215: ; 89215 pop bc pop hl ret -; 8921f -Function8921f: ; 8921f (22:521f) +Function8921f: push de ld de, SCREEN_WIDTH add hl, de @@ -199,43 +187,41 @@ Function8921f: ; 8921f (22:521f) pop de ret -Mobile22_ButtonSound: ; 89235 (22:5235) +Mobile22_ButtonSound: call JoyWaitAorB call PlayClickSFX ret -Mobile22_SetBGMapMode0: ; 8923c +Mobile22_SetBGMapMode0: xor a ld [hBGMapMode], a ret -; 89240 -Mobile22_SetBGMapMode1: ; 89240 +Mobile22_SetBGMapMode1: ld a, $1 ld [hBGMapMode], a ret -; 89245 -Function89245: ; 89245 (22:5245) +Function89245: farcall TryLoadSaveFile ret c farcall _LoadData and a ret -Function89254: ; 89254 (22:5254) +Function89254: ld bc, $d07 jr Function89261 -Function89259: ; 89259 +Function89259: ld bc, $0e07 jr Function89261 -Function8925e: ; 8925e +Function8925e: ld bc, $0e0c -Function89261: ; 89261 +Function89261: push af push bc ld hl, MenuHeader_0x892a3 @@ -274,7 +260,6 @@ Function89261: ; 89261 .done scf ret -; 892a3 MenuHeader_0x892a3: ; 0x892a3 db MENU_BACKUP_TILES ; flags @@ -290,10 +275,10 @@ MenuData_0x892ab: ; 0x892ab db "いいえ@" ; 0x892b4 -Function892b4: ; 892b4 (22:52b4) +Function892b4: call Function8931b -Function892b7: ; 892b7 +Function892b7: ld d, b ld e, c ld hl, 0 @@ -340,10 +325,9 @@ Function892b7: ; 892b7 dec e jr nz, .loop ret -; 89305 -Function89305: ; 89305 (22:5305) +Function89305: xor a ld [wMenuSelection], a ld c, 40 @@ -358,7 +342,7 @@ Function89305: ; 89305 (22:5305) jr nz, .loop ret -Function8931b: ; 8931b +Function8931b: push hl ld hl, $a03b ; 4:a03b ld a, [wMenuSelection] @@ -369,13 +353,12 @@ Function8931b: ; 8931b ld c, l pop hl ret -; 8932d -Function8932d: ; 8932d +Function8932d: ld hl, 0 add hl, bc -Function89331: ; 89331 +Function89331: ; Scans up to 5 characters starting at hl, looking for a nonspace character up to the next terminator. ; Sets carry if it does not find a nonspace character. ; Returns the location of the following character in hl. @@ -400,15 +383,14 @@ Function89331: ; 89331 .done pop bc ret -; 89346 -Function89346: ; 89346 (22:5346) +Function89346: ld h, b ld l, c jr _incave -Function8934a: ; 8934a +Function8934a: ld hl, NAME_LENGTH_JAPANESE add hl, bc _incave: @@ -434,9 +416,8 @@ _incave: .done pop bc ret -; 89363 -Function89363: ; 89363 +Function89363: ; Scans six byte pairs starting at bc to find $ff. Sets carry if it does not find a $ff. Returns the location of the byte after the first $ff found in hl. ld h, b ld l, c @@ -466,9 +447,8 @@ Function89363: ; 89363 .done pop de ret -; 89381 -Function89381: ; 89381 +Function89381: push bc push de call Function89b45 @@ -485,9 +465,8 @@ Function89381: ; 89381 call Function89193 pop bc ret -; 8939a -Function8939a: ; 8939a +Function8939a: push bc ld hl, 0 add hl, bc @@ -500,10 +479,9 @@ Function8939a: ; 8939a ld de, wd008 call Function89381 ret -; 893b3 -Function893b3: ; 893b3 (22:53b3) +Function893b3: call DisableLCD call ClearSprites call LoadStandardFont @@ -514,7 +492,7 @@ Function893b3: ; 893b3 (22:53b3) call EnableLCD ret -Function893cc: ; 893cc +Function893cc: call DisableLCD call ClearSprites call LoadStandardFont @@ -523,38 +501,34 @@ Function893cc: ; 893cc call Function89464 call EnableLCD ret -; 893e2 -Function893e2: ; 893e2 (22:53e2) +Function893e2: call Function89b1e call Function893b3 call Function8a5b6 call Function8949c ret -Function893ef: ; 893ef +Function893ef: ld de, vTiles0 ld hl, GFX_8940b ld bc, $20 ld a, BANK(GFX_8940b) call FarCopyBytes ret -; 893fe -Function893fe: ; 893fe +Function893fe: call DisableLCD call Function893ef call EnableLCD call DelayFrame ret -; 8940b -GFX_8940b: ; 8940b +GFX_8940b: INCBIN "gfx/unknown/08940b.2bpp" -; 8942b -Function8942b: ; 8942b (22:542b) +Function8942b: ld de, vTiles0 tile $02 ld hl, MobileAdapterGFX + $7d tiles ld bc, 8 tiles @@ -567,7 +541,7 @@ Function8942b: ; 8942b (22:542b) call FarCopyBytes ret -Function89448: ; 89448 (22:5448) +Function89448: ; Clears the sprite array push af ld hl, wVirtualOAM @@ -580,7 +554,7 @@ Function89448: ; 89448 (22:5448) pop af ret -Function89455: ; 89455 (22:5455) +Function89455: ld hl, MobileAdapterGFX + $7d tiles ld de, vTiles2 tile $0c ld bc, $49 tiles @@ -588,7 +562,7 @@ Function89455: ; 89455 (22:5455) call FarCopyBytes ret -Function89464: ; 89464 +Function89464: ld hl, MobileAdapterGFX ld de, vTiles2 ld bc, $20 tiles @@ -600,9 +574,8 @@ Function89464: ; 89464 ld a, BANK(MobileAdapterGFX) call FarCopyBytes ret -; 89481 -Function89481: ; 89481 +Function89481: ld d, 2 call Function8934a ret c @@ -613,10 +586,9 @@ Function89481: ; 89481 ret z inc d ret -; 89492 -Function89492: ; 89492 (22:5492) +Function89492: ld d, 0 ld a, [wPlayerGender] bit PLAYERGENDER_FEMALE_F, a @@ -624,7 +596,7 @@ Function89492: ; 89492 (22:5492) inc d ret -Function8949c: ; 8949c +Function8949c: ld a, [rSVBK] push af ld a, 5 @@ -636,16 +608,14 @@ Function8949c: ; 8949c pop af ld [rSVBK], a ret -; 894b3 -Palette_894b3: ; 894b3 +Palette_894b3: RGB 31, 31, 31 RGB 31, 31, 31 RGB 31, 31, 31 RGB 00, 00, 00 -; 894bb -Function894bb: ; 894bb +Function894bb: call Function894dc push bc call Function8956f @@ -653,10 +623,9 @@ Function894bb: ; 894bb call Function8a60d pop bc ret -; 894ca -Function894ca: ; 894ca (22:54ca) +Function894ca: push bc call Function894dc call Function895c7 @@ -666,7 +635,7 @@ Function894ca: ; 894ca (22:54ca) pop bc ret -Function894dc: ; 894dc +Function894dc: push bc ld a, [rSVBK] push af @@ -693,15 +662,13 @@ Function894dc: ; 894dc ld [rSVBK], a pop bc ret -; 89509 -.PalettePointers: ; 89509 +.PalettePointers: dw .Pals012a dw .Pals012b dw .Pals012c -; 8950f -.Pals012a: ; 8950f +.Pals012a: RGB 31, 31, 31 RGB 10, 17, 13 RGB 10, 08, 22 @@ -717,7 +684,7 @@ Function894dc: ; 894dc RGB 10, 17, 13 RGB 00, 00, 00 -.Pals012b: ; 89527 +.Pals012b: RGB 31, 31, 31 RGB 30, 22, 11 RGB 31, 08, 15 @@ -733,7 +700,7 @@ Function894dc: ; 894dc RGB 30, 22, 11 RGB 00, 00, 00 -.Pals012c: ; 8953f +.Pals012c: RGB 31, 31, 31 RGB 15, 20, 26 RGB 25, 07, 20 @@ -749,7 +716,7 @@ Function894dc: ; 894dc RGB 15, 20, 26 RGB 00, 00, 00 -.Pals345: ; 89557 +.Pals345: RGB 31, 31, 31 RGB 31, 31, 31 RGB 31, 13, 00 @@ -764,9 +731,8 @@ Function894dc: ; 894dc RGB 00, 00, 00 RGB 00, 00, 00 RGB 00, 00, 00 -; 8956f -Function8956f: ; 8956f +Function8956f: push bc ld hl, 16 add hl, bc @@ -819,10 +785,9 @@ Function8956f: ; 8956f ld [rSVBK], a pop bc ret -; 895c7 -Function895c7: ; 895c7 (22:55c7) +Function895c7: ld a, [rSVBK] push af ld a, 5 @@ -834,24 +799,21 @@ Function895c7: ; 895c7 (22:55c7) pop af ld [rSVBK], a ret -; 895de (22:55de) -Palette_895de: ; 895de +Palette_895de: RGB 31, 31, 31 RGB 07, 07, 06 RGB 07, 07, 06 RGB 00, 00, 00 -; 895e6 -Function895e6: ; 895e6 +Function895e6: ld a, 7 hlcoord 0, 0, wAttrMap ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call ByteFill ret -; 895f2 -Function895f2: ; 895f2 +Function895f2: push bc xor a hlcoord 0, 0, wAttrMap @@ -861,9 +823,8 @@ Function895f2: ; 895f2 call Function89655 pop bc ret -; 89605 -Function89605: ; 89605 +Function89605: hlcoord 19, 2, wAttrMap ld a, 1 ld de, SCREEN_WIDTH @@ -899,9 +860,8 @@ Function89605: ; 89605 ld bc, 14 call ByteFill ret -; 8963d -Function8963d: ; 8963d +Function8963d: hlcoord 12, 3, wAttrMap ld a, 6 ld de, SCREEN_WIDTH @@ -918,9 +878,8 @@ Function8963d: ; 8963d dec b jr nz, .loop ret -; 89655 -Function89655: ; 89655 +Function89655: hlcoord 1, 12, wAttrMap ld de, SCREEN_WIDTH ld a, 5 @@ -937,9 +896,8 @@ Function89655: ; 89655 dec b jr nz, .loop ret -; 8966c -Function8966c: ; 8966c +Function8966c: push bc call Function89688 hlcoord 4, 0 @@ -947,10 +905,9 @@ Function8966c: ; 8966c call Function896f5 pop bc ret -; 8967a -Function8967a: ; 8967a (22:567a) +Function8967a: push bc call Function89688 hlcoord 2, 0 @@ -959,7 +916,7 @@ Function8967a: ; 8967a (22:567a) pop bc ret -Function89688: ; 89688 +Function89688: hlcoord 0, 0 ld a, 1 ld e, SCREEN_WIDTH @@ -997,9 +954,8 @@ Function89688: ; 89688 ld e, SCREEN_WIDTH call Function896eb ret -; 896cb -Function896cb: ; 896cb +Function896cb: ld de, SCREEN_WIDTH - 1 ld a, 7 ld [hl], a @@ -1007,9 +963,8 @@ Function896cb: ; 896cb ld a, 9 ld [hli], a ret -; 896d6 -Function896d6: ; 896d6 +Function896d6: ld de, SCREEN_WIDTH - 1 ld a, 10 ld [hl], a @@ -1017,9 +972,8 @@ Function896d6: ; 896d6 ld a, 11 ld [hli], a ret -; 896e1 -Function896e1: ; 896e1 +Function896e1: .loop ld [hli], a inc a @@ -1030,9 +984,8 @@ Function896e1: ; 896e1 dec e jr nz, .loop ret -; 896eb -Function896eb: ; 896eb +Function896eb: .loop ld [hli], a dec a @@ -1043,9 +996,8 @@ Function896eb: ; 896eb dec e jr nz, .loop ret -; 896f5 -Function896f5: ; 896f5 +Function896f5: call Function8971f call Function89736 inc hl @@ -1089,7 +1041,7 @@ ClearScreenArea: ; 0x896ff ret ; 0x8971f -Function8971f: ; 8971f +Function8971f: ld a, $2c ld [hli], a ld a, $2d @@ -1106,9 +1058,8 @@ Function8971f: ; 8971f ld [hl], a pop hl ret -; 89736 -Function89736: ; 89736 +Function89736: push hl inc hl inc hl @@ -1130,17 +1081,15 @@ Function89736: ; 89736 ld [hl], a pop hl ret -; 89753 -Function89753: ; 89753 +Function89753: ld a, $c ld [hl], a xor a call Function89215 ret -; 8975b -Function8975b: ; 8975b +Function8975b: ld a, $1d ld [hli], a inc a @@ -1157,17 +1106,15 @@ Function8975b: ; 8975b dec e jr nz, .asm_89769 ret -; 89771 -Function89771: ; 89771 +Function89771: ld a, $12 ld [hl], a ld a, $3 call Function89215 ret -; 8977a -Function8977a: ; 8977a +Function8977a: ld e, $4 ld d, $13 .asm_8977e @@ -1189,9 +1136,8 @@ Function8977a: ; 8977a dec e jr nz, .asm_8978c ret -; 89797 -Function89797: ; 89797 +Function89797: push bc ld a, $e ld [hl], a @@ -1209,9 +1155,8 @@ Function89797: ; 89797 ld [hl], a pop bc ret -; 897af -Function897af: ; 897af +Function897af: push bc ld hl, $0010 add hl, bc @@ -1230,9 +1175,8 @@ Function897af: ; 897af farcall GetTrainerPic pop bc ret -; 897d5 -Function897d5: ; 897d5 +Function897d5: push bc call Function8934a jr nc, .asm_897f3 @@ -1263,10 +1207,9 @@ Function897d5: ; 897d5 call Function8963d pop bc ret -; 89807 -Function89807: ; 89807 (22:5807) +Function89807: ld hl, MobileAdapterGFX + $20 tiles ld a, [wPlayerGender] bit PLAYERGENDER_FEMALE_F, a @@ -1282,7 +1225,7 @@ Function89807: ; 89807 (22:5807) call DelayFrame ret -Function89829: ; 89829 (22:5829) +Function89829: push bc ld bc, $705 ld de, $14 @@ -1304,7 +1247,7 @@ Function89829: ; 89829 (22:5829) pop bc ret -Function89844: ; 89844 +Function89844: call Function89481 call Function894bb call Function897af @@ -1313,9 +1256,8 @@ Function89844: ; 89844 call SetPalettes pop bc ret -; 89856 -Function89856: ; 89856 +Function89856: push bc call Function891b8 pop bc @@ -1333,10 +1275,9 @@ Function89856: ; 89856 pop bc call Function897d5 ret -; 8987f -Function8987f: ; 8987f (22:587f) +Function8987f: call Function891b8 call Function895f2 call Function8967a @@ -1353,7 +1294,7 @@ Function8987f: ; 8987f (22:587f) call Function89975 ret -Function898aa: ; 898aa +Function898aa: ld a, [wMenuSelection] and a ret z @@ -1364,9 +1305,8 @@ Function898aa: ; 898aa call PrintNum pop bc ret -; 898be -Function898be: ; 898be +Function898be: push bc ld de, wd002 ld hl, wd002 @@ -1385,9 +1325,8 @@ Function898be: ; 898be call PlaceString pop bc ret -; 898dc -Function898dc: ; 898dc +Function898dc: ld hl, $0006 add hl, bc push bc @@ -1402,9 +1341,8 @@ Function898dc: ; 898dc call PlaceString pop bc ret -; 898f3 -Function898f3: ; 898f3 +Function898f3: push bc ld hl, $000c add hl, bc @@ -1425,9 +1363,8 @@ Function898f3: ; 898f3 .asm_89913 pop bc ret -; 89915 -Function89915: ; 89915 +Function89915: push bc push hl ld de, Unknown_89942 @@ -1461,15 +1398,13 @@ Function89915: ; 89915 jr nz, .asm_89932 pop bc ret -; 89942 -Unknown_89942: ; 89942 +Unknown_89942: db $24, $25, $26, " ", $27, $28, $29, $2a -Unknown_8994a: ; 8994a +Unknown_8994a: db $24, $27, $29, $ff -; 8994e -Function8994e: ; 8994e +Function8994e: push hl push de ld de, SCREEN_WIDTH @@ -1486,9 +1421,8 @@ Function8994e: ; 8994e pop de pop hl ret -; 89962 -Function89962: ; 89962 +Function89962: push bc ld c, $4 ld b, $20 @@ -1503,9 +1437,8 @@ Function89962: ; 89962 jr nz, .asm_89967 pop bc ret -; 89975 -Function89975: ; 89975 +Function89975: push bc ld e, $8 .asm_89978 @@ -1522,9 +1455,8 @@ Function89975: ; 89975 jr nz, .asm_89978 pop bc ret -; 8998b -Function8998b: ; 8998b +Function8998b: push bc and $f cp $a @@ -1540,10 +1472,9 @@ Function8998b: ; 8998b ld [hl], a pop bc ret -; 8999c -Function8999c: ; 8999c (22:599c) +Function8999c: ld de, wPlayerName call PlaceString inc bc @@ -1552,13 +1483,11 @@ Function8999c: ; 8999c (22:599c) ld de, String_899ac call PlaceString ret -; 899ac (22:59ac) -String_899ac: ; 899ac +String_899ac: db "の めいし@" -; 899b2 -Function899b2: ; 899b2 (22:59b2) +Function899b2: ld bc, wPlayerName call Function89346 jr c, .asm_899bf @@ -1571,13 +1500,13 @@ Function899b2: ; 899b2 (22:59b2) call PlaceString ret -Function899c9: ; 899c9 (22:59c9) +Function899c9: ld de, wPlayerID lb bc, PRINTNUM_LEADINGZEROS | 2, 5 call PrintNum ret -Function899d3: ; 899d3 +Function899d3: hlcoord 1, 4 call Function89753 hlcoord 2, 5 @@ -1593,9 +1522,8 @@ Function899d3: ; 899d3 hlcoord 2, 9 call Function89915 ret -; 899fe -Function899fe: ; 899fe +Function899fe: push bc push hl ld hl, $0019 @@ -1606,9 +1534,8 @@ Function899fe: ; 899fe call Function89a0c pop bc ret -; 89a0c -Function89a0c: ; 89a0c +Function89a0c: push hl call Function89363 pop hl @@ -1622,17 +1549,16 @@ Function89a0c: ; 89a0c ld de, String_89153 call PlaceString ret -; 89a23 -Function89a23: ; 89a23 (22:5a23) +Function89a23: hlcoord 0, 11 ld b, $4 ld c, $12 call Function8921f ret -Function89a2e: ; 89a2e (22:5a2e) +Function89a2e: hlcoord 11, 12 ld b, $2 ld c, $6 @@ -1645,17 +1571,14 @@ Function89a2e: ; 89a2e (22:5a2e) call PlaceString call Function89655 ret -; 89a4e (22:5a4e) -String_89a4e: ; 89a4e +String_89a4e: db "けってい@" -; 89a53 -String_89a53: ; 89a53 +String_89a53: db "やめる@" -; 89a57 -Function89a57: ; 89a57 +Function89a57: call JoyTextDelay_ForcehJoyDown ; joypad bit D_UP_F, c jr nz, .d_up @@ -1691,31 +1614,27 @@ Function89a57: ; 89a57 call nc, .PlayPocketSwitchSFX ld a, $0 ret -; 89a8a -.PlayPocketSwitchSFX: ; 89a8a +.PlayPocketSwitchSFX: push af ld de, SFX_SWITCH_POCKETS call PlaySFX pop af ret -; 89a93 -.MoveCursorDown: ; 89a93 +.MoveCursorDown: ld d, 40 ld e, 1 call .ApplyCursorMovement ret -; 89a9b -.MoveCursorUp: ; 89a9b +.MoveCursorUp: ld d, 1 ld e, -1 call .ApplyCursorMovement ret -; 89aa3 -.ApplyCursorMovement: ; 89aa3 +.ApplyCursorMovement: ld a, [wMenuSelection] ld c, a push bc @@ -1742,17 +1661,15 @@ Function89a57: ; 89a57 ld [wMenuSelection], a scf ret -; 89ac7 -.Function89ac7: ; 89ac7 +.Function89ac7: call OpenSRAMBank4 call Function8931b call .Function89ad4 call CloseSRAM ret -; 89ad4 -.Function89ad4: ; 89ad4 +.Function89ad4: push de call Function8932d ; find a non-space character within 5 bytes of bc jr c, .no_nonspace_character @@ -1767,9 +1684,8 @@ Function89a57: ; 89a57 .finish_decode pop de ret -; 89ae6 -.Function89ae6: ; 89ae6 +.Function89ae6: ld hl, wd031 xor a ld [hl], a @@ -1788,34 +1704,30 @@ Function89a57: ; 89a57 .load_and_ret ld [wd030], a ret -; 89b00 -Function89b00: ; 89b00 (22:5b00) +Function89b00: farcall MG_Mobile_Layout_LoadPals ret -; 89b07 (22:5b07) -Function89b07: ; 89b07 +Function89b07: call Mobile22_SetBGMapMode0 call DelayFrame farcall Function4a3a7 ret -; 89b14 -Function89b14: ; 89b14 +Function89b14: call ClearBGPalettes call Function89b07 call Function89b00 ret -; 89b1e -Function89b1e: ; 89b1e (22:5b1e) +Function89b1e: farcall Function4a485 call Function89b00 ret -Function89b28: ; 89b28 (22:5b28) +Function89b28: call Function891de call ClearBGPalettes call Function893e2 @@ -1824,12 +1736,12 @@ Function89b28: ; 89b28 (22:5b28) call SetPalettes ret -Function89b3b: ; 89b3b (22:5b3b) +Function89b3b: call Mobile22_SetBGMapMode0 farcall Function48cda ret -Function89b45: ; 89b45 +Function89b45: ; some sort of decoder? ; BCD? push hl @@ -1877,10 +1789,9 @@ Function89b45: ; 89b45 pop bc pop hl ret -; 89b78 -Function89b78: ; 89b78 (22:5b78) +Function89b78: push bc ld a, [wd010] cp $10 @@ -1904,7 +1815,7 @@ Function89b78: ; 89b78 (22:5b78) pop bc ret -Function89b97: ; 89b97 (22:5b97) +Function89b97: call Function89c34 jr c, .asm_89ba0 call Function89448 @@ -1955,45 +1866,42 @@ Function89b97: ; 89b97 (22:5b97) ld c, $4 add hl, bc jr .asm_89bb4 -; 89bd8 (22:5bd8) -Unknown_89bd8: ; 89bd8 +Unknown_89bd8: dw Unknown_89be0 dw Unknown_89bf5 dw Unknown_89c0a dw Unknown_89c1f -; 89be0 -Unknown_89be0: ; 89be0 +Unknown_89be0: db $01, $12, $4e, $01, 0 db $01, $19, $4e, $01, 0 | Y_FLIP db $01, $12, $72, $01, 0 | X_FLIP db $01, $19, $72, $01, 0 | X_FLIP | Y_FLIP db -1 ; end -Unknown_89bf5: ; 89bf5 +Unknown_89bf5: db $01, $60, $16, $01, 0 db $01, $62, $16, $01, 0 | Y_FLIP db $01, $60, $92, $01, 0 | X_FLIP db $01, $62, $92, $01, 0 | X_FLIP | Y_FLIP db -1 ; end -Unknown_89c0a: ; 89c0a +Unknown_89c0a: db $01, $78, $66, $01, 0 db $01, $78, $66, $01, 0 | Y_FLIP db $01, $78, $92, $01, 0 | X_FLIP db $01, $78, $92, $01, 0 | X_FLIP | Y_FLIP db -1 ; end -Unknown_89c1f: ; 89c1f +Unknown_89c1f: db $01, $80, $66, $01, 0 db $01, $80, $66, $01, 0 | Y_FLIP db $01, $80, $92, $01, 0 | X_FLIP db $01, $80, $92, $01, 0 | X_FLIP | Y_FLIP db -1 ; end -; 89c34 -Function89c34: ; 89c34 (22:5c34) +Function89c34: push bc ld a, [wd012] ld c, a @@ -2005,7 +1913,7 @@ Function89c34: ; 89c34 (22:5c34) pop bc ret -Function89c44: ; 89c44 (22:5c44) +Function89c44: call Function89c34 jr c, .asm_89c4f push de @@ -2035,7 +1943,7 @@ Function89c44: ; 89c44 (22:5c44) ld [hli], a ; attributes ret -Function89c67: ; 89c67 (22:5c67) +Function89c67: ; menu scrolling? call JoyTextDelay_ForcehJoyDown ; joypad ld b, $0 @@ -2099,22 +2007,20 @@ Function89c67: ; 89c67 (22:5c67) xor a ld [wd012], a ret -; 89cbf (22:5cbf) -.ScrollData0: ; 89cbf +.ScrollData0: db 0, 2, 0, 0 db 1, 3, 0, 0 db 2, 4, 0, 0 db 3, 0, 0, 0 -.ScrollData1: ; 89ccf +.ScrollData1: db 0, 0, 0, 0 db 0, 3, 0, 0 db 2, 4, 0, 0 db 3, 0, 0, 0 -; 89cdf -Function89cdf: ; 89cdf (22:5cdf) +Function89cdf: ld a, $10 add b ld b, a @@ -2152,7 +2058,7 @@ Function89cdf: ; 89cdf (22:5cdf) jr nz, .asm_89cee ret -Function89d0d: ; 89d0d (22:5d0d) +Function89d0d: call Mobile22_SetBGMapMode0 ld a, [rSVBK] push af @@ -2185,23 +2091,20 @@ Function89d0d: ; 89d0d (22:5d0d) call DelayFrames call RestartMapMusic ret -; 89d4e (22:5d4e) -.Palette1: ; 89d4e +.Palette1: RGB 31, 31, 31 RGB 19, 19, 19 RGB 15, 15, 15 RGB 00, 00, 00 -; 89d56 -.Palette2: ; 89d56 +.Palette2: RGB 31, 31, 31 RGB 19, 19, 19 RGB 19, 19, 19 RGB 00, 00, 00 -; 89d5e -Function89d5e: ; 89d5e (22:5d5e) +Function89d5e: push af call CopyMenuHeader pop af @@ -2213,7 +2116,7 @@ Function89d5e: ; 89d5e (22:5d5e) set 7, [hl] ret -Function89d75: ; 89d75 (22:5d75) +Function89d75: push hl call Mobile22_SetBGMapMode0 call _hl_ @@ -2221,14 +2124,14 @@ Function89d75: ; 89d75 (22:5d75) pop hl jr asm_89d90 -Function89d85: ; 89d85 (22:5d85) +Function89d85: push hl call Mobile22_SetBGMapMode0 call _hl_ call CGBOnly_CopyTilemapAtOnce pop hl -asm_89d90: ; 89d90 (22:5d90) +asm_89d90: call Mobile22_SetBGMapMode0 push hl call _hl_ @@ -2246,7 +2149,7 @@ asm_89d90: ; 89d90 (22:5d90) and a ret -Function89dab: ; 89dab (22:5dab) +Function89dab: call Mobile22_SetBGMapMode0 farcall MobileMenuJoypad call Mobile22_SetBGMapMode0 @@ -2276,7 +2179,7 @@ Function89dab: ; 89dab (22:5dab) and a ret -Function89de0: ; 89de0 (22:5de0) +Function89de0: call ClearSprites call Function89e0a jr c, .asm_89e00 @@ -2299,13 +2202,13 @@ Function89de0: ; 89de0 (22:5de0) call Function8917a ret -Jumptable_89e04: ; 89e04 (22:5e04) +Jumptable_89e04: dw Function8a62c dw Function8a999 dw Function8ab93 -Function89e0a: ; 89e0a (22:5e0a) +Function89e0a: call OpenSRAMBank4 call Function8b3b0 call CloseSRAM @@ -2313,32 +2216,32 @@ Function89e0a: ; 89e0a (22:5e0a) rst JumpTable ret -Jumptable_89e18: ; 89e18 (22:5e18) +Jumptable_89e18: dw Function89e1e dw Function8a116 dw Function8a2aa -Function89e1e: ; 89e1e (22:5e1e) +Function89e1e: call OpenSRAMBank4 - ld bc, $a037 ; 4:a037 + ld bc, $a037 call Function8b36c call CloseSRAM xor a ld [wd02d], a -asm_89e2e: ; 89e2e (22:5e2e) +asm_89e2e: ld a, [wd02d] ld hl, Jumptable_89e3c rst JumpTable ret -Function89e36: ; 89e36 (22:5e36) +Function89e36: ld hl, wd02d inc [hl] jr asm_89e2e -Jumptable_89e3c: ; 89e3c (22:5e3c) +Jumptable_89e3c: dw Function89e6f dw Function89fed dw Function89ff6 @@ -2355,7 +2258,7 @@ Jumptable_89e3c: ; 89e3c (22:5e3c) dw Function89e68 -Function89e58: ; 89e58 (22:5e58) +Function89e58: ld a, $1 call Function8a2fe call Function891fe @@ -2364,13 +2267,13 @@ Function89e58: ; 89e58 (22:5e58) and a ret -Function89e68: ; 89e68 (22:5e68) +Function89e68: call Function891fe ld a, $1 scf ret -Function89e6f: ; 89e6f (22:5e6f) +Function89e6f: call Function891de call Function89245 call Function89ee1 @@ -2387,7 +2290,7 @@ Function89e6f: ; 89e6f (22:5e6f) call SetPalettes jp Function89e36 -Function89e9a: ; 89e9a (22:5e9a) +Function89e9a: ld a, [rSVBK] push af ld a, $5 @@ -2399,16 +2302,14 @@ Function89e9a: ; 89e9a (22:5e9a) pop af ld [rSVBK], a ret -; 89eb1 (22:5eb1) -Palette_89eb1: ; 89eb1 +Palette_89eb1: RGB 31, 31, 31 RGB 31, 31, 31 RGB 27, 19, 00 RGB 00, 00, 00 -; 89eb9 -Function89eb9: ; 89eb9 (22:5eb9) +Function89eb9: call Function891fe call Function89ee1 call Function89e9a @@ -2424,7 +2325,7 @@ Function89eb9: ; 89eb9 (22:5eb9) call SetPalettes jp Function89e36 -Function89ee1: ; 89ee1 (22:5ee1) +Function89ee1: call ClearBGPalettes call Function893e2 call Mobile22_SetBGMapMode0 @@ -2434,7 +2335,7 @@ Function89ee1: ; 89ee1 (22:5ee1) call Function8a53d ret -Function89efd: ; 89efd (22:5efd) +Function89efd: ld hl, wd012 ld a, $ff ld [hli], a @@ -2508,7 +2409,7 @@ endr jr nz, .asm_89f60 jp Function89e36 -Function89f6a: ; 89f6a (22:5f6a) +Function89f6a: push af ld de, $10 call Function89f9a @@ -2519,7 +2420,7 @@ Function89f6a: ; 89f6a (22:5f6a) pop af ret -Function89f77: ; 89f77 (22:5f77) +Function89f77: push af ld de, $10 call Function89f9a @@ -2548,7 +2449,7 @@ Function89f77: ; 89f77 (22:5f77) pop af ret -Function89f9a: ; 89f9a (22:5f9a) +Function89f9a: dec a ld hl, wVirtualOAM and a @@ -2559,7 +2460,7 @@ Function89f9a: ; 89f9a (22:5f9a) jr nz, .asm_89fa0 ret -Function89fa5: ; 89fa5 (22:5fa5) +Function89fa5: ld de, $10 call Function89f9a ld e, $2 @@ -2592,7 +2493,7 @@ Function89fa5: ; 89fa5 (22:5fa5) jr nz, .asm_89faf ret -Function89fce: ; 89fce (22:5fce) +Function89fce: call Function8a5b6 ld a, $5 hlcoord 7, 4, wAttrMap @@ -2605,12 +2506,12 @@ Function89fce: ; 89fce (22:5fce) call Function891ab jp Function89e36 -Function89fed: ; 89fed (22:5fed) +Function89fed: ld hl, UnknownText_0x8a102 call PrintText jp Function89e36 -Function89ff6: ; 89ff6 (22:5ff6) +Function89ff6: call Function891fe call ClearBGPalettes call Function893cc @@ -2636,19 +2537,19 @@ Function89ff6: ; 89ff6 (22:5ff6) call Mobile22_ButtonSound jp Function89e36 -Function8a03d: ; 8a03d (22:603d) +Function8a03d: ld hl, UnknownText_0x8a107 call Function89209 call PrintText call Function8920f jp Function89e36 -Function8a04c: ; 8a04c (22:604c) +Function8a04c: ld hl, UnknownText_0x8a10c call PrintText jp Function89e36 -Function8a055: ; 8a055 (22:6055) +Function8a055: ld c, $7 ld b, $4 .asm_8a059 @@ -2687,7 +2588,7 @@ Function8a055: ; 8a055 (22:6055) call CGBOnly_CopyTilemapAtOnce jp Function89e36 -Function8a0a1: ; 8a0a1 (22:60a1) +Function8a0a1: call Mobile22_SetBGMapMode0 push bc call Function8a0c9 @@ -2708,7 +2609,7 @@ Function8a0a1: ; 8a0a1 (22:60a1) pop bc ret -Function8a0c1: ; 8a0c1 (22:60c1) +Function8a0c1: push hl ld bc, wAttrMap - wTileMap add hl, bc @@ -2716,7 +2617,7 @@ Function8a0c1: ; 8a0c1 (22:60c1) pop hl ret -Function8a0c9: ; 8a0c9 (22:60c9) +Function8a0c9: push bc hlcoord 0, 0 ld de, $14 @@ -2734,30 +2635,29 @@ Function8a0c9: ; 8a0c9 (22:60c9) pop bc ret -Function8a0de: ; 8a0de (22:60de) +Function8a0de: call Function8a0c9 ld de, wAttrMap - wTileMap add hl, de ret -Function8a0e6: ; 8a0e6 (22:60e6) +Function8a0e6: call Function8b539 jp Function89e36 -Function8a0ec: ; 8a0ec (22:60ec) +Function8a0ec: ld hl, UnknownText_0x8a111 call PrintText jp Function89e36 -Function8a0f5: ; 8a0f5 (22:60f5) +Function8a0f5: call Function8b555 jp nc, Function8a0ff ld hl, wd02d inc [hl] -Function8a0ff: ; 8a0ff (22:60ff) +Function8a0ff: jp Function89e36 -; 8a102 (22:6102) UnknownText_0x8a102: ; 0x8a102 ; The CARD FOLDER stores your and your friends' CARDS. A CARD contains information like the person's name, phone number and profile. @@ -2783,7 +2683,7 @@ UnknownText_0x8a111: ; 0x8a111 db "@" ; 0x8a116 -Function8a116: ; 8a116 (22:6116) +Function8a116: ld a, $1 ld [wd030], a ld hl, MenuHeader_0x8a176 @@ -2828,14 +2728,12 @@ Function8a116: ; 8a116 (22:6116) call Function8920f scf ret -; 8a176 (22:6176) MenuHeader_0x8a176: ; 0x8a176 db MENU_BACKUP_TILES ; flags menu_coords 14, 0, SCREEN_WIDTH - 1, 6 -; 8a17b -Function8a17b: ; 8a17b (22:617b) +Function8a17b: decoord 14, 0 ld b, $5 ld c, $4 @@ -2850,7 +2748,6 @@ Function8a17b: ; 8a17b (22:617b) .asm_8a198 ld d, a ret -; 8a19a (22:619a) MenuHeader_0x8a19a: ; 0x8a19a db MENU_BACKUP_TILES ; flags @@ -2867,7 +2764,7 @@ MenuData_0x8a1a2: ; 0x8a1a2 db "もどる@" ; 0x8a1b0 -Function8a1b0: ; 8a1b0 +Function8a1b0: hlcoord 0, 12 ld b, $4 ld c, $12 @@ -2880,9 +2777,8 @@ Function8a1b0: ; 8a1b0 call Function8919e call PlaceString ret -; 8a1cc -Strings_8a1cc: ; 8a1cc +Strings_8a1cc: db "めいしせいりと へんしゅうを" next "おこないます" db "@" @@ -2893,10 +2789,9 @@ Strings_8a1cc: ; 8a1cc db "まえがめんもどります" db "@" -; 8a20d -Function8a20d: ; 8a20d (22:620d) +Function8a20d: ld hl, UnknownText_0x8a232 call PrintText ld a, $2 @@ -2914,7 +2809,6 @@ Function8a20d: ; 8a20d (22:620d) xor a and a ret -; 8a232 (22:6232) UnknownText_0x8a232: ; 0x8a232 ; If the CARD FOLDER is deleted, all its CARDS and the PASSCODE will also be deleted. Beware--a deleted CARD FOLDER can't be restored. Want to delete your CARD FOLDER? @@ -2934,7 +2828,7 @@ UnknownText_0x8a23c: ; 0x8a23c db "@" ; 0x8a241 -Function8a241: ; 8a241 (22:6241) +Function8a241: call LoadStandardMenuHeader call Function891fe call Function8a262 @@ -2951,7 +2845,7 @@ Function8a241: ; 8a241 (22:6241) and a ret -Function8a262: ; 8a262 (22:6262) +Function8a262: call ClearBGPalettes call Function893e2 call Mobile22_SetBGMapMode0 @@ -2977,7 +2871,7 @@ Function8a262: ; 8a262 (22:6262) call Function8b5e7 ret -Function8a2aa: ; 8a2aa (22:62aa) +Function8a2aa: ld hl, MenuHeader_0x8a2ef call LoadMenuHeader ld hl, UnknownText_0x8a2f4 @@ -3009,12 +2903,10 @@ Function8a2aa: ; 8a2aa (22:62aa) .asm_8a2ed scf ret -; 8a2ef (22:62ef) MenuHeader_0x8a2ef: ; 0x8a2ef db MENU_BACKUP_TILES ; flags menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 -; 8a2f4 UnknownText_0x8a2f4: ; 0x8a2f4 ; There is an older CARD FOLDER from a previous journey. Do you want to open it? @@ -3028,7 +2920,7 @@ UnknownText_0x8a2f9: ; 0x8a2f9 db "@" ; 0x8a2fe -Function8a2fe: ; 8a2fe (22:62fe) +Function8a2fe: call Function8a313 call Function89305 ld hl, $a603 @@ -3038,14 +2930,14 @@ Function8a2fe: ; 8a2fe (22:62fe) call CloseSRAM ret -Function8a313: ; 8a313 (22:6313) +Function8a313: ld c, a call OpenSRAMBank4 ld a, c ld [$a60b], a ret -Function8a31c: ; 8a31c (22:631c) +Function8a31c: push bc call Mobile22_SetBGMapMode0 farcall Function4a3a7 @@ -3090,7 +2982,7 @@ Function8a31c: ; 8a31c (22:631c) and a ret -Function8a383: ; 8a383 (22:6383) +Function8a383: farcall MobileMenuJoypad ld a, c ld hl, wMenuJoypadFilter @@ -3110,7 +3002,7 @@ Function8a383: ; 8a383 (22:6383) call PlayClickSFX ret -Function8a3a2: ; 8a3a2 (22:63a2) +Function8a3a2: ld a, [wMenuCursorY] dec a ld hl, wd002 @@ -3121,7 +3013,7 @@ Function8a3a2: ; 8a3a2 (22:63a2) ld [wMenuSelection], a ret -Function8a3b2: ; 8a3b2 (22:63b2) +Function8a3b2: ld a, $1 ld [wMenuSelection], a call Function8a4fc @@ -3143,7 +3035,7 @@ Function8a3b2: ; 8a3b2 (22:63b2) call CopyMenuHeader ret -Function8a3df: ; 8a3df (22:63df) +Function8a3df: call OpenSRAMBank4 ld hl, $a603 call Function89b45 @@ -3160,14 +3052,13 @@ Function8a3df: ; 8a3df (22:63df) and a ret -Function8a400: ; 8a400 (22:6400) +Function8a400: ld a, [de] inc de ld [hli], a cp $ff jr nz, Function8a400 ret -; 8a408 (22:6408) Unknown_8a408: db 1, 2, -1 Unknown_8a40b: db 1, 2, 3, -1 @@ -3203,7 +3094,7 @@ MenuData_0x8a43d: ; 0x8a43d db "やめる@" ; 0x8a453 -Function8a453: ; 8a453 (22:6453) +Function8a453: hlcoord 0, 12 ld b, $4 ld c, $12 @@ -3220,13 +3111,11 @@ Function8a453: ; 8a453 (22:6453) .asm_8a472 call PlaceString ret -; 8a476 (22:6476) -String_8a476: ; 8a476 +String_8a476: db "まえがめんもどります@" -; 8a483 -Strings_8a483: ; 8a483 +Strings_8a483: db "おともだちめいしは" next "ここいれておきます@" @@ -3235,9 +3124,8 @@ Strings_8a483: ; 8a483 db "ともだちと じぶんめいしを" next "せきがいせんで こうかん します@" -; 8a4d3 -Function8a4d3: ; 8a4d3 (22:64d3) +Function8a4d3: ld a, [wMenuSelection] cp $1 jr nz, .asm_8a4eb @@ -3257,7 +3145,7 @@ Function8a4d3: ; 8a4d3 (22:64d3) call Function8a5a3 ret -Function8a4fc: ; 8a4fc (22:64fc) +Function8a4fc: ld a, [wMenuSelection] cp $3 jr nz, asm_8a529 @@ -3273,7 +3161,7 @@ Function8a4fc: ; 8a4fc (22:64fc) call Function8a515 ret -Function8a515: ; 8a515 (22:6515) +Function8a515: ld hl, wd012 ld a, [hl] cp $38 @@ -3287,7 +3175,7 @@ Function8a515: ; 8a515 (22:6515) ld [wd013], a ret -asm_8a529: ; 8a529 (22:6529) +asm_8a529: ld hl, wd012 ld a, $3c ld [hli], a @@ -3299,7 +3187,7 @@ asm_8a529: ; 8a529 (22:6529) call ByteFill ret -Function8a53d: ; 8a53d (22:653d) +Function8a53d: push hl ld a, $15 ld c, $8 @@ -3328,7 +3216,7 @@ Function8a53d: ; 8a53d (22:653d) ld a, $27 ld c, $6 -Function8a573: ; 8a573 (22:6573) +Function8a573: ld [hl], a call Function8a584 inc a @@ -3336,14 +3224,14 @@ Function8a573: ; 8a573 (22:6573) jr nz, Function8a573 ret -Function8a57c: ; 8a57c (22:657c) +Function8a57c: ld [hl], a call Function8a584 dec c jr nz, Function8a57c ret -Function8a584: ; 8a584 (22:6584) +Function8a584: push af ld a, $4 call Function89215 @@ -3351,7 +3239,7 @@ Function8a584: ; 8a584 (22:6584) pop af ret -Function8a58d: ; 8a58d (22:658d) +Function8a58d: ld a, $2d ld bc, $606 ld de, $14 @@ -3370,7 +3258,7 @@ Function8a58d: ; 8a58d (22:658d) jr nz, .asm_8a595 ret -Function8a5a3: ; 8a5a3 (22:65a3) +Function8a5a3: ld bc, $603 ld de, $14 .asm_8a5a9 @@ -3387,7 +3275,7 @@ Function8a5a3: ; 8a5a3 (22:65a3) jr nz, .asm_8a5a9 ret -Function8a5b6: ; 8a5b6 (22:65b6) +Function8a5b6: ld a, [rSVBK] push af ld a, $5 @@ -3407,9 +3295,8 @@ Function8a5b6: ; 8a5b6 (22:65b6) pop af ld [rSVBK], a ret -; 8a5e5 (22:65e5) -Palette_8a5e5: ; 8a5e5 +Palette_8a5e5: RGB 31, 31, 31 RGB 27, 19, 00 RGB 07, 11, 22 @@ -3424,23 +3311,20 @@ Palette_8a5e5: ; 8a5e5 RGB 31, 00, 00 RGB 27, 19, 00 RGB 00, 00, 00 -; 8a5fd -Palette_8a5fd: ; 8a5fd +Palette_8a5fd: RGB 00, 00, 00 RGB 00, 00, 00 RGB 00, 00, 00 RGB 31, 31, 31 -; 8a605 -Palette_8a605: ; 8a605 +Palette_8a605: RGB 00, 00, 00 RGB 14, 18, 31 RGB 16, 16, 31 RGB 31, 31, 31 -; 8a60d -Function8a60d: ; 8a60d +Function8a60d: ld a, [rSVBK] push af ld a, $5 @@ -3452,16 +3336,14 @@ Function8a60d: ; 8a60d pop af ld [rSVBK], a ret -; 8a624 -Palette_8a624: ; 8a624 +Palette_8a624: RGB 31, 31, 31 RGB 31, 31, 31 RGB 31, 31, 31 RGB 00, 00, 00 -; 8a62c -Function8a62c: ; 8a62c (22:662c) +Function8a62c: call LoadStandardMenuHeader call Function891fe xor a @@ -3499,14 +3381,14 @@ Function8a62c: ; 8a62c (22:662c) call Function89b28 ret -Jumptable_8a671: ; 8a671 (22:6671) +Jumptable_8a671: dw Function8a679 dw Function8a6cd dw Function8a8c3 dw Function8a930 -Function8a679: ; 8a679 (22:6679) +Function8a679: call Function891de call ClearBGPalettes call Function893cc @@ -3535,23 +3417,23 @@ Function8a679: ; 8a679 (22:6679) call Function89448 ret -Jumptable_8a6bc: ; 8a6bc (22:66bc) +Jumptable_8a6bc: dw Function8a6c0 dw Function8a6c5 -Function8a6c0: ; 8a6c0 (22:66c0) +Function8a6c0: call PlayClickSFX and a ret -Function8a6c5: ; 8a6c5 (22:66c5) +Function8a6c5: call PlayClickSFX call Function89d0d scf ret -Function8a6cd: ; 8a6cd (22:66cd) +Function8a6cd: call Function891de call ClearBGPalettes call Function893cc @@ -3607,14 +3489,14 @@ Function8a6cd: ; 8a6cd (22:66cd) call Function8b677 ret -Jumptable_8a74f: ; 8a74f (22:674f) +Jumptable_8a74f: dw Function8a78c dw Function8a7cb dw Function8a818 dw Function8a8a1 -Function8a757: ; 8a757 (22:6757) +Function8a757: call Function8939a xor a ld [wd010], a @@ -3622,7 +3504,7 @@ Function8a757: ; 8a757 (22:6757) ld [wd012], a ret -Function8a765: ; 8a765 (22:6765) +Function8a765: call Function8931b push bc ld hl, $0 @@ -3646,7 +3528,7 @@ Function8a765: ; 8a765 (22:6765) scf ret -Function8a78c: ; 8a78c (22:678c) +Function8a78c: call Function891fe ld de, wd002 ld b, $5 @@ -3673,7 +3555,7 @@ Function8a78c: ; 8a78c (22:678c) and a ret -Function8a7cb: ; 8a7cb (22:67cb) +Function8a7cb: ld a, [wMenuSelection] push af call Function891de @@ -3706,7 +3588,7 @@ Function8a7cb: ; 8a7cb (22:67cb) and a ret -Function8a818: ; 8a818 (22:6818) +Function8a818: call Function89a23 ld hl, wd002 call Function89331 @@ -3743,7 +3625,6 @@ Function8a818: ; 8a818 (22:6818) call CloseSRAM scf ret -; 8a868 (22:6868) .string_8a868 db "めいしかきかえ まし@" @@ -3760,14 +3641,12 @@ Function8a818: ; 8a818 (22:6818) call JoyWaitAorB and a ret -; 8a88b (22:688b) -String_8a88b: ; 8a88b +String_8a88b: db "おともだちなまえが" next "かかれて いません!@" -; 8a8a1 -Function8a8a1: ; 8a8a1 (22:68a1) +Function8a8a1: call OpenSRAMBank4 call Function8a765 call CloseSRAM @@ -3786,7 +3665,7 @@ Function8a8a1: ; 8a8a1 (22:68a1) and a ret -Function8a8c3: ; 8a8c3 (22:68c3) +Function8a8c3: call Function891de call ClearBGPalettes call Function893cc @@ -3818,17 +3697,14 @@ Function8a8c3: ; 8a8c3 (22:68c3) call Function891fe call Function8b677 ret -; 8a919 (22:6919) -String_8a919: ; 8a919 +String_8a919: db "このデータけしますか?@" -; 8a926 -String_8a926: ; 8a926 +String_8a926: db "データけしまし@" -; 8a930 -Function8a930: ; 8a930 (22:6930) +Function8a930: ld a, [wMenuSelection] push af xor a @@ -3883,7 +3759,7 @@ Function8a930: ; 8a930 (22:6930) call CloseSRAM ret -Function8a999: ; 8a999 (22:6999) +Function8a999: ld hl, MenuHeader_0x8a9c9 call LoadMenuHeader ld c, $1 @@ -3908,17 +3784,15 @@ Function8a999: ; 8a999 (22:6999) call Function8920f ret -Jumptable_8a9c5: ; 8a9c5 (22:69c5) +Jumptable_8a9c5: dw Function8aa0a dw Function8ab3b -; 8a9c9 (22:69c9) MenuHeader_0x8a9c9: ; 0x8a9c9 db MENU_BACKUP_TILES ; flags menu_coords 11, 4, 18, TEXTBOX_Y - 1 -; 8a9ce -Function8a9ce: ; 8a9ce (22:69ce) +Function8a9ce: push bc decoord 11, 4 ld b, $6 @@ -3940,7 +3814,6 @@ Function8a9ce: ; 8a9ce (22:69ce) ld e, $0 scf ret -; 8a9f2 (22:69f2) MenuHeader_0x8a9f2: ; 0x8a9f2 db MENU_BACKUP_TILES ; flags @@ -3957,11 +3830,10 @@ MenuData_0x8a9fa: ; 0x8a9fa db "やめる@" ; 0x8aa09 -Function8aa09: ; 8aa09 +Function8aa09: ret -; 8aa0a -Function8aa0a: ; 8aa0a (22:6a0a) +Function8aa0a: ld a, $1 ld [wd02f], a ld [wd011], a @@ -4006,13 +3878,13 @@ Function8aa0a: ; 8aa0a (22:6a0a) call Function89448 ret -Jumptable_8aa6d: ; 8aa6d (22:6a6d) +Jumptable_8aa6d: dw Function8aa73 dw Function8aab6 dw Function8ab11 -Function8aa73: ; 8aa73 (22:6a73) +Function8aa73: ld a, [wMenuSelection] ld e, a push de @@ -4043,7 +3915,7 @@ Function8aa73: ; 8aa73 (22:6a73) and a ret -Function8aab6: ; 8aab6 (22:6ab6) +Function8aab6: call Function89a23 ld hl, wd008 call Function89b45 @@ -4067,13 +3939,11 @@ Function8aab6: ; 8aab6 (22:6ab6) call CloseSRAM scf ret -; 8aaf0 (22:6af0) -String_8aaf0: ; 8aaf0 +String_8aaf0: db "あたらしい めいしできまし@" -; 8ab00 -Function8ab00: ; 8ab00 +Function8ab00: ld de, String_8911c hlcoord 1, 13 call PlaceString @@ -4082,7 +3952,7 @@ Function8ab00: ; 8ab00 and a ret -Function8ab11: ; 8ab11 (22:6b11) +Function8ab11: call OpenSRAMBank4 ld hl, $a603 ld de, wd008 @@ -4104,7 +3974,7 @@ Function8ab11: ; 8ab11 (22:6b11) and a ret -Function8ab3b: ; 8ab3b (22:6b3b) +Function8ab3b: .pressed_start call Function891fe call ClearBGPalettes @@ -4128,7 +3998,7 @@ Function8ab3b: ; 8ab3b (22:6b3b) jr c, .pressed_start ret -.JoypadLoop: ; 8ab77 (22:6b77) +.JoypadLoop: call JoyTextDelay_ForcehJoyDown bit A_BUTTON_F, c jr nz, .a_b_button @@ -4146,7 +4016,7 @@ Function8ab3b: ; 8ab3b (22:6b3b) and a ret -Function8ab93: ; 8ab93 (22:6b93) +Function8ab93: call ClearBGPalettes call LoadStandardMenuHeader farcall Function105688 @@ -4154,9 +4024,8 @@ Function8ab93: ; 8ab93 (22:6b93) call Function891fe call Function89b28 ret -; 8aba9 (22:6ba9) -Function8aba9: ; 8aba9 +Function8aba9: ld a, $2 call Function8b94a ld a, $1 @@ -4223,14 +4092,12 @@ Function8aba9: ; 8aba9 ld a, [wMenuSelection] ld c, a ret -; 8ac3b -String_8ac3b: ; 8ac3b +String_8ac3b: db "こともだちでんわを" next "かけますか?@" -; 8ac4e -Function8ac4e: ; 8ac4e +Function8ac4e: xor a ld [wMenuSelection], a push de @@ -4245,18 +4112,17 @@ Function8ac4e: ; 8ac4e call Function899fe call Function891ab ret -; 8ac70 -Function8ac70: ; 8ac70 +Function8ac70: push de ld a, $3 call Function8b94a -Function8ac76: ; 8ac76 +Function8ac76: call Function891fe call Function8b677 -Function8ac7c: ; 8ac7c +Function8ac7c: call Function8b7bd jr z, .asm_8acf0 ld a, c @@ -4331,7 +4197,6 @@ Function8ac7c: ; 8ac7c ld c, $0 scf ret -; 8ad06 UnknownText_0x8ad06: ; 0x8ad06 ; Finish registering CARDS? @@ -4339,7 +4204,7 @@ UnknownText_0x8ad06: ; 0x8ad06 db "@" ; 0x8ad0b -Function8ad0b: ; 8ad0b +Function8ad0b: .asm_8ad0b ld a, [wMenuSelection] ld [wd02f], a @@ -4401,36 +4266,31 @@ Function8ad0b: ; 8ad0b .asm_8ad87 pop bc ret -; 8ad89 -String_8ad89: ; 8ad89 +String_8ad89: db "こめいしけして" next "いれかえますか?@" -; 8ad9c -String_8ad9c: ; 8ad9c +String_8ad9c: db "おともだちなまえを" next "のこして おきますか?@" -; 8adb3 -Function8adb3: ; 8adb3 +Function8adb3: call Function891de call Function8a262 push af call Function891de pop af ret -; 8adbf -Function8adbf: ; 8adbf +Function8adbf: call OpenSRAMBank4 ld hl, $a603 call Function89b45 call CloseSRAM ret -; 8adcc -Function8adcc: ; 8adcc +Function8adcc: call OpenSRAMBank4 call Function8b3b0 call CloseSRAM @@ -4439,4 +4299,3 @@ Function8adcc: ; 8adcc ret z scf ret -; 8addb diff --git a/mobile/mobile_22_2.asm b/mobile/mobile_22_2.asm index 974836b8851..e6c7959f978 100644 --- a/mobile/mobile_22_2.asm +++ b/mobile/mobile_22_2.asm @@ -1,4 +1,4 @@ -Function8b342:: ; 8b342 +Function8b342:: ; Loads the map data pointer, then runs through a ; dw with three dummy functions. Spends a lot of energy ; doing pretty much nothing. @@ -17,43 +17,36 @@ Function8b342:: ; 8b342 cp 3 jr nz, .loop ret -; 8b354 -.dw ; 8b354 +.dw dw .zero dw .one dw .two -; 8b35a -.zero ; 8b35a +.zero ret -; 8b35b -.one ; 8b35b +.one ret -; 8b35c -.two ; 8b35c +.two ret -; 8b35d -Function8b35d: ; 8b35d +Function8b35d: ld a, h cp d ret nz ld a, l cp e ret -; 8b363 -Function8b363: ; 8b363 +Function8b363: push bc farcall Mobile_AlwaysReturnNotCarry pop bc ret -; 8b36c -Function8b36c: ; 8b36c (22:736c) +Function8b36c: ; [bc + (0:4)] = -1 push bc ld h, b @@ -64,7 +57,7 @@ Function8b36c: ; 8b36c (22:736c) pop bc ret -Function8b379: ; 8b379 (22:7379) +Function8b379: ; d = [bc + e] push bc ld a, c @@ -78,7 +71,7 @@ Function8b379: ; 8b379 (22:7379) pop bc ret -Function8b385: ; 8b385 (22:7385) +Function8b385: ; [bc + e] = d push bc ld a, c @@ -92,7 +85,7 @@ Function8b385: ; 8b385 (22:7385) pop bc ret -Function8b391: ; 8b391 (22:7391) +Function8b391: ; find first e in range(4) such that [bc + e] == -1 ; if none exist, return carry push bc @@ -112,7 +105,7 @@ Function8b391: ; 8b391 (22:7391) pop bc ret -Function8b3a4: ; 8b3a4 (22:73a4) +Function8b3a4: ; strcmp(hl, bc, 4) push de push bc @@ -124,7 +117,7 @@ Function8b3a4: ; 8b3a4 (22:73a4) pop de ret -Function8b3b0: ; 8b3b0 (22:73b0) +Function8b3b0: ld bc, $a037 ; 4:a037 ld a, [$a60b] and a @@ -141,7 +134,7 @@ Function8b3b0: ; 8b3b0 (22:73b0) ld a, [$a60b] ret -Function8b3cd: ; 8b3cd (22:73cd) +Function8b3cd: push de push bc ld e, $4 @@ -156,7 +149,7 @@ Function8b3cd: ; 8b3cd (22:73cd) pop de ret -Function8b3dd: ; 8b3dd (22:73dd) +Function8b3dd: push de push bc call JoyTextDelay_ForcehJoyDown ; joypad @@ -246,7 +239,7 @@ Function8b3dd: ; 8b3dd (22:73dd) ld [wd010], a ret -Function8b45c: ; 8b45c (22:745c) +Function8b45c: call Function8b36c xor a ld [wd010], a @@ -274,7 +267,7 @@ Function8b45c: ; 8b45c (22:745c) scf ret -Function8b493: ; 8b493 (22:7493) +Function8b493: push bc call Mobile22_SetBGMapMode0 call Function8b521 @@ -283,12 +276,12 @@ Function8b493: ; 8b493 (22:7493) rst JumpTable ret -Jumptable_8b4a0: ; 8b4a0 (22:74a0) +Jumptable_8b4a0: dw Function8b4a4 dw Function8b4b8 -Function8b4a4: ; 8b4a4 (22:74a4) +Function8b4a4: push bc push de call Function8b4d8 @@ -300,7 +293,7 @@ Function8b4a4: ; 8b4a4 (22:74a4) call Function8b3cd ret -Function8b4b8: ; 8b4b8 (22:74b8) +Function8b4b8: push bc push de call Function8b4ea @@ -312,7 +305,7 @@ Function8b4b8: ; 8b4b8 (22:74b8) call Function8b3cd ret -Function8b4cc: ; 8b4cc (22:74cc) +Function8b4cc: push bc ld hl, Unknown_8b529 call Function8b50a @@ -322,7 +315,7 @@ Function8b4cc: ; 8b4cc (22:74cc) pop bc ret -Function8b4d8: ; 8b4d8 (22:74d8) +Function8b4d8: ld hl, Unknown_8b529 call Function8b50a push hl @@ -338,7 +331,7 @@ Function8b4d8: ; 8b4d8 (22:74d8) ld l, a ret -Function8b4ea: ; 8b4ea (22:74ea) +Function8b4ea: ld hl, Unknown_8b529 call Function8b50a push hl @@ -355,7 +348,7 @@ Function8b4ea: ; 8b4ea (22:74ea) ld d, a ret -Function8b4fd: ; 8b4fd (22:74fd) +Function8b4fd: ld hl, Unknown_8b529 + 4 call Function8b50a ld a, [hli] @@ -366,7 +359,7 @@ Function8b4fd: ; 8b4fd (22:74fd) ld d, a ret -Function8b50a: ; 8b50a (22:750a) +Function8b50a: ld a, [wd02e] and a ret z @@ -378,7 +371,7 @@ Function8b50a: ; 8b50a (22:750a) jr nz, .asm_8b513 ret -Function8b518: ; 8b518 (22:7518) +Function8b518: push de ld d, $0 ld e, $14 @@ -387,21 +380,19 @@ Function8b518: ; 8b518 (22:7518) pop de ret -Function8b521: ; 8b521 (22:7521) +Function8b521: ld hl, Unknown_8b529 + 7 call Function8b50a ld a, [hl] ret -; 8b529 (22:7529) -Unknown_8b529: ; 8b529 +Unknown_8b529: dwcoord 2, 5 db 1, 4, $20, $49, 0, 1 dwcoord 7, 4 db 1, 4, $48, $41, 0, 0 -; 8b539 -Function8b539: ; 8b539 (22:7539) +Function8b539: ld bc, wd017 call Function8b36c xor a @@ -414,7 +405,7 @@ Function8b539: ; 8b539 (22:7539) call CGBOnly_CopyTilemapAtOnce ret -Function8b555: ; 8b555 (22:7555) +Function8b555: .loop ld hl, UnknownText_0x8b5ce call PrintText @@ -466,7 +457,6 @@ Function8b555: ; 8b555 (22:7555) call Function89448 pop af ret -; 8b5ce (22:75ce) UnknownText_0x8b5ce: ; 0x8b5ce ; Please enter any four-digit number. @@ -498,7 +488,7 @@ UnknownText_0x8b5e2: ; 0x8b5e2 db "@" ; 0x8b5e7 -Function8b5e7: ; 8b5e7 (22:75e7) +Function8b5e7: ld bc, wd013 call Function8b36c xor a @@ -537,7 +527,6 @@ Function8b5e7: ; 8b5e7 (22:75e7) call Function89448 pop af ret -; 8b642 (22:7642) UnknownText_0x8b642: ; 0x8b642 ; Enter the CARD FOLDER PASSCODE. @@ -564,9 +553,8 @@ UnknownText_0x8b64c: ; 0x8b64c ret .string_8b663 db "@" -; 8b664 -Function8b664: ; 8b664 (22:7664) +Function8b664: push bc ld de, $4 .asm_8b668 @@ -583,7 +571,7 @@ Function8b664: ; 8b664 (22:7664) cp $4 ret -Function8b677: ; 8b677 +Function8b677: call ClearBGPalettes call DisableLCD call Function8b690 @@ -593,9 +581,8 @@ Function8b677: ; 8b677 call Function891ab call SetPalettes ret -; 8b690 -Function8b690: ; 8b690 +Function8b690: ld hl, GFX_17afa5 + $514 ld de, vTiles2 ld bc, $160 @@ -612,9 +599,8 @@ Function8b690: ; 8b690 ld a, BANK(GFX_17afa5) call FarCopyBytes ret -; 8b6bb -Function8b6bb: ; 8b6bb +Function8b6bb: ld a, [rSVBK] push af ld a, $5 @@ -627,9 +613,8 @@ Function8b6bb: ; 8b6bb ld [rSVBK], a call Function8949c ret -; 8b6d5 -Palette_8b6d5: ; 8b6d5 +Palette_8b6d5: RGB 31, 31, 31 RGB 31, 21, 00 RGB 14, 07, 03 @@ -642,9 +627,8 @@ Palette_8b6d5: ; 8b6d5 RGB 31, 21, 00 RGB 06, 24, 08 RGB 00, 00, 00 -; 8b6ed -Function8b6ed: ; 8b6ed +Function8b6ed: hlcoord 0, 0, wAttrMap ld bc, $012c xor a @@ -654,9 +638,8 @@ Function8b6ed: ; 8b6ed ld a, $7 call ByteFill ret -; 8b703 -Function8b703: ; 8b703 +Function8b703: call Mobile22_SetBGMapMode0 push hl ld a, $c @@ -687,9 +670,8 @@ Function8b703: ; 8b703 pop bc pop hl jr Function8b744 -; 8b732 -Function8b732: ; 8b732 +Function8b732: ld a, $12 ld [hli], a ld a, $13 @@ -697,18 +679,16 @@ Function8b732: ; 8b732 ld a, $14 ld [hl], a ret -; 8b73e -Function8b73e: ; 8b73e +Function8b73e: ld d, c .asm_8b73f ld [hli], a dec d jr nz, .asm_8b73f ret -; 8b744 -Function8b744: ; 8b744 +Function8b744: ld de, wAttrMap - wTileMap add hl, de inc b @@ -730,9 +710,8 @@ Function8b744: ; 8b744 dec b jr nz, .asm_8b74d ret -; 8b75d -Function8b75d: ; 8b75d +Function8b75d: call Mobile22_SetBGMapMode0 hlcoord 0, 0 ld a, $1 @@ -753,13 +732,11 @@ Function8b75d: ; 8b75d dec e jr nz, .asm_8b780 jr Function8b79e -; 8b787 -Function8b787: ; 8b787 +Function8b787: ret -; 8b788 -Function8b788: ; 8b788 +Function8b788: .asm_8b788 ld a, $2 ld [hli], a @@ -778,9 +755,8 @@ Function8b788: ; 8b788 dec c jr nz, .asm_8b788 ret -; 8b79e -Function8b79e: ; 8b79e +Function8b79e: hlcoord 0, 1, wAttrMap ld a, $1 ld [hli], a @@ -804,9 +780,8 @@ Function8b79e: ; 8b79e dec e jr nz, .asm_8b7a9 ret -; 8b7bd -Function8b7bd: ; 8b7bd +Function8b7bd: call Function8b855 ld hl, MenuHeader_0x8b867 call CopyMenuHeader @@ -867,18 +842,16 @@ Function8b7bd: ; 8b7bd ld a, [wMenuScrollPosition] ld [wd031], a ret -; 8b832 -Function8b832: ; 8b832 +Function8b832: ld a, [wMenuScrollPosition] ld hl, wMenuDataItems sub [hl] jr nc, Function8b84b xor a jr Function8b84b -; 8b83e -Function8b83e: ; 8b83e +Function8b83e: ld a, [wMenuScrollPosition] ld hl, wMenuDataItems add [hl] @@ -886,14 +859,13 @@ Function8b83e: ; 8b83e jr c, Function8b84b ld a, $24 -Function8b84b: ; 8b84b +Function8b84b: ld [wMenuScrollPosition], a ld a, [wMenuCursorY] ld [wMenuCursorBuffer], a ret -; 8b855 -Function8b855: ; 8b855 +Function8b855: ld a, $28 ld hl, wd002 ld [hli], a @@ -907,7 +879,6 @@ Function8b855: ; 8b855 ld a, $ff ld [hl], a ret -; 8b867 MenuHeader_0x8b867: ; 0x8b867 db MENU_BACKUP_TILES ; flags @@ -926,18 +897,16 @@ MenuData_0x8b870: ; 0x8b870 dba Function8b880 dba Function8b88c dba Function8b8c8 -; 8b880 -Function8b880: ; 8b880 +Function8b880: ld h, d ld l, e ld de, wMenuSelection lb bc, PRINTNUM_LEADINGZEROS | 1, 2 call PrintNum ret -; 8b88c -Function8b88c: ; 8b88c +Function8b88c: call OpenSRAMBank4 ld h, d ld l, e @@ -974,9 +943,8 @@ Function8b88c: ; 8b88c call PlaceString call CloseSRAM ret -; 8b8c8 -Function8b8c8: ; 8b8c8 +Function8b8c8: hlcoord 0, 14 ld b, $2 ld c, $12 @@ -1007,9 +975,8 @@ Function8b8c8: ; 8b8c8 ld c, $12 call Function8b732 ret -; 8b903 -Unknown_8b903: ; 8b903 +Unknown_8b903: dw String_8b90b dw String_8b919 dw String_8b92a @@ -1019,9 +986,8 @@ String_8b90b: db "めいしを えらんでください@" ; Please sele String_8b919: db "どの めいしと いれかえますか?@" ; OK to swap with any noun? String_8b92a: db "あいてを えらんでください@" ; Please select an opponent. String_8b938: db "いれる ところを えらんでください@" ; Please select a location. -; 8b94a -Function8b94a: ; 8b94a +Function8b94a: ld [wd033], a xor a ld [wMenuScrollPosition], a @@ -1031,10 +997,9 @@ Function8b94a: ; 8b94a ld a, $1 ld [wd030], a ret -; 8b960 -Function8b960: ; 8b960 (22:7960) +Function8b960: ld hl, MenuHeader_0x8b9ac call LoadMenuHeader call Function8b9e9 @@ -1066,7 +1031,7 @@ Function8b960: ; 8b960 (22:7960) ld c, a ret -Function8b99f: ; 8b99f (22:799f) +Function8b99f: ld hl, wd002 dec a ld c, a @@ -1075,11 +1040,9 @@ Function8b99f: ; 8b99f (22:799f) ld a, [hl] cp $ff ret -; 8b9ab (22:79ab) -Function8b9ab: ; 8b9ab +Function8b9ab: ret -; 8b9ac MenuHeader_0x8b9ac: ; 0x8b9ac db MENU_BACKUP_TILES ; flags @@ -1117,7 +1080,7 @@ MenuData_0x8b9d2: ; 0x8b9d2 db "やめる@" ; QUIT ; 0x8b9e9 -Function8b9e9: ; 8b9e9 (22:79e9) +Function8b9e9: call OpenSRAMBank4 call Function8931b call Function8932d @@ -1148,11 +1111,9 @@ Function8b9e9: ; 8b9e9 (22:79e9) call CloseSRAM pop af ret -; 8ba1c (22:7a1c) -Unknown_8ba1c: ; 8b1ac +Unknown_8ba1c: db 2, 4, -1 -Unknown_8ba1f: ; 8ba1f +Unknown_8ba1f: db 1, 2, 4, 3, -1 -; 8ba24 diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm index f82f3d2d3a0..2a2c034c29d 100644 --- a/mobile/mobile_40.asm +++ b/mobile/mobile_40.asm @@ -1,6 +1,6 @@ SECTION "mobile_40", ROMX -Function100000: ; 100000 +Function100000: ; d: 1 or 2 ; e: bank ; bc: addr @@ -23,9 +23,8 @@ Function100000: ; 100000 pop af ld [rSVBK], a ret -; 100022 -Function100022: ; 100022 +Function100022: push de push bc call SetRAMStateForMobile @@ -46,17 +45,15 @@ Function100022: ; 100022 ld hl, wVramState set 1, [hl] ret -; 100057 -Function100057: ; 100057 +Function100057: call DisableMobile call ReturnToMapFromSubmenu ld hl, wVramState res 1, [hl] ret -; 100063 -SetRAMStateForMobile: ; 100063 +SetRAMStateForMobile: xor a ld hl, wBGMapBuffer ld bc, $65 @@ -71,9 +68,8 @@ SetRAMStateForMobile: ; 100063 ld [hMapAnims], a ld [hLCDCPointer], a ret -; 100082 -EnableMobile: ; 100082 +EnableMobile: xor a ld hl, wOverworldMapBlocks ld bc, wOverworldMapBlocksEnd - wOverworldMapBlocks @@ -96,7 +92,7 @@ EnableMobile: ; 100082 ret ; 0x1000a4 -DisableMobile: ; 1000a4 +DisableMobile: di xor a ld [hMobileReceive], a @@ -110,9 +106,8 @@ DisableMobile: ; 1000a4 ld [rIE], a ei ret -; 1000ba -Function1000ba: ; 1000ba +Function1000ba: .loop ; call [wcd22]:([wcd23][wcd24] + [wMobileCommsJumptableIndex]) ld hl, wcd23 @@ -138,9 +133,8 @@ Function1000ba: ; 1000ba jr z, .loop call DelayFrame ret -; 1000e8 -Function1000e8: ; 1000e8 +Function1000e8: ld hl, wcd29 bit 7, [hl] ret z @@ -148,9 +142,8 @@ Function1000e8: ; 1000e8 ld hl, wcd29 set 6, [hl] ret -; 1000fa -Function1000fa: ; 1000fa +Function1000fa: ld a, [wc30d] and a ret z @@ -189,9 +182,8 @@ Function1000fa: ; 1000fa pop af ld [wLinkMode], a ret -; 100144 -Function100144: ; 100144 +Function100144: ld hl, wcd29 bit 5, [hl] jr z, .asm_100155 @@ -208,18 +200,16 @@ Function100144: ; 100144 res 6, [hl] farcall HDMATransferTileMapToWRAMBank3 ret -; 100163 -Function100163: ; 100163 +Function100163: ld hl, wcd29 bit 6, [hl] ret z res 6, [hl] call DelayFrame ret -; 10016f -Function10016f: ; 10016f +Function10016f: ld a, [wcd2b] cp $01 ret z @@ -313,9 +303,8 @@ Function10016f: ; 10016f ld [wc301], a call Function10020b ret -; 10020b -Function10020b: ; 10020b +Function10020b: xor a ld [wc303], a farcall FadeOutPalettes @@ -333,9 +322,8 @@ Function10020b: ; 10020b pop af ld [rSVBK], a ret -; 100232 -Function100232: ; 100232 +Function100232: push de farcall Function106464 call Function3f20 @@ -346,18 +334,15 @@ Function100232: ; 100232 call Function100320 call JoyWaitAorB ret -; 10024d -String10024d: ; 10024d +String10024d: db "つうしんを キャンセル しました@" -; 10025e -String10025e: ; 10025e +String10025e: db "おともだちと えらんだ へやが" next "ちがうようです@" -; 100276 -Function100276: ; 100276 +Function100276: ld a, [wcd2b] cp $01 jr z, .asm_10029f @@ -406,18 +391,16 @@ Function100276: ; 100276 call Function1002dc ld c, $01 ret -; 1002c9 -Function1002c9: ; 1002c9 +Function1002c9: ld hl, wcd2a bit 0, [hl] ret z farcall CleanUpBattleRAM farcall LoadPokemonData ret -; 1002dc -Function1002dc: ; 1002dc +Function1002dc: ld a, MAPSETUP_LINKRETURN ld [hMapEntryMethod], a farcall RunMapSetupScript @@ -425,18 +408,16 @@ Function1002dc: ; 1002dc ld [hMapEntryMethod], a call LoadStandardFont ret -; 1002ed -Function1002ed: ; 1002ed +Function1002ed: farcall LoadOW_BGPal7 farcall ApplyPals ld a, $01 ld [hCGBPalUpdate], a call DelayFrame ret -; 100301 -Function100301: ; 100301 +Function100301: ld hl, wcd2a bit 1, [hl] ret z @@ -446,28 +427,24 @@ Function100301: ; 100301 call Function100320 call JoyWaitAorB ret -; 100320 -Function100320: ; 100320 +Function100320: farcall Mobile_ReloadMapPart ret -; 100327 -Function100327: ; 100327 +Function100327: farcall HDMATransferTileMapToWRAMBank3 ret -; 100327 -Function10032e: ; 10032e +Function10032e: call Function10034d ld e, a ret nc ld [wcd2b], a ret -; 100337 -Function100337: ; 100337 +Function100337: call Function10032e ret c ld a, [wc821] @@ -483,9 +460,8 @@ Function100337: ; 100337 ld [wcd2b], a scf ret -; 10034d -Function10034d: ; 10034d +Function10034d: ld a, [wc821] bit 1, a jr nz, .asm_10036a @@ -524,66 +500,58 @@ Function10034d: ; 10034d ld a, $fe scf ret -; 100382 -Function100382: ; 100382 +Function100382: ld a, [wcd27] ld hl, Jumptable_10044e rst JumpTable ret -; 10038a -Function10038a: ; 10038a +Function10038a: ld hl, wccb4 ld a, $2e call Function3e32 ret -; 100393 -Function100393: ; 100393 +Function100393: ld hl, wcc60 ld a, $3a call Function3e32 ret -; 10039c -Function10039c: ; 10039c +Function10039c: ld hl, wcc60 ld de, w3_d000 ld bc, $54 ld a, $03 call FarCopyWRAM ret -; 1003ab -Function1003ab: ; 1003ab +Function1003ab: ld hl, w3_d000 ld de, wcc60 ld bc, $54 ld a, $03 call FarCopyWRAM ret -; 1003ba -Function1003ba: ; 1003ba +Function1003ba: ld hl, wccb4 ld de, w3_d080 ld bc, $54 ld a, $03 call FarCopyWRAM ret -; 1003c9 -Function1003c9: ; 1003c9 +Function1003c9: ld hl, w3_d080 ld de, wccb4 ld bc, $54 ld a, $03 call FarCopyWRAM ret -; 1003d8 -Function1003d8: ; 1003d8 +Function1003d8: ld hl, wccb4 ld a, [hli] ld c, a @@ -603,9 +571,8 @@ Function1003d8: ; 1003d8 add $02 ld [wccb4], a ret -; 1003f5 -Function1003f5: ; 1003f5 +Function1003f5: ld a, [wcc60] sub $03 ld [wcc60], a @@ -613,9 +580,8 @@ Function1003f5: ; 1003f5 sub $03 ld [wccb4], a ret -; 100406 -Function100406: ; 100406 +Function100406: ld a, [wcc60] sub $02 ld c, a @@ -652,9 +618,8 @@ Function100406: ; 100406 pop hl scf ret -; 10043a -Function10043a: ; 10043a +Function10043a: push hl push bc ld de, 0 @@ -672,10 +637,9 @@ Function10043a: ; 10043a pop bc pop hl ret -; 10044e -Jumptable_10044e: ; 10044e (40:444e) +Jumptable_10044e: dw Function10046a dw Function10047c dw Function100493 @@ -691,7 +655,7 @@ Jumptable_10044e: ; 10044e (40:444e) dw Function1004f4 dw Function1004a4 -Function10046a: ; 10046a +Function10046a: ld hl, wBGMapPalBuffer inc [hl] call Function1003d8 @@ -700,9 +664,8 @@ Function10046a: ; 10046a inc a ld [wcd27], a ret -; 10047c -Function10047c: ; 10047c +Function10047c: call Function100337 ret c ret z @@ -719,12 +682,11 @@ Function10047c: ; 10047c ld a, $02 ld [wcd27], a ret -; 100493 -Function100493: ; 100493 +Function100493: jr asm_100497 -Function100495: ; 100495 +Function100495: jr asm_100497 asm_100497 @@ -735,9 +697,8 @@ asm_100497 inc a ld [wcd27], a ret -; 1004a4 -Function1004a4: ; 1004a4 +Function1004a4: call Function100406 jr c, .asm_1004b8 call Function1003c9 @@ -750,9 +711,8 @@ Function1004a4: ; 1004a4 .asm_1004b8 scf ret -; 1004ba -Function1004ba: ; 1004ba +Function1004ba: call Function10038a and a jr nz, .asm_1004c8 @@ -765,9 +725,8 @@ Function1004ba: ; 1004ba ld a, $08 ld [wcd27], a ret -; 1004ce -Function1004ce: ; 1004ce +Function1004ce: call Function100337 ret c ret z @@ -777,25 +736,22 @@ Function1004ce: ; 1004ce inc a ld [wcd27], a ret -; 1004de -Function1004de: ; 1004de +Function1004de: call Function100393 ld a, [wcd27] inc a ld [wcd27], a ret -; 1004e9 -Function1004e9: ; 1004e9 +Function1004e9: call Function10038a ld a, [wcd27] inc a ld [wcd27], a ret -; 1004f4 -Function1004f4: ; 1004f4 +Function1004f4: call Function100337 ret c ret z @@ -804,9 +760,8 @@ Function1004f4: ; 1004f4 ld [wcd27], a call Function10039c ret -; 100504 -Function100504: ; 100504 +Function100504: push de call Function3f20 call UpdateSprites @@ -814,33 +769,29 @@ Function100504: ; 100504 hlcoord 4, 2 call PlaceString ret -; 100513 -Function100513: ; 100513 +Function100513: call Function3f7c call PlaceVerticalMenuItems call InitVerticalMenuCursor ld hl, w2DMenuFlags1 set 7, [hl] ret -; 100522 -Function100522: ; 100522 +Function100522: ld a, [wcd28] ld hl, Jumptable_10052a rst JumpTable ret -; 10052a -Jumptable_10052a: ; 10052a +Jumptable_10052a: dw Function100534 dw Function100545 dw Function100545 dw Function100545 dw Function10054d -; 100534 -Function100534: ; 100534 +Function100534: call Function100513 call UpdateSprites call ApplyTilemap @@ -848,16 +799,14 @@ Function100534: ; 100534 inc a ld [wcd28], a ret -; 100545 -Function100545: ; 100545 +Function100545: ld a, [wcd28] inc a ld [wcd28], a ret -; 10054d -Function10054d: ; 10054d +Function10054d: farcall MobileMenuJoypad ld a, c ld hl, wMenuJoypadFilter @@ -883,21 +832,18 @@ Function10054d: ; 10054d ld [wcd28], a scf ret -; 100579 -Function100579: ; 100579 +Function100579: ld a, [wcd26] ld hl, Jumptable_100581 rst JumpTable ret -; 100581 -Jumptable_100581: ; 100581 +Jumptable_100581: dw Function100585 dw Function100597 -; 100585 -Function100585: ; 100585 +Function100585: ld hl, MenuHeader_1005b2 call LoadMenuHeader ld a, 0 @@ -906,7 +852,7 @@ Function100585: ; 100585 inc a ld [wcd26], a -Function100597: ; 100597 +Function100597: call Function100522 ld a, [wcd28] bit 7, a @@ -921,9 +867,8 @@ Function100597: ; 100597 set 7, a ld [wcd26], a ret -; 1005b2 -MenuHeader_1005b2: ; 1005b2 +MenuHeader_1005b2: db MENU_BACKUP_TILES ; flags db 6, 14 db 10, 19 @@ -935,21 +880,18 @@ MenuData_1005ba: db 2 db "はい@" db "いいえ@" -; 1005c3 -Function1005c3: ; 1005c3 +Function1005c3: ld a, [wcd26] ld hl, Jumptable_1005cb rst JumpTable ret -; 1005cb -Jumptable_1005cb: ; 1005cb +Jumptable_1005cb: dw Function1005cf dw Function1005e1 -; 1005cf -Function1005cf: ; 1005cf +Function1005cf: ld hl, MenuHeader_1005fc call LoadMenuHeader ld a, 0 @@ -958,7 +900,7 @@ Function1005cf: ; 1005cf inc a ld [wcd26], a -Function1005e1: ; 1005e1 +Function1005e1: call Function100522 ld a, [wcd28] bit 7, a @@ -972,23 +914,21 @@ Function1005e1: ; 1005e1 set 7, a ld [wcd26], a ret -; 1005fc -MenuHeader_1005fc: ; 1005fc +MenuHeader_1005fc: db MENU_BACKUP_TILES ; flags db 6, 14 db 10, 19 dw MenuData_100604 db 1 ; default option -MenuData_100604: ; 100604 +MenuData_100604: db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags db 2 db "かける@" db "まつ@" -; 10060d -Mobile_CommunicationStandby: ; 10060d +Mobile_CommunicationStandby: hlcoord 3, 10 ld b, 1 ld c, 11 @@ -997,13 +937,11 @@ Mobile_CommunicationStandby: ; 10060d hlcoord 4, 11 call PlaceString ret -; 100621 -.String: ; 100621 +.String: db "つうしんたいきちゅう!@" -; 10062d -AdvanceMobileInactivityTimerAndCheckExpired: ; 10062d +AdvanceMobileInactivityTimerAndCheckExpired: push bc call IncrementMobileInactivityTimerByCFrames pop bc @@ -1018,19 +956,17 @@ AdvanceMobileInactivityTimerAndCheckExpired: ; 10062d ld [wcd2b], a scf ret -; 100641 -StartMobileInactivityTimer: ; 100641 +StartMobileInactivityTimer: xor a ld [wMobileInactivityTimerMinutes], a ld [wMobileInactivityTimerSeconds], a ld [wMobileInactivityTimerFrames], a ret -; 10064c -IncrementMobileInactivityTimerBy1Frame: ; 10064c +IncrementMobileInactivityTimerBy1Frame: ld c, 1 -IncrementMobileInactivityTimerByCFrames: ; 10064e +IncrementMobileInactivityTimerByCFrames: ld hl, wMobileInactivityTimerFrames ; timer? ld a, [hl] add c @@ -1052,9 +988,8 @@ IncrementMobileInactivityTimerByCFrames: ; 10064e ret c inc [hl] ret -; 100665 -Function100665: ; 100665 +Function100665: call UpdateTime ld hl, wcd36 ld a, [hHours] @@ -1064,18 +999,16 @@ Function100665: ; 100665 ld a, [hSeconds] ld [hl], a ret -; 100675 -Function100675: ; 100675 +Function100675: ld hl, wcd2a bit 2, [hl] set 2, [hl] ret nz call Function1006d3 ret -; 100681 -Function100681: ; 100681 +Function100681: push hl ld hl, wcd2a bit 2, [hl] @@ -1089,7 +1022,7 @@ Function100681: ; 100681 .asm_100694 ld de, wcd32 -Function100697: ; 100697 +Function100697: ld a, [de] and a jr nz, .asm_1006bb @@ -1116,22 +1049,20 @@ Function100697: ; 100697 ld de, String1006ca call PlaceString ret -; 1006c2 -String1006c2: ; 1006c2 +String1006c2: db "ふん @" -String1006c6: ; 1006c6 +String1006c6: db "びょう@" -String1006ca: ; 1006ca +String1006ca: db "1じかんいじょう@" -; 1006d3 -Function1006d3: ; 1006d3 +Function1006d3: call UpdateTime ld de, wcd34 ld hl, wcd38 -Function1006dc: ; 1006dc +Function1006dc: ld a, [hld] ld c, a ld a, [hSeconds] @@ -1162,9 +1093,8 @@ Function1006dc: ; 1006dc .asm_1006fb ld [de], a ret -; 1006fd -Function1006fd: ; 1006fd +Function1006fd: ld a, $04 ld hl, $a800 call GetSRAMBank @@ -1174,9 +1104,8 @@ Function1006fd: ; 1006fd ld [hli], a call CloseSRAM ret -; 10070d -Function10070d: ; 10070d +Function10070d: ld a, $04 ld hl, $a800 call GetSRAMBank @@ -1188,9 +1117,8 @@ Function10070d: ; 10070d ld [hli], a call CloseSRAM ret -; 100720 -Function100720: ; 100720 +Function100720: xor a ld [wcd6a], a call UpdateTime @@ -1213,9 +1141,8 @@ Function100720: ; 100720 ld a, [wcd6d] ld [wcd6b], a ret -; 100754 -Function100754: ; 100754 +Function100754: call UpdateTime ld a, [hHours] ld [wcd72], a @@ -1228,9 +1155,8 @@ Function100754: ; 100754 ld hl, wcd2a res 6, [hl] ret -; 100772 -Function100772: ; 100772 +Function100772: push de ld hl, wcd6c ld a, [de] @@ -1263,10 +1189,9 @@ Function100772: ; 100772 .asm_10079a pop de ret -; 10079c -Function10079c: ; 10079c +Function10079c: ld a, [wcd21] cp $01 jr nz, .dont_quit @@ -1322,9 +1247,8 @@ Function10079c: ; 10079c .dont_quit and a ret -; 1007f6 -Function1007f6: ; 1007f6 +Function1007f6: call UpdateTime ld hl, wcd74 ld de, wcd71 @@ -1343,9 +1267,8 @@ Function1007f6: ; 1007f6 ld a, [hSeconds] ld [wcd74], a ret -; 100826 -Function100826: ; 100826 +Function100826: ld a, [wcd71] add [hl] sub $3c @@ -1370,9 +1293,8 @@ Function100826: ; 100826 ld [hl], a ld c, a ret -; 100846 -Function100846: ; 100846 +Function100846: ld hl, wcd2a bit 5, [hl] jr nz, .asm_10087c @@ -1409,18 +1331,15 @@ Function100846: ; 100846 ld de, String_10089f call PlaceString ret -; 10088e -String_10088e: ; 10088e +String_10088e: db "モバイルたいせん できる" next "じかん@" -; 10089f -String_10089f: ; 10089f +String_10089f: db " むせいげん@" -; 1008a6 -Function1008a6: ; 1008a6 +Function1008a6: ld a, $04 ld hl, $a800 call GetSRAMBank @@ -1455,10 +1374,9 @@ Function1008a6: ; 1008a6 call Function10070d ld c, 0 ret -; 1008e0 -Function1008e0: ; 1008e0 +Function1008e0: ld a, [hBGMapMode] ld b, a ld a, [hVBlank] @@ -1478,9 +1396,8 @@ Function1008e0: ; 1008e0 ld a, b ld [hBGMapMode], a ret -; 100902 -Function100902: ; 100902 +Function100902: hlcoord 3, 10 ld b, $01 ld c, $0b @@ -1515,16 +1432,14 @@ Function100902: ; 100902 ld c, 120 call DelayFrames ret -; 10095a -.string_10095a ; 10095a +.string_10095a db "たいせん しゅうりょう@" -.string_100966 ; 100966 +.string_100966 db "のこり   ふん!@" -; 100970 -Function100970: ; 100970 +Function100970: hlcoord 0, 0 ld de, w3_dc00 call Function1009a5 @@ -1534,9 +1449,8 @@ Function100970: ; 100970 call Function1009d2 call Function1009ae ret -; 100989 -Function100989: ; 100989 +Function100989: ld hl, w3_dc00 decoord 0, 0 call Function1009a5 @@ -1546,16 +1460,14 @@ Function100989: ; 100989 decoord 0, 0, wAttrMap call Function1009a5 ret -; 1009a5 -Function1009a5: ; 1009a5 +Function1009a5: ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, $03 call FarCopyWRAM ret -; 1009ae -Function1009ae: ; 1009ae +Function1009ae: ld a, [rSVBK] push af ld a, $03 @@ -1582,9 +1494,8 @@ Function1009ae: ; 1009ae pop af ld [rSVBK], a ret -; 1009d2 -Function1009d2: ; 1009d2 +Function1009d2: ld a, [rSVBK] push af ld a, $03 @@ -1606,9 +1517,8 @@ Function1009d2: ; 1009d2 pop af ld [rSVBK], a ret -; 1009f3 -Function1009f3: ; 1009f3 +Function1009f3: ld a, [hJoyDown] and SELECT + A_BUTTON cp SELECT + A_BUTTON @@ -1623,9 +1533,8 @@ Function1009f3: ; 1009f3 .select_a xor a ret -; 100a09 -_LinkBattleSendReceiveAction: ; 100a09 +_LinkBattleSendReceiveAction: call .StageForSend ld [wd431], a farcall PlaceWaitingText @@ -1643,9 +1552,8 @@ _LinkBattleSendReceiveAction: ; 100a09 .done ret -; 100a2e -.StageForSend: ; 100a2e +.StageForSend: ld a, [wBattlePlayerAction] and a jr nz, .switch @@ -1670,9 +1578,8 @@ _LinkBattleSendReceiveAction: ; 100a09 .use_move and $0f ret -; 100a53 -.LinkBattle_SendReceiveAction: ; 100a53 +.LinkBattle_SendReceiveAction: ld a, [wd431] ld [wPlayerLinkAction], a ld a, $ff @@ -1701,9 +1608,8 @@ _LinkBattleSendReceiveAction: ; 100a09 ld a, [wOtherPlayerLinkAction] ld [wBattleAction], a ret -; 100a87 -.MobileBattle_SendReceiveAction: ; 100a87 +.MobileBattle_SendReceiveAction: call Function100acf call StartMobileInactivityTimer ld a, 0 @@ -1739,9 +1645,8 @@ _LinkBattleSendReceiveAction: ; 100a09 .asm_100ace ret -; 100acf -Function100acf: ; 100acf +Function100acf: ld de, Unknown_100b0a ld hl, wccb5 ld a, [wd431] @@ -1757,9 +1662,8 @@ Function100acf: ; 100acf ld a, c ld [wccb4], a ret -; 100ae7 -Function100ae7: ; 100ae7 +Function100ae7: ld de, Unknown_100b0a ld hl, wcc62 .asm_100aed @@ -1783,21 +1687,19 @@ Function100ae7: ; 100ae7 ld a, $f1 ld [wcd2b], a ret -; 100b0a SECTION "tetsuji", ROMX charmap " ", $20 ; revert to ascii -Unknown_100b0a: ; 100b0a +Unknown_100b0a: db "tetsuji", 0 -; 100b12 SECTION "bank40_2", ROMX -Function100b12: ; 100b12 +Function100b12: call Function100dd8 ret c ld hl, BattleMenuHeader @@ -1816,9 +1718,8 @@ Function100b12: ; 100b12 ld [wBattleMenuCursorBuffer], a call ExitMenu ret -; 100b45 -Function100b45: ; 100b45 +Function100b45: call Function100b7a .loop call Mobile_SetOverworldDelay @@ -1842,9 +1743,8 @@ Function100b45: ; 100b45 ld [wMenuCursorBuffer], a and a ret -; 100b7a -Function100b7a: ; 100b7a +Function100b7a: ld hl, CopyMenuData ld a, [wMenuData_2DMenuItemStringsBank] rst FarCall @@ -1856,9 +1756,8 @@ Function100b7a: ; 100b7a ld hl, w2DMenuFlags1 set 7, [hl] ret -; 100b9f -MobileMoveSelectionScreen: ; 100b9f +MobileMoveSelectionScreen: xor a ld [wMoveSwapBuffer], a farcall CheckPlayerHasUsableMoves @@ -1872,9 +1771,8 @@ MobileMoveSelectionScreen: ; 100b9f call Function100ed4 pop af ret -; 100bc2 -.GetMoveSelection: ; 100bc2 +.GetMoveSelection: xor a ld [hBGMapMode], a call Function100c74 @@ -1971,9 +1869,8 @@ MobileMoveSelectionScreen: ; 100b9f call StdBattleTextBox call Call_LoadTempTileMapToTileMap jp .GetMoveSelection -; 100c74 -Function100c74: ; 100c74 +Function100c74: hlcoord 0, 8 ld b, 8 ld c, 8 @@ -1987,9 +1884,8 @@ Function100c74: ; 100c74 hlcoord 2, 10 predef ListMoves ret -; 100c98 -Function100c98: ; 100c98 +Function100c98: ld de, .attrs call SetMenuAttributes ld a, [wNumMoves] @@ -1999,16 +1895,15 @@ Function100c98: ; 100c98 inc a ld [wMenuCursorY], a ret -; 100cad -.attrs ; 100cad +.attrs db 10, 1 db 255, 1 db $a0, $00 dn 2, 0 db D_UP | D_DOWN | A_BUTTON | B_BUTTON -Mobile_PartyMenuSelect: ; 100cb5 +Mobile_PartyMenuSelect: call Function100dd8 ret c ld hl, w2DMenuFlags1 @@ -2059,9 +1954,8 @@ Mobile_PartyMenuSelect: ; 100cb5 call WaitSFX scf ret -; 100d22 -MobileBattleMonMenu: ; 100d22 +MobileBattleMonMenu: call Function100dd8 ret c call Function100d67 @@ -2100,9 +1994,8 @@ MobileBattleMonMenu: ; 100d22 .asm_100d65 and a ret -; 100d67 -Function100d67: ; 100d67 +Function100d67: ld hl, .MenuHeader call CopyMenuHeader xor a @@ -2116,31 +2009,28 @@ Function100d67: ; 100d67 ld hl, w2DMenuFlags1 set 6, [hl] ret -; 100d88 -.MenuHeader: ; 100d88 +.MenuHeader: db 0 ; flags menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw .MenuData db 1 ; default option -.MenuData: ; 100d90 +.MenuData: db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags db 3 db "いれかえる@" ; TRADE db "つよさをみる@" ; STATS db "キャンセル@" ; CANCEL -; 100da5 -Function100da5: ; 100da5 +Function100da5: ld hl, wcd2a res 3, [hl] ld hl, wcd29 res 0, [hl] ret -; 100db0 -Function100db0: ; 100db0 +Function100db0: ld hl, wcd2a bit 3, [hl] jr nz, .asm_100dbe @@ -2152,11 +2042,10 @@ Function100db0: ; 100db0 .asm_100dbe xor a ret -; 100dc0 -Function100dc0: ; 100dc0 +Function100dc0: ld a, [wLinkMode] cp LINK_MOBILE jr nz, .mobile @@ -2169,15 +2058,13 @@ Function100dc0: ; 100dc0 .mobile xor a ret -; 100dd2 -Mobile_SetOverworldDelay: ; 100dd2 +Mobile_SetOverworldDelay: ld a, 30 ld [wOverworldDelay], a ret -; 100dd8 -Function100dd8: ; 100dd8 +Function100dd8: ld c, $01 ld b, $03 farcall AdvanceMobileInactivityTimerAndCheckExpired @@ -2196,9 +2083,8 @@ Function100dd8: ; 100dd8 .asm_100dfb scf ret -; 100dfd -MobileComms_CheckInactivityTimer: ; 100dfd +MobileComms_CheckInactivityTimer: ld a, [wOverworldDelay] ld c, a ld a, 30 @@ -2224,9 +2110,8 @@ MobileComms_CheckInactivityTimer: ; 100dfd .quit scf ret -; 100e2d -Function100e2d: ; 100e2d +Function100e2d: ld a, [wOverworldDelay] ld c, a ld a, 30 @@ -2254,9 +2139,8 @@ Function100e2d: ; 100e2d .asm_100e61 scf ret -; 100e63 -Function100e63: ; 100e63 +Function100e63: ld a, e cp $02 ret nz @@ -2265,9 +2149,8 @@ Function100e63: ; 100e63 ld de, SFX_ELEVATOR_END call PlaySFX ret -; 100e72 -Function100e72: ; 100e72 +Function100e72: xor a ld hl, wcd29 bit 0, [hl] @@ -2279,17 +2162,15 @@ Function100e72: ; 100e72 xor a ld [wcd68], a ret -; 100e84 -Function100e84: ; 100e84 +Function100e84: ld a, [wcd67] ld hl, Jumptable_100e8c rst JumpTable ret -; 100e8c -Jumptable_100e8c: ; 100e8c (40:4e8c) +Jumptable_100e8c: dw Function100ea2 dw Function100eae dw Function100eb4 @@ -2303,7 +2184,7 @@ Jumptable_100e8c: ; 100e8c (40:4e8c) dw Function100ec4 -Function100ea2: ; 100ea2 (40:4ea2) +Function100ea2: call Function100dc0 ret nc ld hl, wcd29 @@ -2311,12 +2192,12 @@ Function100ea2: ; 100ea2 (40:4ea2) call Function100ec5 -Function100eae: ; 100eae +Function100eae: scf call Function100eca jr asm_100eb8 -Function100eb4: ; 100eb4 +Function100eb4: and a call Function100eca @@ -2329,49 +2210,46 @@ asm_100eb8: ld [hl], 0 jr Function100ec5 -Function100ec4: ; 100ec4 +Function100ec4: ret Function100ec5: ld hl, wcd67 inc [hl] ret -; 100eca -Function100eca: ; 100eca +Function100eca: farcall Mobile_InitPartyMenuBGPal7 call Function100ed4 ret -; 100ed4 -Function100ed4: ; 100ed4 +Function100ed4: farcall ApplyPals ld a, $01 ld [hCGBPalUpdate], a ret -; 100edf -Function100edf: ; 100edf +Function100edf: ld hl, Unknown_100fc0 ld c, 1 jr asm_100f02 -Function100ee6: ; 100ee6 +Function100ee6: ld hl, Unknown_100fc0 ld c, 2 jr asm_100f02 -Function100eed: ; 100eed +Function100eed: ld hl, Unknown_100feb ld c, 1 jr asm_100f02 -Function100ef4: ; 100ef4 +Function100ef4: ld hl, Unknown_100ff3 ld c, 1 jr asm_100f02 -Function100efb: ; 100efb +Function100efb: ld hl, Unknown_10102c ld c, 1 jr asm_100f02 @@ -2423,9 +2301,8 @@ asm_100f02: ld a, [wStringBuffer2 + 5] ld b, a ret -; 100f3d -Function100f3d: ; 100f3d +Function100f3d: ; parameter ld a, [wStringBuffer2] cp $02 @@ -2484,9 +2361,8 @@ Function100f3d: ; 100f3d ld a, d ld [wStringBuffer2 + 2], a ret -; 100f8d -Function100f8d: ; 100f8d +Function100f8d: push hl ld a, [wStringBuffer2 + 4] ld l, a @@ -2517,9 +2393,8 @@ Function100f8d: ; 100f8d call CopyBytes call CloseSRAM ret -; 100fc0 -Unknown_100fc0: ; 100fc0 +Unknown_100fc0: ; first byte: ; Bit 7 set: Not SRAM ; Lower 7 bits: Bank @@ -2532,11 +2407,11 @@ Unknown_100fc0: ; 100fc0 dbwww $80, wPartyMonNicknames, MON_NAME_LENGTH * PARTY_LENGTH, wOTPartyMonNicknames db -1 -Unknown_100feb: ; 100feb +Unknown_100feb: dbwww $00, sPartyMail, MAIL_STRUCT_LENGTH * PARTY_LENGTH, NULL db -1 -Unknown_100ff3: ; 100ff3 +Unknown_100ff3: dbwww $80, wdc41, 1, NULL dbwww $80, wPlayerName, NAME_LENGTH, NULL dbwww $80, wPlayerName, NAME_LENGTH, NULL @@ -2547,16 +2422,15 @@ Unknown_100ff3: ; 100ff3 dbwww $04, $a007, PARTYMON_STRUCT_LENGTH, NULL db -1 -Unknown_10102c: ; 10102c +Unknown_10102c: dbwww $80, wOTPlayerName, NAME_LENGTH, NULL dbwww $80, wOTPlayerID, 2, NULL dbwww $80, wOTPartyMonNicknames, MON_NAME_LENGTH * PARTY_LENGTH, NULL dbwww $80, wOTPartyMonOT, NAME_LENGTH * PARTY_LENGTH, NULL dbwww $80, wOTPartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, NULL db -1 -; 10104f -Function101050: ; 101050 +Function101050: call Function10107d ld a, [wOTPartyCount] rept 2 ; ??? @@ -2576,9 +2450,8 @@ endr call CopyBytes call CloseSRAM ret -; 10107d -Function10107d: ; 10107d +Function10107d: xor a ld hl, wc608 ld bc, wc7bd - wc608 @@ -2609,9 +2482,8 @@ Function10107d: ; 10107d ld a, $33 ld [wc7ba], a ret -; 1010cd -.CopyAllFromOT: ; 1010cd +.CopyAllFromOT: push hl ld hl, 0 ld a, [wOTPartyCount] @@ -2621,9 +2493,8 @@ Function10107d: ; 10107d pop hl call CopyBytes ret -; 1010de -Function1010de: ; 1010de +Function1010de: push hl push bc ld de, 0 @@ -2641,9 +2512,8 @@ Function1010de: ; 1010de pop bc pop hl ret -; 1010f2 -LoadSelectedPartiesForColosseum: ; 1010f2 +LoadSelectedPartiesForColosseum: xor a ld hl, wStringBuffer2 ld bc, 9 @@ -2673,9 +2543,8 @@ LoadSelectedPartiesForColosseum: ; 1010f2 ld de, wOTPartyMonNicknames call .CopyName ret -; 101145 -.CopyThreeSpecies: ; 101145 +.CopyThreeSpecies: ; Load the 3 choices to the buffer push de ld bc, wStringBuffer2 + NAME_LENGTH_JAPANESE @@ -2700,9 +2569,8 @@ LoadSelectedPartiesForColosseum: ; 1010f2 ld a, $ff ld [de], a ret -; 101168 -.GetNthSpecies: ; 101168 +.GetNthSpecies: ; Preserves hl and de ; Get the index of the Nth selection push hl @@ -2724,13 +2592,12 @@ LoadSelectedPartiesForColosseum: ; 1010f2 ld a, [de] pop de ret -; 10117c -.CopyPartyStruct: ; 10117c +.CopyPartyStruct: ld bc, PARTYMON_STRUCT_LENGTH jr .ContinueCopy -.CopyName: ; 101181 +.CopyName: ld bc, NAME_LENGTH .ContinueCopy: @@ -2785,25 +2652,22 @@ LoadSelectedPartiesForColosseum: ; 1010f2 ld hl, wc608 call CopyBytes ret -; 1011df -.GetDestinationAddress: ; 1011df +.GetDestinationAddress: ld a, [wStringBuffer2 + 4] ld l, a ld a, [wStringBuffer2 + 5] ld h, a ret -; 1011e8 -.GetCopySize: ; 1011e8 +.GetCopySize: ld a, [wStringBuffer2 + 2] ld c, a ld a, [wStringBuffer2 + 3] ld b, a ret -; 1011f1 -Function1011f1: ; 1011f1 +Function1011f1: ld a, $04 call GetSRAMBank ld a, [$a60c] @@ -2825,46 +2689,42 @@ Function1011f1: ; 1011f1 ld a, LINK_MOBILE ld [wLinkMode], a ret -; 101220 -Function101220: ; 101220 +Function101220: xor a ld [wLinkMode], a ret -; 101225 -Function101225: ; 101225 +Function101225: ld d, 1 ld e, BANK(Jumptable_101297) ld bc, Jumptable_101297 call Function100000 jr Function10123d -Function101231: ; 101231 +Function101231: ld d, 2 ld e, BANK(Jumptable_101297) ld bc, Jumptable_101297 call Function100000 jr Function10123d -Function10123d: ; 10123d +Function10123d: xor a ld [wScriptVar], a ld a, c ld hl, Jumptable_101247 rst JumpTable ret -; 101247 -Jumptable_101247: ; 101247 +Jumptable_101247: dw Function101251 dw Function10127d dw Function10127c dw Function10126c dw Function101265 -; 101251 -Function101251: ; 101251 +Function101251: call UpdateSprites call RefreshScreen ld hl, UnknownText_0x1021f4 @@ -2873,31 +2733,26 @@ Function101251: ; 101251 ret c call Function102142 ret -; 101265 -Function101265: ; 101265 +Function101265: ld hl, UnknownText_0x1021ef call Function1021e0 ret -; 10126c -Function10126c: ; 10126c +Function10126c: call UpdateSprites farcall Script_reloadmappart ld hl, UnknownText_0x1021f4 call Function1021e0 ret -; 10127c -Function10127c: ; 10127c +Function10127c: ret -; 10127d -Function10127d: ; 10127d +Function10127d: ret -; 10127e -Function10127e: ; 10127e +Function10127e: ld a, [wdc5f] and a jr z, .zero @@ -2913,9 +2768,8 @@ Function10127e: ; 10127e ld a, c ld [wMobileCommsJumptableIndex], a ret -; 101297 -Jumptable_101297: ; 101297 +Jumptable_101297: dw Function101a97 ; 00 dw Function101ab4 ; 01 dw Function101475 ; 02 @@ -3038,9 +2892,8 @@ Jumptable_101297: ; 101297 dw Function101ca0 ; 77 dw Function101475 ; 78 dw Function101cbc ; 79 -; 10138b -Function10138b: ; 10138b +Function10138b: farcall Function8adcc ld c, 0 jr c, .asm_101396 @@ -3062,9 +2915,8 @@ Function10138b: ; 10138b .asm_1013a9 ret -; 1013aa -Function1013aa: ; 1013aa +Function1013aa: call ClearBGPalettes call Call_ExitMenu call ReloadTilesetAndPalettes @@ -3072,27 +2924,23 @@ Function1013aa: ; 1013aa call UpdateSprites call FinishExitMenu ret -; 1013c0 -Function1013c0: ; 1013c0 +Function1013c0: farcall BlankScreen farcall Stubbed_Function106462 farcall Function106464 call FinishExitMenu ret -; 1013d6 -Function1013d6: ; 1013d6 +Function1013d6: farcall HDMATransferAttrMapAndTileMapToWRAMBank3 ret -; 1013dd -Function1013dd: ; 1013dd +Function1013dd: call CGBOnly_CopyTilemapAtOnce ret -; 1013e1 -Unreferenced_Function1013e1: ; 1013e1 +Unreferenced_Function1013e1: push de inc de ld b, a @@ -3113,9 +2961,8 @@ Unreferenced_Function1013e1: ; 1013e1 ld a, c ld [de], a ret -; 1013f5 -Function1013f5: ; 1013f5 +Function1013f5: ld a, [hli] ld [de], a inc de @@ -3127,16 +2974,15 @@ Function1013f5: ; 1013f5 dec c jr nz, .asm_1013f9 ret -; 101400 -Unreferenced_Function101400: ; 101400 +Unreferenced_Function101400: ld a, [de] inc de cp [hl] jr nz, asm_101416 inc hl -Function101406: ; 101406 +Function101406: ld c, a ld b, 0 .asm_101409 @@ -3155,9 +3001,8 @@ Function101406: ; 101406 asm_101416 scf ret -; 101418 -Function101418: ; 101418 +Function101418: call GetJoypad ld a, [hJoyDown] and SELECT + A_BUTTON @@ -3171,16 +3016,14 @@ Function101418: ; 101418 ld [wcd2b], a scf ret -; 10142c -Function10142c: ; 10142c +Function10142c: ld a, $01 ld [wc305], a farcall Function115e18 ret -; 101438 -Function101438: ; 101438 +Function101438: ld hl, wcd29 set 6, [hl] ld a, [wcd26] @@ -3195,21 +3038,19 @@ Function101438: ; 101438 inc a ld [wMobileCommsJumptableIndex], a ret -; 101457 -Jumptable_101457: ; 101457 +Jumptable_101457: dw Function10145b dw Function101467 -; 10145b -Function10145b: ; 10145b +Function10145b: ld a, $3c ld [wcd42], a ld a, [wcd26] inc a ld [wcd26], a -Function101467: ; 101467 +Function101467: ld hl, wcd42 dec [hl] ret nz @@ -3217,9 +3058,8 @@ Function101467: ; 101467 set 7, a ld [wcd26], a ret -; 101475 -Function101475: ; 101475 +Function101475: ld hl, wcd29 set 6, [hl] ld a, [wcd26] @@ -3234,22 +3074,20 @@ Function101475: ; 101475 inc a ld [wMobileCommsJumptableIndex], a ret -; 101494 -Jumptable_101494: ; 101494 +Jumptable_101494: dw Function10149a dw Function1014a6 dw Function1014b7 -; 10149a -Function10149a: ; 10149a +Function10149a: ld a, $28 ld [wcd42], a ld a, [wcd26] inc a ld [wcd26], a -Function1014a6: ; 1014a6 +Function1014a6: ld hl, wcd42 dec [hl] ret nz @@ -3259,7 +3097,7 @@ Function1014a6: ; 1014a6 inc a ld [wcd26], a -Function1014b7: ; 1014b7 +Function1014b7: call GetJoypad ld a, [hJoyPressed] and $03 @@ -3273,18 +3111,16 @@ Function1014b7: ; 1014b7 set 7, a ld [wcd26], a ret -; 1014ce -Function1014ce: ; 1014ce +Function1014ce: farcall Function100720 farcall StartMobileInactivityTimer ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 1014e2 -Function1014e2: ; 1014e2 +Function1014e2: ld hl, wcd29 set 6, [hl] ld a, 0 @@ -3293,9 +3129,8 @@ Function1014e2: ; 1014e2 inc a ld [wMobileCommsJumptableIndex], a ret -; 1014f4 -Function1014f4: ; 1014f4 +Function1014f4: farcall EnableMobile ld hl, wcd29 set 6, [hl] @@ -3303,9 +3138,8 @@ Function1014f4: ; 1014f4 inc a ld [wMobileCommsJumptableIndex], a ret -; 101507 -Function101507: ; 101507 +Function101507: ld de, wcd30 ld hl, $40 ld bc, $40 @@ -3315,36 +3149,32 @@ Function101507: ; 101507 inc a ld [wMobileCommsJumptableIndex], a ret -; 10151d -Unreferenced_Function10151d: ; 10151d +Unreferenced_Function10151d: ld a, $34 call Function3e32 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 10152a -Function10152a: ; 10152a +Function10152a: ld a, $36 call Function3e32 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 101537 -Function101537: ; 101537 +Function101537: ld a, $0a call Function3e32 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 101544 -Function101544: ; 101544 +Function101544: farcall StartMobileInactivityTimer ld a, $12 call Function3e32 @@ -3352,9 +3182,8 @@ Function101544: ; 101544 inc a ld [wMobileCommsJumptableIndex], a ret -; 101557 -Function101557: ; 101557 +Function101557: farcall StartMobileInactivityTimer ld hl, wcd53 ld a, $08 @@ -3363,13 +3192,12 @@ Function101557: ; 101557 inc a ld [wMobileCommsJumptableIndex], a ret -; 10156d -Function10156d: ; 10156d +Function10156d: call Function101418 ret c -Function101571: ; 101571 +Function101571: farcall Function10032e ret c ret z @@ -3384,9 +3212,8 @@ Function101571: ; 101571 inc a ld [wMobileCommsJumptableIndex], a ret -; 10158a -Function10158a: ; 10158a +Function10158a: farcall IncrementMobileInactivityTimerBy1Frame ld a, [wMobileInactivityTimerMinutes] cp $0a @@ -3394,9 +3221,8 @@ Function10158a: ; 10158a ld a, $fb ld [wcd2b], a ret -; 10159d -Function10159d: ; 10159d +Function10159d: ld de, wc608 farcall Function100edf ld de, wc608 @@ -3409,9 +3235,8 @@ Function10159d: ; 10159d inc a ld [wMobileCommsJumptableIndex], a ret -; 1015be -Function1015be: ; 1015be +Function1015be: ld de, wc608 farcall Function100eed ld de, wc608 @@ -3424,9 +3249,8 @@ Function1015be: ; 1015be inc a ld [wMobileCommsJumptableIndex], a ret -; 1015df -Function1015df: ; 1015df +Function1015df: ld de, wc608 farcall Function100ef4 ld de, wc608 @@ -3439,9 +3263,8 @@ Function1015df: ; 1015df inc a ld [wMobileCommsJumptableIndex], a ret -; 101600 -Function101600: ; 101600 +Function101600: ld hl, w5_d800 ld de, wc608 ld bc, $1e0 @@ -3453,39 +3276,34 @@ Function101600: ; 101600 inc a ld [wMobileCommsJumptableIndex], a ret -; 10161f -Function10161f: ; 10161f +Function10161f: call Function101649 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 10162a -Function10162a: ; 10162a +Function10162a: call Function101663 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 101635 -Function101635: ; 101635 +Function101635: ld de, wc608 ld bc, $1e0 call FarCopyWRAM ret -; 10163f -Function10163f: ; 10163f +Function10163f: ld hl, wc608 ld bc, $1e0 call FarCopyWRAM ret -; 101649 -Function101649: ; 101649 +Function101649: ld a, $05 ld hl, w5_d800 call Function101635 @@ -3493,16 +3311,14 @@ Function101649: ; 101649 ld de, w5_da00 call Function10163f ret -; 10165a -Function10165a: ; 10165a +Function10165a: ld a, $05 ld hl, w5_da00 call Function101635 ret -; 101663 -Function101663: ; 101663 +Function101663: ld a, $05 ld hl, w5_d800 call Function101635 @@ -3510,29 +3326,26 @@ Function101663: ; 101663 ld de, w5_dc00 call Function10163f ret -; 101674 -Unreferenced_Function101674: ; 101674 +Unreferenced_Function101674: ld a, $05 ld hl, w5_dc00 call Function101635 ret -; 10167d -Function10167d: ; 10167d +Function10167d: ld a, 0 ld [wcd26], a ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 10168a -Function10168a: ; 10168a +Function10168a: call Function101418 ret c -Function10168e: ; 10168e +Function10168e: ld b, 0 ld c, $01 farcall Function10079c @@ -3555,18 +3368,16 @@ Function10168e: ; 10168e inc a ld [wMobileCommsJumptableIndex], a ret -; 1016c3 -Jumptable_1016c3: ; 1016c3 +Jumptable_1016c3: dw Function1016cf dw Function1016de dw Function1016f8 dw Function101705 dw Function101719 dw Function101724 -; 1016cf -Function1016cf: ; 1016cf +Function1016cf: ld hl, wcd3a inc [hl] call Function10176f @@ -3574,9 +3385,8 @@ Function1016cf: ; 1016cf inc a ld [wcd26], a ret -; 1016de -Function1016de: ; 1016de +Function1016de: call Function10177b jr nc, .asm_1016eb ld a, [wcd26] @@ -3591,18 +3401,16 @@ Function1016de: ; 1016de inc a ld [wcd26], a ret -; 1016f8 -Function1016f8: ; 1016f8 +Function1016f8: ld a, 0 ld [wcd27], a ld a, [wcd26] inc a ld [wcd26], a ret -; 101705 -Function101705: ; 101705 +Function101705: farcall Function100382 ld a, [wcd27] bit 7, a @@ -3611,17 +3419,15 @@ Function101705: ; 101705 inc a ld [wcd26], a ret -; 101719 -Function101719: ; 101719 +Function101719: call Function1017c7 ld a, [wcd26] inc a ld [wcd26], a ret -; 101724 -Function101724: ; 101724 +Function101724: ld a, [wcd39] cp $ff jr z, .asm_101731 @@ -3634,12 +3440,11 @@ Function101724: ; 101724 set 7, a ld [wcd26], a ret -; 10173a Unknown_10173a: db $50 -Function10173b: ; 10173b +Function10173b: push bc push af ld a, [hli] @@ -3652,9 +3457,8 @@ Function10173b: ; 10173b call AddNTimes pop bc ret -; 10174c -Function10174c: ; 10174c +Function10174c: ld [wcd3d], a ld a, l ld [wcd3e], a @@ -3672,17 +3476,15 @@ Function10174c: ; 10174c ld [wcd39], a ld [wcd3a], a ret -; 10176f -Function10176f: ; 10176f +Function10176f: ld hl, wccb4 ld bc, $54 ld a, $11 call ByteFill ret -; 10177b -Function10177b: ; 10177b +Function10177b: ld a, [Unknown_10173a] ld c, a ld b, 0 @@ -3719,9 +3521,8 @@ Function10177b: ; 10177b call Function1017b0 xor a ret -; 1017b0 -Function1017b0: ; 1017b0 +Function1017b0: ld a, c ld [wccb4], a push bc @@ -3733,9 +3534,8 @@ Function1017b0: ; 1017b0 ld de, wccb5 call CopyBytes ret -; 1017c7 -Function1017c7: ; 1017c7 +Function1017c7: ld a, [wcc60] ld c, a ld b, 0 @@ -3750,22 +3550,20 @@ Function1017c7: ; 1017c7 call FarCopyWRAM and a ret -; 1017e4 -Function1017e4: ; 1017e4 +Function1017e4: ld a, 0 ld [wcd27], a ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 1017f1 -Function1017f1: ; 1017f1 +Function1017f1: call Function101418 ret c -Function1017f5: ; 1017f5 +Function1017f5: ld b, 0 ld c, $01 farcall Function10079c @@ -3787,9 +3585,8 @@ Function1017f5: ; 1017f5 inc a ld [wMobileCommsJumptableIndex], a ret -; 101826 -Function101826: ; 101826 +Function101826: ld a, [wcd21] cp $02 jr z, .asm_101833 @@ -3829,7 +3626,6 @@ Function101826: ; 101826 ld a, $fe ld [wcd2b], a ret -; 10186f SECTION "ascii 10186f", ROMX @@ -3850,12 +3646,11 @@ Unknown_101895: db .end - @ db $19, $67, $10, $01, "limit_crystal" .end db 0 -; 1018a8 SECTION "bank40_3", ROMX -Function1018a8: ; 1018a8 +Function1018a8: ld hl, wccb5 ld de, wcc61 ld a, $04 @@ -3880,25 +3675,22 @@ Function1018a8: ; 1018a8 ld a, $f5 ld [wcd2b], a ret -; 1018d6 -Function1018d6: ; 1018d6 +Function1018d6: call Function1018ec ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 1018e1 -Function1018e1: ; 1018e1 +Function1018e1: call Function1018fb ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 1018ec -Function1018ec: ; 1018ec +Function1018ec: ld a, $0a ld hl, wccb4 ld [hli], a @@ -3909,9 +3701,8 @@ Function1018ec: ; 1018ec dec c jr nz, .asm_1018f3 ret -; 1018fb -Function1018fb: ; 1018fb +Function1018fb: ld a, [wcd2f] and a jr z, .asm_101906 @@ -3926,9 +3717,8 @@ Function1018fb: ; 1018fb ld bc, 10 call CopyBytes ret -; 101913 -Function101913: ; 101913 +Function101913: ld hl, wcd2a set 0, [hl] xor a @@ -3959,9 +3749,8 @@ Function101913: ; 101913 ld a, $65 ld [wMobileCommsJumptableIndex], a ret -; 10194b -Function10194b: ; 10194b +Function10194b: call DisableSpriteUpdates call ClearSprites farcall Function1021f9 @@ -3977,9 +3766,8 @@ Function10194b: ; 10194b ld a, $60 ld [wMobileCommsJumptableIndex], a ret -; 10196d -_SelectMonsForMobileBattle: ; 10196d +_SelectMonsForMobileBattle: farcall BlankScreen farcall Mobile_CommunicationStandby ld hl, wcd29 @@ -4003,9 +3791,8 @@ _SelectMonsForMobileBattle: ; 10196d inc a ld [wMobileCommsJumptableIndex], a ret -; 1019ab -_StartMobileBattle: ; 1019ab +_StartMobileBattle: call CopyOtherPlayersBattleMonSelection farcall Function100754 xor a @@ -4029,9 +3816,8 @@ _StartMobileBattle: ; 1019ab inc a ld [wMobileCommsJumptableIndex], a ret -; 1019ee -.CopyOTDetails: ; 1019ee +.CopyOTDetails: ld a, [rSVBK] push af ld a, 5 @@ -4058,9 +3844,8 @@ _StartMobileBattle: ; 1019ab .got_link_player_number ld [hSerialConnectionStatus], a ret -; 101a21 -StartMobileBattle: ; 101a21 +StartMobileBattle: ; force stereo and fast text speed ld hl, wOptions ld a, [hl] @@ -4080,9 +3865,8 @@ StartMobileBattle: ; 101a21 pop af ld [wOptions], a ret -; 101a4f -Function101a4f: ; 101a4f +Function101a4f: ld a, 1 ld [wDisableTextAcceleration], a farcall DisplayLinkBattleResult @@ -4095,9 +3879,8 @@ Function101a4f: ; 101a4f inc a ld [wMobileCommsJumptableIndex], a ret -; 101a75 -CopyOtherPlayersBattleMonSelection: ; 101a75 +CopyOtherPlayersBattleMonSelection: ld hl, wcc61 ld de, wOTMonSelection ld bc, 3 @@ -4107,9 +3890,8 @@ CopyOtherPlayersBattleMonSelection: ; 101a75 farcall Function101050 farcall LoadSelectedPartiesForColosseum ret -; 101a97 -Function101a97: ; 101a97 +Function101a97: farcall Function115d99 ld hl, wcd29 set 7, [hl] @@ -4121,9 +3903,8 @@ Function101a97: ; 101a97 inc a ld [wMobileCommsJumptableIndex], a ret -; 101ab4 -Function101ab4: ; 101ab4 +Function101ab4: ld e, $01 call Function101ee4 ld hl, wcd29 @@ -4132,9 +3913,8 @@ Function101ab4: ; 101ab4 inc a ld [wMobileCommsJumptableIndex], a ret -; 101ac6 -Function101ac6: ; 101ac6 +Function101ac6: farcall Function115d99 ld hl, wcd29 set 7, [hl] @@ -4150,9 +3930,8 @@ Function101ac6: ; 101ac6 inc a ld [wMobileCommsJumptableIndex], a ret -; 101aed -Function101aed: ; 101aed +Function101aed: farcall Function115d99 ld hl, wcd29 set 7, [hl] @@ -4166,9 +3945,8 @@ Function101aed: ; 101aed inc a ld [wMobileCommsJumptableIndex], a ret -; 101b0f -Function101b0f: ; 101b0f +Function101b0f: ld c, 0 call Function10142c ld e, $03 @@ -4181,9 +3959,8 @@ Function101b0f: ; 101b0f ld a, 0 ld [wcd26], a ret -; 101b2b -Function101b2b: ; 101b2b +Function101b2b: farcall Function100579 ld hl, wcd29 set 2, [hl] @@ -4205,9 +3982,8 @@ Function101b2b: ; 101b2b inc a ld [wMobileCommsJumptableIndex], a ret -; 101b59 -Function101b59: ; 101b59 +Function101b59: ld c, $02 call Function10142c ld e, $02 @@ -4218,9 +3994,8 @@ Function101b59: ; 101b59 inc a ld [wMobileCommsJumptableIndex], a ret -; 101b70 -Function101b70: ; 101b70 +Function101b70: ld c, $02 call Function10142c ld e, $04 @@ -4234,9 +4009,8 @@ Function101b70: ; 101b70 ld a, 0 ld [wcd26], a ret -; 101b8f -Function101b8f: ; 101b8f +Function101b8f: farcall Function1005c3 ld hl, wcd29 set 2, [hl] @@ -4263,9 +4037,8 @@ Function101b8f: ; 101b8f inc a ld [wMobileCommsJumptableIndex], a ret -; 101bc8 -Function101bc8: ; 101bc8 +Function101bc8: ld c, $02 call Function10142c ld e, $08 @@ -4278,9 +4051,8 @@ Function101bc8: ; 101bc8 inc a ld [wMobileCommsJumptableIndex], a ret -; 101be5 -Function101be5: ; 101be5 +Function101be5: farcall Function100579 ld hl, wcd29 set 2, [hl] @@ -4301,9 +4073,8 @@ Function101be5: ; 101be5 ld a, $02 ld [wcd2b], a ret -; 101c11 -Function101c11: ; 101c11 +Function101c11: ld a, $01 ld [wdc5f], a ld e, $09 @@ -4315,9 +4086,8 @@ Function101c11: ; 101c11 inc a ld [wMobileCommsJumptableIndex], a ret -; 101c2b -Function101c2b: ; 101c2b +Function101c2b: ld a, $02 ld [wdc5f], a ld e, $07 @@ -4328,18 +4098,16 @@ Function101c2b: ; 101c2b inc a ld [wMobileCommsJumptableIndex], a ret -; 101c42 -Function101c42: ; 101c42 +Function101c42: ld hl, wcd2a set 1, [hl] call Function100665 ld a, $47 ld [wMobileCommsJumptableIndex], a ret -; 101c50 -Function101c50: ; 101c50 +Function101c50: ld e, $0a call Function101ee4 ld hl, wcd29 @@ -4348,9 +4116,8 @@ Function101c50: ; 101c50 inc a ld [wMobileCommsJumptableIndex], a ret -; 101c62 -Function101c62: ; 101c62 +Function101c62: farcall Function115d99 ld hl, wcd29 set 7, [hl] @@ -4370,17 +4137,15 @@ Function101c62: ; 101c62 ld a, 0 ld [wcd26], a ret -; 101c92 -Function101c92: ; 101c92 +Function101c92: farcall Function100675 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 101ca0 -Function101ca0: ; 101ca0 +Function101ca0: ld c, $02 call Function10142c ld e, $0c @@ -4393,21 +4158,18 @@ Function101ca0: ; 101ca0 ld a, 0 ld [wcd26], a ret -; 101cbc -Function101cbc: ; 101cbc +Function101cbc: ld a, $01 ld [wcd2b], a ret -; 101cc2 -Unreferenced_Function101cc2: ; 101cc2 +Unreferenced_Function101cc2: ld a, $02 ld [wcd2b], a ret -; 101cc8 -Function101cc8: ; 101cc8 +Function101cc8: ld a, $01 ld [wc314], a ld a, $01 @@ -4418,9 +4180,8 @@ Function101cc8: ; 101cc8 inc a ld [wMobileCommsJumptableIndex], a ret -; 101cdf -Function101cdf: ; 101cdf +Function101cdf: ld a, $06 ld [wc314], a ld a, $01 @@ -4431,27 +4192,24 @@ Function101cdf: ; 101cdf inc a ld [wMobileCommsJumptableIndex], a ret -; 101cf6 -Function101cf6: ; 101cf6 +Function101cf6: ld a, $0b ld [wc314 + 1], a ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 101d03 -Function101d03: ; 101d03 +Function101d03: ld a, $0e ld [wc314 + 1], a ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 101d10 -Function101d10: ; 101d10 +Function101d10: ld c, $01 call Function10142c ld a, [wMobileCommsJumptableIndex] @@ -4459,14 +4217,14 @@ Function101d10: ; 101d10 ld [wMobileCommsJumptableIndex], a jr Function101d2a -Function101d1e: ; 101d1e +Function101d1e: ld c, $03 call Function10142c ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a -Function101d2a: ; 101d2a +Function101d2a: call Function101418 ret c ld hl, wcd29 @@ -4483,21 +4241,19 @@ Function101d2a: ; 101d2a inc a ld [wMobileCommsJumptableIndex], a ret -; 101d4d -Jumptable_101d4d: ; 101d4d +Jumptable_101d4d: dw Function101d51 dw Function101d5d -; 101d51 -Function101d51: ; 101d51 +Function101d51: ld a, $3c ld [wcd42], a ld a, [wcd26] inc a ld [wcd26], a -Function101d5d: ; 101d5d +Function101d5d: ld hl, wcd42 dec [hl] ret nz @@ -4505,9 +4261,8 @@ Function101d5d: ; 101d5d set 7, a ld [wcd26], a ret -; 101d6b -Function101d6b: ; 101d6b +Function101d6b: ld a, [wc30d] and a ret nz @@ -4516,9 +4271,8 @@ Function101d6b: ; 101d6b ld a, $64 ld [wMobileCommsJumptableIndex], a ret -; 101d7b -Function101d7b: ; 101d7b +Function101d7b: farcall Function10138b ld b, 0 ld hl, Unknown_101d8d @@ -4527,13 +4281,11 @@ Function101d7b: ; 101d7b ld a, c ld [wMobileCommsJumptableIndex], a ret -; 101d8d -Unknown_101d8d: ; 101d8d +Unknown_101d8d: db $15, $15, $1f, $1f, $0c, $12, $3a, $3a -; 101d95 -Function101d95: ; 101d95 +Function101d95: call Function101ee2 call LoadStandardMenuHeader ld e, $0e @@ -4546,9 +4298,8 @@ Function101d95: ; 101d95 ld a, 0 ld [wcd26], a ret -; 101db2 -Function101db2: ; 101db2 +Function101db2: farcall Function103302 call ExitMenu ld hl, wcd29 @@ -4563,9 +4314,8 @@ Function101db2: ; 101db2 ld a, $02 ld [wcd2b], a ret -; 101dd0 -Function101dd0: ; 101dd0 +Function101dd0: ld hl, wdc41 bit 1, [hl] jr nz, .asm_101ddd @@ -4577,9 +4327,8 @@ Function101dd0: ; 101dd0 ld a, $1b ld [wMobileCommsJumptableIndex], a ret -; 101de3 -Function101de3: ; 101de3 +Function101de3: call Function101ecc call Function101ead jr c, .asm_101df3 @@ -4601,9 +4350,8 @@ Function101de3: ; 101de3 ld a, $02 ld [wcd2b], a ret -; 101e09 -Function101e09: ; 101e09 +Function101e09: call Function101ead jr c, .asm_101e16 ld a, [wMobileCommsJumptableIndex] @@ -4627,15 +4375,13 @@ Function101e09: ; 101e09 ld a, $02 ld [wcd2b], a ret -; 101e31 -Function101e31: ; 101e31 +Function101e31: ld a, $3a ld [wMobileCommsJumptableIndex], a jp Function101c2b -; 101e39 -Function101e39: ; 101e39 +Function101e39: call Function1020bf push af call Function101ed3 @@ -4649,9 +4395,8 @@ Function101e39: ; 101e39 ld a, $02 ld [wcd2b], a ret -; 101e4f -Function101e4f: ; 101e4f +Function101e4f: ld e, $06 call Function101ee4 call Function1013d6 @@ -4661,9 +4406,8 @@ Function101e4f: ; 101e4f ld a, 0 ld [wcd26], a ret -; 101e64 -Function101e64: ; 101e64 +Function101e64: call Function101ecc call Function1020a8 push af @@ -4680,25 +4424,22 @@ Function101e64: ; 101e64 ld a, $02 ld [wcd2b], a ret -; 101e82 -Unreferenced_Function101e82: ; 101e82 +Unreferenced_Function101e82: call Function101ecc ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 101e8d -Unreferenced_Function101e8d: ; 101e8d +Unreferenced_Function101e8d: call Function101ed3 ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a ret -; 101e98 -Function101e98: ; 101e98 +Function101e98: call ClearSprites farcall Function8adb3 ret c @@ -4707,9 +4448,8 @@ Function101e98: ; 101e98 ld hl, wdc41 set 4, [hl] ret -; 101ead -Function101ead: ; 101ead +Function101ead: ld hl, wGameTimerPause bit GAMETIMERPAUSE_MOBILE_7_F, [hl] jr nz, .asm_101ec8 @@ -4730,26 +4470,23 @@ Function101ead: ; 101ead .asm_101eca scf ret -; 101ecc -Function101ecc: ; 101ecc +Function101ecc: call Function101ee2 call FadeToMenu ret -; 101ed3 -Function101ed3: ; 101ed3 +Function101ed3: call Function1013aa farcall Function115d99 ld hl, wcd29 set 7, [hl] ret -; 101ee2 -Function101ee2: ; 101ee2 +Function101ee2: ld e, 0 -Function101ee4: ; 101ee4 +Function101ee4: ld d, 0 ld hl, Unknown_101ef5 add hl, de @@ -4759,9 +4496,8 @@ Function101ee4: ; 101ee4 ld e, a farcall Function100504 ret -; 101ef5 -Unknown_101ef5: ; 101ef5 +Unknown_101ef5: dw String_101f13 dw String_101f14 dw String_101f32 @@ -4778,62 +4514,61 @@ Unknown_101ef5: ; 101ef5 dw String_10200c dw String_102014 -String_101f13: ; 101f13 +String_101f13: db "@" -String_101f14: ; 101f14 +String_101f14: db "モバイルアダプタを つかって" next "おともだちと つうしんします@" -String_101f32: ; 101f32 +String_101f32: db "でんわを かけるひとには" next "つうわりょうきんが かかります@" -String_101f4f: ; 101f4f +String_101f4f: db "モバイルアダプタの じゅんびは" next "できて いますか?@" -String_101f69: ; 101f69 +String_101f69: db "あなたが おともだちに" next "でんわを かけますか?@" -String_101f81: ; 101f81 +String_101f81: db "めいしフォルダーを" next "つかいますか?@" -String_101f93: ; 101f93 +String_101f93: db "でんわばんごうを にゅうりょく" next "してください@" -String_101faa: ; 101faa +String_101faa: db "それでは おともだちからの" next "でんわを おまちします⋯@" -String_101fc5: ; 101fc5 +String_101fc5: next "に でんわを かけます@" -String_101fd2: ; 101fd2 +String_101fd2: next "に でんわを かけています@" -String_101fe1: ; 101fe1 +String_101fe1: db "でんわが つながりました!@" -String_101fef: ; 101fef +String_101fef: db "つうわを" next "しゅうりょう します⋯@" -String_102000: ; 102000 +String_102000: db "つうしん しゅうりょう@" -String_10200c: ; 10200c +String_10200c: db "つうわ じかん@" -String_102014: ; 102014 +String_102014: db "それでは つうしんの" next "せっていを してください@" -; 10202c -Function10202c: ; 10202c +Function10202c: farcall Function115d99 ld hl, wcd29 set 7, [hl] @@ -4844,14 +4579,12 @@ Function10202c: ; 10202c hlcoord 4, 4 call Function100681 ret -; 102048 -Function102048: ; 102048 +Function102048: call Function10204c ret -; 10204c -Function10204c: ; 10204c +Function10204c: hlcoord 3, 2 ld c, $10 ld de, wcd53 @@ -4871,9 +4604,8 @@ Function10204c: ; 10204c .asm_102067 ret -; 102068 -Function102068: ; 102068 +Function102068: ld hl, wcd53 ld c, $08 .asm_10206d @@ -4890,9 +4622,8 @@ Function102068: ; 102068 .asm_10207f ret -; 102080 -Function102080: ; 102080 +Function102080: and $0f cp $0f jr z, .asm_10208a @@ -4904,9 +4635,8 @@ Function102080: ; 102080 ld [hl], 0 scf ret -; 10208e -Function10208e: ; 10208e +Function10208e: push de ld h, d ld l, e @@ -4915,17 +4645,15 @@ Function10208e: ; 10208e call CopyBytes pop de ret -; 10209c -Function10209c: ; 10209c +Function10209c: ld a, $ff ld hl, wdc42 ld bc, 8 call ByteFill ret -; 1020a8 -Function1020a8: ; 1020a8 +Function1020a8: call Function10209c ld c, $01 ld de, wdc42 @@ -4935,9 +4663,8 @@ Function1020a8: ; 1020a8 call Function102068 xor a ret -; 1020bf -Function1020bf: ; 1020bf +Function1020bf: call ClearSprites farcall Function8aba9 ld a, c @@ -4960,9 +4687,8 @@ Function1020bf: ; 1020bf .asm_1020e8 scf ret -; 1020ea -Function1020ea: ; 1020ea +Function1020ea: ld hl, wdc41 bit 4, [hl] jr z, .quit @@ -4984,9 +4710,8 @@ Function1020ea: ; 1020ea .quit scf ret -; 102112 -Function102112: ; 102112 +Function102112: ld a, $04 call GetSRAMBank ld hl, $a041 @@ -5022,9 +4747,8 @@ Function102112: ; 102112 call CloseSRAM pop af ret -; 102142 -Function102142: ; 102142 +Function102142: call Function10218d call Function102180 ld hl, UnknownText_0x1021d1 @@ -5049,17 +4773,15 @@ Function102142: ; 102142 .asm_10217c call Function1013d6 ret -; 102180 -Function102180: ; 102180 +Function102180: ld hl, wc608 + 1 ld de, wStringBuffer2 ld bc, 11 call CopyBytes ret -; 10218d -Function10218d: ; 10218d +Function10218d: ld hl, w5_dc00 ld de, wc608 ld bc, $26 @@ -5067,9 +4789,8 @@ Function10218d: ; 10218d call FarCopyWRAM ld de, wc608 + 1 ; useless ret -; 10219f -Function10219f: ; 10219f +Function10219f: call FadeToMenu call Function10218d ld de, wc608 + 1 @@ -5078,9 +4799,8 @@ Function10219f: ; 10219f call PlayClickSFX call Function1013aa ret -; 1021b8 -Function1021b8: ; 1021b8 +Function1021b8: call FadeToMenu call Function10218d ld de, wPlayerMoveStruct @@ -5091,29 +4811,26 @@ Function1021b8: ; 1021b8 call Function1013aa pop af ret -; 1021d1 -UnknownText_0x1021d1: ; 1021d1 +UnknownText_0x1021d1: text_jump UnknownText_0x1bd19a db "@" -UnknownText_0x1021d6: ; 1021d1 +UnknownText_0x1021d6: text_jump UnknownText_0x1bd1ba db "@" -UnknownText_0x1021db: ; 1021d1 +UnknownText_0x1021db: text_jump UnknownText_0x1bd1dd db "@" -; 1021e0 -Function1021e0: ; 1021e0 +Function1021e0: call MenuTextBox call JoyWaitAorB call ExitMenu ret -; 1021ea -UnknownText_0x1021ea: ; 1021ea +UnknownText_0x1021ea: text_jump UnknownText_0x1bd201 db "@" @@ -5124,9 +4841,8 @@ UnknownText_0x1021ef: UnknownText_0x1021f4: text_jump UnknownText_0x1bd223 db "@" -; 1021f9 -Function1021f9: ; 1021f9 +Function1021f9: call Function102233 ld a, $0 ; Function10234b ld [wcd49], a @@ -5158,25 +4874,22 @@ Function1021f9: ; 1021f9 .asm_102231 xor a ret -; 102233 -Function102233: ; 102233 +Function102233: ld hl, wcd49 ld bc, 10 xor a call ByteFill call Function10304f ret -; 102241 -Function102241: ; 102241 +Function102241: call Function10226a call Function102274 call Function10224b ret -; 10224b -Function10224b: ; 10224b +Function10224b: ld hl, wcd4b bit 1, [hl] jr nz, .asm_10225e @@ -5193,17 +4906,15 @@ Function10224b: ; 10224b farcall Mobile_ReloadMapPart scf ret -; 10226a -Function10226a: ; 10226a +Function10226a: ld hl, wcd4b bit 0, [hl] ret z call Function10305d ret -; 102274 -Function102274: ; 102274 +Function102274: ld hl, wcd4b bit 3, [hl] ret z @@ -5211,25 +4922,22 @@ Function102274: ; 102274 ld de, 8 call PlaySFX ret -; 102283 -Function102283: ; 102283 +Function102283: ld a, $01 ld [wAttrMapEnd], a ld hl, wcd4b set 0, [hl] ret -; 10228e -Function10228e: ; 10228e +Function10228e: xor a ld [wAttrMapEnd], a ld hl, wcd4b res 0, [hl] ret -; 102298 -Function102298: ; 102298 +Function102298: ld a, e cp $02 ret nz @@ -5257,15 +4965,13 @@ Function102298: ; 102298 ld a, $01 ld [wAttrMapEnd], a ret -; 1022ca -Function1022ca: ; 1022ca +Function1022ca: ld a, 30 ld [wOverworldDelay], a ret -; 1022d0 -Function1022d0: ; 1022d0 +Function1022d0: farcall Function10032e ld a, [wcd2b] and a @@ -5285,9 +4991,8 @@ Function1022d0: ; 1022d0 .asm_1022f3 scf ret -; 1022f5 -Jumptable_1022f5: ; 1022f5 +Jumptable_1022f5: dw Function10234b ; 00 dw Function102361 ; 01 dw Function10236e ; 02 @@ -5331,9 +5036,8 @@ Jumptable_1022f5: ; 1022f5 dw Function1028da ; 28 dw Function1024a8 ; 29 dw Function10248d ; 2a -; 10234b -Function10234b: ; 10234b +Function10234b: call Function102d9a call Function102dd3 call Function102dec @@ -5343,18 +5047,16 @@ Function10234b: ; 10234b inc a ld [wcd49], a ret -; 102361 -Function102361: ; 102361 +Function102361: ld a, $cc call Function1028e8 ld a, [wcd49] inc a ld [wcd49], a ret -; 10236e -Function10236e: ; 10236e +Function10236e: call Function1028fc ret nc ld a, [wcd51] @@ -5369,9 +5071,8 @@ Function10236e: ; 10236e inc a ld [wcd49], a ret -; 102387 -Function102387: ; 102387 +Function102387: ld hl, wcd4b set 6, [hl] xor a @@ -5383,7 +5084,7 @@ Function102387: ; 102387 ld a, $01 ld [wMenuCursorY], a -Function1023a1: ; 1023a1 +Function1023a1: call Function102283 call Function102db7 call Function102dec @@ -5392,9 +5093,8 @@ Function1023a1: ; 1023a1 ld a, $1d ld [wcd49], a ret -; 1023b5 -Function1023b5: ; 1023b5 +Function1023b5: call Function10228e call Function102a3b call Function102b12 @@ -5402,9 +5102,8 @@ Function1023b5: ; 1023b5 inc a ld [wcd49], a ret -; 1023c6 -Function1023c6: ; 1023c6 +Function1023c6: call Function102c48 call Function102c87 ld a, [wcd4c] @@ -5438,18 +5137,16 @@ Function1023c6: ; 1023c6 inc a ld [wcd49], a ret -; 102416 -Function102416: ; 102416 +Function102416: ld a, $aa call Function1028e8 ld a, [wcd49] inc a ld [wcd49], a ret -; 102423 -Function102423: ; 102423 +Function102423: call Function102921 ret nc farcall SaveAfterLinkTrade @@ -5463,9 +5160,8 @@ Function102423: ; 102423 inc a ld [wcd49], a ret -; 10244b -Function10244b: ; 10244b +Function10244b: call Function102f32 ld hl, wcd4b set 1, [hl] @@ -5479,9 +5175,8 @@ Function10244b: ; 10244b inc a ld [wcd49], a ret -; 10246a -Function10246a: ; 10246a +Function10246a: call Function102d9a ld hl, wcd29 set 3, [hl] @@ -5491,25 +5186,22 @@ Function10246a: ; 10246a ld a, $2a ld [wcd49], a ret -; 102480 -Function102480: ; 102480 +Function102480: ld c, $32 call DelayFrames ld a, [wcd49] inc a ld [wcd49], a ret -; 10248d -Function10248d: ; 10248d +Function10248d: ld a, [wcd49] set 7, a ld [wcd49], a ret -; 102496 -Function102496: ; 102496 +Function102496: ld hl, wcd4e dec [hl] ret nz @@ -5519,34 +5211,31 @@ Function102496: ; 102496 inc a ld [wcd49], a ret -; 1024a8 -Function1024a8: ; 1024a8 +Function1024a8: farcall Function1009f3 ret c -Function1024af: ; 1024af +Function1024af: call GetJoypad ld a, [wcd4a] ld hl, Jumptable_1024ba rst JumpTable ret -; 1024ba -Jumptable_1024ba: ; 1024ba +Jumptable_1024ba: dw Function1024c0 dw Function1024cb dw Function1024de -; 1024c0 -Function1024c0: ; 1024c0 +Function1024c0: ld hl, wcd4e inc [hl] ld a, [wcd4a] inc a ld [wcd4a], a -Function1024cb: ; 1024cb +Function1024cb: ld hl, wcd4e dec [hl] ret nz @@ -5557,7 +5246,7 @@ Function1024cb: ; 1024cb inc a ld [wcd4a], a -Function1024de: ; 1024de +Function1024de: ld hl, wcd4e dec [hl] jr z, .asm_1024e9 @@ -5572,9 +5261,8 @@ Function1024de: ; 1024de inc a ld [wcd49], a ret -; 1024f6 -Function1024f6: ; 1024f6 +Function1024f6: call PlaceHollowCursor ld hl, wcd4b set 1, [hl] @@ -5584,9 +5272,8 @@ Function1024f6: ; 1024f6 inc a ld [wcd49], a ret -; 10250c -Function10250c: ; 10250c +Function10250c: call Function1028fc ret nc ld a, [wcd51] @@ -5653,9 +5340,8 @@ Function10250c: ; 10250c ld a, $09 ld [wcd49], a ret -; 102591 -Function102591: ; 102591 +Function102591: call Function102ee7 ld hl, wcd4b set 1, [hl] @@ -5669,26 +5355,23 @@ Function102591: ; 102591 inc a ld [wcd49], a ret -; 1025b0 -Function1025b0: ; 1025b0 +Function1025b0: ld a, $09 call Function1028e8 ld a, [wcd49] inc a ld [wcd49], a ret -; 1025bd -Function1025bd: ; 1025bd +Function1025bd: call Function1028fc ret nc ld a, $04 ld [wcd49], a ret -; 1025c7 -Function1025c7: ; 1025c7 +Function1025c7: call Function102f6d ld hl, wcd4b set 1, [hl] @@ -5698,18 +5381,16 @@ Function1025c7: ; 1025c7 inc a ld [wcd49], a ret -; 1025dc -Function1025dc: ; 1025dc +Function1025dc: call Function1028fc ret nc ld a, [wcd49] set 7, a ld [wcd49], a ret -; 1025e9 -Function1025e9: ; 1025e9 +Function1025e9: nop ld hl, wcd4b set 6, [hl] @@ -5720,9 +5401,8 @@ Function1025e9: ; 1025e9 inc a ld [wcd49], a ret -; 1025ff -Function1025ff: ; 1025ff +Function1025ff: ld hl, wcd4b set 2, [hl] farcall Function1009f3 @@ -5766,9 +5446,8 @@ Function1025ff: ; 1025ff ld a, $23 ; Function1026b7 ld [wcd49], a ret -; 102652 -Function102652: ; 102652 +Function102652: nop ld hl, wcd4b set 6, [hl] @@ -5782,9 +5461,8 @@ Function102652: ; 102652 inc a ld [wcd49], a ret -; 10266b -Function10266b: ; 10266b +Function10266b: ld hl, wcd4b set 2, [hl] farcall Function1009f3 @@ -5826,9 +5504,8 @@ Function10266b: ; 10266b ld a, $23 ; Function1026b7 ld [wcd49], a ret -; 1026b7 -Function1026b7: ; 1026b7 +Function1026b7: ld hl, wcd4b set 6, [hl] ld a, [wcd49] @@ -5837,7 +5514,7 @@ Function1026b7: ; 1026b7 ld a, 0 ld [wcd4a], a -Function1026c8: ; 1026c8 +Function1026c8: call GetJoypad farcall Function1009f3 ret c @@ -5845,14 +5522,12 @@ Function1026c8: ; 1026c8 ld hl, Jumptable_1026da rst JumpTable ret -; 1026da -Jumptable_1026da: ; 1026da +Jumptable_1026da: dw Function1026de dw Function1026f3 -; 1026de -Function1026de: ; 1026de +Function1026de: call HideCursor hlcoord 9, 17 ld [hl], $ed @@ -5862,9 +5537,8 @@ Function1026de: ; 1026de ld hl, wcd4b set 1, [hl] ret -; 1026f3 -Function1026f3: ; 1026f3 +Function1026f3: ld a, [hJoyPressed] bit A_BUTTON_F, a jr nz, .asm_102723 @@ -5902,9 +5576,8 @@ Function1026f3: ; 1026f3 ld a, $5 ; Function1025c7 ld [wcd49], a ret -; 102738 -Function102738: ; 102738 +Function102738: ld hl, wcd4b set 6, [hl] call PlaceHollowCursor @@ -5917,7 +5590,7 @@ Function102738: ; 102738 ld a, 0 ld [wcd4a], a -Function102754: ; 102754 +Function102754: call GetJoypad farcall Function1009f3 ret c @@ -5925,21 +5598,19 @@ Function102754: ; 102754 ld hl, Jumptable_102766 rst JumpTable ret -; 102766 -Jumptable_102766: ; 102766 +Jumptable_102766: dw Function102770 dw Function102775 dw Function10278c dw Function1027a0 dw Function1027b7 -; 102770 -Function102770: ; 102770 +Function102770: ld a, $01 ld [wcd4a], a -Function102775: ; 102775 +Function102775: hlcoord 1, 16 ld [hl], "▶" hlcoord 11, 16 @@ -5950,9 +5621,8 @@ Function102775: ; 102775 inc a ld [wcd4a], a ret -; 10278c -Function10278c: ; 10278c +Function10278c: ld a, [hJoyPressed] bit A_BUTTON_F, a jr nz, asm_1027c6 @@ -5965,7 +5635,7 @@ Function10278c: ; 10278c .asm_10279b ld a, $03 ld [wcd4a], a -Function1027a0: ; 1027a0 +Function1027a0: hlcoord 1, 16 ld [hl], " " hlcoord 11, 16 @@ -5977,7 +5647,7 @@ Function1027a0: ; 1027a0 ld [wcd4a], a ret -Function1027b7: ; 1027b7 +Function1027b7: ld a, [hJoyPressed] bit A_BUTTON_F, a jr nz, asm_1027d1 @@ -6008,9 +5678,8 @@ asm_1027e2: ld a, $1d ; Function102652 ld [wcd49], a ret -; 1027eb -Function1027eb: ; 1027eb +Function1027eb: hlcoord 0, 14 ld b, 2 ld c, 18 @@ -6021,13 +5690,11 @@ Function1027eb: ; 1027eb hlcoord 2, 16 call PlaceString ret -; 102804 -.Stats_Trade: ; 102804 +.Stats_Trade: db "STATS TRADE@" -; 102814 -Function102814: ; 102814 +Function102814: ld a, [wMenuCursorY] ld [wcd52], a ld a, [wcd4c] @@ -6045,7 +5712,7 @@ Function102814: ; 102814 ld hl, wcd4b set 1, [hl] -Function10283c: ; 10283c +Function10283c: ld hl, wcd4b set 2, [hl] call Function1029c3 @@ -6065,18 +5732,16 @@ Function10283c: ; 10283c ld hl, wcd4b set 1, [hl] ret -; 102862 -Function102862: ; 102862 +Function102862: ld a, $08 call Function1028e8 ld a, [wcd49] inc a ld [wcd49], a ret -; 10286f -Function10286f: ; 10286f +Function10286f: call Function1028fc ret nc ld a, [wcd52] @@ -6102,15 +5767,13 @@ Function10286f: ; 10286f inc a ld [wcd49], a ret -; 1028a5 -Function1028a5: ; 1028a5 +Function1028a5: ld a, $4 ; Function1023a1 ld [wcd49], a ret -; 1028ab -Function1028ab: ; 1028ab +Function1028ab: ld a, [wcd52] ld [wMenuCursorY], a call Function102f15 @@ -6119,37 +5782,34 @@ Function1028ab: ; 1028ab ld a, $c ; Function1025b0 ld [wcd49], a ret -; 1028bf -Function1028bf: ; 1028bf +Function1028bf: ld a, [wcd49] inc a ld [wcd49], a -Function1028c6: ; 1028c6 +Function1028c6: xor a ld [wMonType], a call Function102bac ld a, $1d ; Function102652 ld [wcd49], a ret -; 1028d3 -Function1028d3: ; 1028d3 +Function1028d3: ld a, [wcd49] inc a ld [wcd49], a -Function1028da: ; 1028da +Function1028da: ld a, OTPARTYMON ld [wMonType], a call Function102bac ld a, $1f ; Function1025e9 ld [wcd49], a ret -; 1028e8 -Function1028e8: ; 1028e8 +Function1028e8: ld hl, wcd4b res 6, [hl] ld [wcd50], a @@ -6157,9 +5817,8 @@ Function1028e8: ; 1028e8 ld a, 0 ld [wcd4a], a ret -; 1028fc -Function1028fc: ; 1028fc +Function1028fc: call GetJoypad farcall Function1009f3 jr nc, .asm_102909 @@ -6174,17 +5833,15 @@ Function1028fc: ; 1028fc ld a, 0 ld [wcd4a], a ret -; 102917 -Jumptable_102917: ; 102917 +Jumptable_102917: dw Function102933 dw Function10294f dw Function10295d dw Function10296e dw Function102996 -; 102921 -Function102921: ; 102921 +Function102921: ld a, [wcd4a] ld hl, Jumptable_10292f rst JumpTable @@ -6192,14 +5849,12 @@ Function102921: ; 102921 ld a, 0 ld [wcd4a], a ret -; 10292f -Jumptable_10292f: ; 10292f +Jumptable_10292f: dw Function10295d dw Function102984 -; 102933 -Function102933: ; 102933 +Function102933: ld hl, MenuHeader_1029bb call LoadMenuHeader call Function102e07 @@ -6212,9 +5867,8 @@ Function102933: ; 102933 ld [wcd4a], a and a ret -; 10294f -Function10294f: ; 10294f +Function10294f: ld a, [wTextDelayFrames] and a ret nz @@ -6223,9 +5877,8 @@ Function10294f: ; 10294f ld [wcd4a], a and a ret -; 10295d -Function10295d: ; 10295d +Function10295d: call Function10299e ld a, 0 ld [wcd27], a @@ -6234,9 +5887,8 @@ Function10295d: ; 10295d ld [wcd4a], a and a ret -; 10296e -Function10296e: ; 10296e +Function10296e: farcall Function100382 and a ld a, [wcd27] @@ -6247,9 +5899,8 @@ Function10296e: ; 10296e ld [wcd4a], a and a ret -; 102984 -Function102984: ; 102984 +Function102984: farcall Function100382 and a ld a, [wcd27] @@ -6258,16 +5909,14 @@ Function102984: ; 102984 call Function1029af scf ret -; 102996 -Function102996: ; 102996 +Function102996: call Function1029af call ExitMenu scf ret -; 10299e -Function10299e: ; 10299e +Function10299e: ld a, $01 ld [wccb4], a ld a, [wcd50] @@ -6275,36 +5924,31 @@ Function10299e: ; 10299e ld a, $aa ld [wcd51], a ret -; 1029af -Function1029af: ; 1029af +Function1029af: ld hl, wcd4b res 7, [hl] ld a, [wcc61] ld [wcd51], a ret -; 1029bb -MenuHeader_1029bb: ; 1029bb +MenuHeader_1029bb: db MENU_BACKUP_TILES ; flags menu_coords 3, 10, 15, 12 dw NULL db 1 ; default option -; 1029c3 -Function1029c3: ; 1029c3 +Function1029c3: ld a, [wcd4a] ld hl, Jumptable_1029cb rst JumpTable ret -; 1029cb -Jumptable_1029cb: ; 1029cb +Jumptable_1029cb: dw Function1029cf dw Function1029fe -; 1029cf -Function1029cf: ; 1029cf +Function1029cf: call LoadStandardMenuHeader hlcoord 10, 7 ld b, 3 @@ -6324,9 +5968,8 @@ Function1029cf: ; 1029cf ld [wcd4a], a xor a ret -; 1029fe -Function1029fe: ; 1029fe +Function1029fe: farcall Function1009f3 ret c farcall MobileMenuJoypad @@ -6349,13 +5992,11 @@ Function1029fe: ; 1029fe and a scf ret -; 102a26 -String_102a26: ; 102a26 +String_102a26: db "TRADE" next "CANCEL" db "@" -; 102a33 MenuData3_102a33: db 8, 11 @@ -6364,7 +6005,7 @@ MenuData3_102a33: dn 2, 0 db A_BUTTON -Function102a3b: ; 102a3b +Function102a3b: ld a, [wcd30] ld [wc74e], a ld hl, wPlayerName @@ -6457,9 +6098,8 @@ Function102a3b: ; 102a3b ld a, c ld [wOTTrademonCaughtData], a ret -; 102b12 -Function102b12: ; 102b12 +Function102b12: ld c, 100 call DelayFrames call Function102d9a @@ -6475,9 +6115,8 @@ Function102b12: ; 102b12 .asm_102b31 ret -; 102b32 -Function102b32: ; 102b32 +Function102b32: ld a, [wcd4c] dec a ld [wCurPartyMon], a @@ -6488,9 +6127,8 @@ Function102b32: ; 102b32 call Function102dd3 call Function102dec ret -; 102b4e -Function102b4e: ; 102b4e +Function102b4e: ld a, OTPARTYMON ld [wMonType], a ld a, [wMenuCursorY] @@ -6502,15 +6140,13 @@ Function102b4e: ; 102b4e ld a, [wOTPartyCount] ld [w2DMenuNumRows], a ret -; 102b68 -Unreferenced_Function102b68: ; 102b68 +Unreferenced_Function102b68: xor a ld hl, wWindowStackPointer ld bc, $10 call ByteFill ret -; 102b73 Unknown_102b73: db 9, 6 @@ -6519,7 +6155,7 @@ Unknown_102b73: dn 1, 0 db D_UP | D_DOWN | A_BUTTON -Function102b7b: ; 102b7b +Function102b7b: xor a ld [wMonType], a ld a, [wMenuCursorY] @@ -6531,7 +6167,6 @@ Function102b7b: ; 102b7b ld a, [wPartyCount] ld [w2DMenuNumRows], a ret -; 102b94 Unknown_102b94: db 1, 6 @@ -6540,7 +6175,7 @@ Unknown_102b94: dn 1, 0 db D_UP | D_DOWN | A_BUTTON -Function102b9c: ; 102b9c +Function102b9c: ld a, [wcd4d] dec a hlcoord 6, 9 @@ -6548,9 +6183,8 @@ Function102b9c: ; 102b9c call AddNTimes ld [hl], $ec ret -; 102bac -Function102bac: ; 102bac +Function102bac: ld a, [wMenuCursorY] dec a ld [wCurPartyMon], a @@ -6568,9 +6202,8 @@ Function102bac: ; 102bac call Function102dec call Function102db7 ret -; 102bdc -Function102bdc: ; 102bdc +Function102bdc: ld a, [wcd4d] dec a ld hl, wOTPartyMon1Species @@ -6600,49 +6233,43 @@ Function102bdc: ; 102bdc .asm_102c05 scf ret -; 102c07 -Function102c07: ; 102c07 +Function102c07: call Function102c14 call Function102c3b call Function102c21 call Function102c2e ret -; 102c14 -Function102c14: ; 102c14 +Function102c14: ld hl, wPartySpecies ld de, wOTPartySpecies ld bc, 1 call Function102c71 ret -; 102c21 -Function102c21: ; 102c21 +Function102c21: ld hl, wPartyMonNicknames ld de, wOTPartyMonNicknames ld bc, 11 call Function102c71 ret -; 102c2e -Function102c2e: ; 102c2e +Function102c2e: ld hl, wPartyMonOT ld de, wOTPartyMonOT ld bc, 11 call Function102c71 ret -; 102c3b -Function102c3b: ; 102c3b +Function102c3b: ld hl, wPartyMon1 ld de, wOTPartyMon1 ld bc, $30 call Function102c71 ret -; 102c48 -Function102c48: ; 102c48 +Function102c48: farcall Function10165a ld a, 0 call GetSRAMBank @@ -6657,9 +6284,8 @@ Function102c48: ; 102c48 ld a, $05 call FarCopyWRAM ret -; 102c71 -Function102c71: ; 102c71 +Function102c71: ld a, [wcd4c] dec a call AddNTimes @@ -6672,9 +6298,8 @@ Function102c71: ; 102c71 pop de call SwapBytes ret -; 102c87 -Function102c87: ; 102c87 +Function102c87: ld a, [wJumptableIndex] push af ld a, [wcf64] @@ -6714,9 +6339,8 @@ Function102c87: ; 102c87 pop af ld [wJumptableIndex], a ret -; 102cee -Function102cee: ; 102cee +Function102cee: ld a, [wJumptableIndex] dec a call Function102d34 @@ -6750,23 +6374,20 @@ Function102cee: ; 102cee ld bc, $2f call CopyBytes ret -; 102d34 -Function102d34: ; 102d34 +Function102d34: ld hl, wc608 ld bc, $2f call AddNTimes ret -; 102d3e -Function102d3e: ; 102d3e +Function102d3e: call GetSRAMBank call CopyBytes call CloseSRAM ret -; 102d48 -Function102d48: ; 102d48 +Function102d48: ld a, [wcd4c] ld e, a ld d, 0 @@ -6805,9 +6426,8 @@ Function102d48: ; 102d48 .asm_102d98 and a ret -; 102d9a -Function102d9a: ; 102d9a +Function102d9a: ld a, " " hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT @@ -6818,17 +6438,15 @@ Function102d9a: ; 102d9a call ByteFill farcall HDMATransferAttrMapAndTileMapToWRAMBank3 ret -; 102db7 -Function102db7: ; 102db7 +Function102db7: call Function102e4f call Function102e3e ld hl, wcd4b set 1, [hl] ret -; 102dc3 -Function102dc3: ; 102dc3 +Function102dc3: hlcoord 0, 12 ld b, 4 ld c, 18 @@ -6836,9 +6454,8 @@ Function102dc3: ; 102dc3 ld e, l farcall _LinkTextbox ret -; 102dd3 -Function102dd3: ; 102dd3 +Function102dd3: call DisableLCD ld de, GFX_1032a2 ld hl, vTiles0 @@ -6847,9 +6464,8 @@ Function102dd3: ; 102dd3 farcall __LoadTradeScreenBorder call EnableLCD ret -; 102dec -Function102dec: ; 102dec +Function102dec: ld hl, Palettes_1032e2 ld de, wOBPals1 ld bc, 4 palettes @@ -6859,9 +6475,8 @@ Function102dec: ; 102dec call SetPalettes call DelayFrame ret -; 102e07 -Function102e07: ; 102e07 +Function102e07: hlcoord 3, 10 ld b, 1 ld c, 11 @@ -6885,24 +6500,20 @@ Function102e07: ; 102e07 hlcoord 4, 11 call PlaceString ret -; 102e32 -.waiting ; 102e32 +.waiting db "Waiting...!@" -; 102e3e -Function102e3e: ; 102e3e +Function102e3e: ld de, .CANCEL hlcoord 10, 17 call PlaceString ret -; 102e48 -.CANCEL: ; 102e48 +.CANCEL: db "CANCEL@" -; 102e4f -Function102e4f: ; 102e4f +Function102e4f: farcall Function16d42e farcall _InitMG_Mobile_LinkTradePalMap ld de, wPlayerName @@ -6922,9 +6533,8 @@ Function102e4f: ; 102e4f ld de, wOTPartySpecies call .PlaceSpeciesNames ret -; 102e86 -.PlaceSpeciesNames: ; 102e86 +.PlaceSpeciesNames: ld c, 0 .count_loop ld a, [de] @@ -6948,9 +6558,8 @@ Function102e4f: ; 102e4f pop bc inc c jr .count_loop -; 102ea8 -Function102ea8: ; 102ea8 +Function102ea8: call Function102dc3 ld a, [wcd4c] dec a @@ -6977,75 +6586,64 @@ Function102ea8: ; 102ea8 ld hl, UnknownText_0x102ee2 call PrintTextBoxText ret -; 102ee2 -UnknownText_0x102ee2: ; 102ee2 +UnknownText_0x102ee2: text_jump UnknownText_0x1bd286 db "@" -Function102ee7: ; 102ee7 +Function102ee7: call Function102dc3 ld de, String_102ef4 hlcoord 1, 14 call PlaceString ret -; 102ef4 -String_102ef4: ; 102ef4 +String_102ef4: db "Too bad! The trade" next "was canceled!" db "@" -; 102f15 -Function102f15: ; 102f15 +Function102f15: call Function102dc3 ld de, .TooBadTheTradeWasCanceled hlcoord 1, 14 call PlaceString ret -; 102f22 -.TooBadTheTradeWasCanceled: ; 102f22 +.TooBadTheTradeWasCanceled: db "こうかんを キャンセルしました@" -; 102f32 -Function102f32: ; 102f32 +Function102f32: call Function102dc3 ld de, .TradeCompleted hlcoord 1, 14 call PlaceString ret -; 102f3f -.TradeCompleted: ; 102f3f +.TradeCompleted: db "Trade completed!@" -; 102f50 -Function102f50: ; 102f50 +Function102f50: call Function102dc3 ld de, .PleaseWait hlcoord 1, 14 call PlaceString ret -; 102f5d -.PleaseWait: ; 102f5d +.PleaseWait: db "しょうしょう おまち ください@" -; 102f6d -Function102f6d: ; 102f6d +Function102f6d: call Function102dc3 ld de, .Finished hlcoord 1, 14 call PlaceString ret -; 102f7a -.Finished: ; 102f7a +.Finished: db "しゅうりょう します@" -; 102f85 -Function102f85: ; 102f85 +Function102f85: ld a, [wd003] ld c, a ld b, 0 @@ -7064,70 +6662,60 @@ Function102f85: ; 102f85 ld de, String_102fcc call PlaceString ret -; 102fb2 -String_102fb2: ; 102fb2 +String_102fb2: db "あいてがわえらんだ " next "いじょうあるようです!!" db "@" -; 102fcc -String_102fcc: ; 102fcc +String_102fcc: db "に@" -; 102fce -Function102fce: ; 102fce +Function102fce: call Function102dc3 ld de, String_102fdb hlcoord 1, 14 call PlaceString ret -; 102fdb -String_102fdb: ; 102fdb +String_102fdb: db "あいてがわせんたくに" next "いじょうあるようです!!" done -; 102ff5 -Function102ff5: ; 102ff5 +Function102ff5: call Function102dc3 ld de, String_103002 hlcoord 1, 14 call PlaceString ret -; 103002 -String_103002: ; 103002 +String_103002: db "その#を こうかんすると" next "せんとう できなく なっちゃうよ!" db "@" -; 103021 -Function103021: ; 103021 +Function103021: call Function102dc3 ld de, String_10302e hlcoord 1, 14 call PlaceString ret -; 10302e -String_10302e: ; 10302e +String_10302e: db "あいてが ちゅうしを えらんだので" next "こうかんを ちゅうし します" db "@" -; 10304f -Function10304f: ; 10304f +Function10304f: xor a ld [wAttrMapEnd], a ld [wcf42], a ld [wcf44], a ld [wcf45], a ret -; 10305d -Function10305d: ; 10305d +Function10305d: nop ld a, [wAttrMapEnd] and a @@ -7137,9 +6725,8 @@ Function10305d: ; 10305d call Function103094 call Function10306e ret -; 10306e -Function10306e: ; 10306e +Function10306e: ld a, $01 ld [hOAMUpdate], a call ClearSprites @@ -7148,9 +6735,8 @@ Function10306e: ; 10306e xor a ld [hOAMUpdate], a ret -; 10307f -Function10307f: ; 10307f +Function10307f: ld c, $02 ld hl, wcd4b bit 7, [hl] @@ -7166,9 +6752,8 @@ Function10307f: ; 10307f xor a ld [hl], a ret -; 103094 -Function103094: ; 103094 +Function103094: ld hl, wcd4b bit 7, [hl] jr nz, .asm_1030c0 @@ -7205,9 +6790,8 @@ Function103094: ; 103094 .asm_1030ca ld [hl], $2c ret -; 1030cd -Function1030cd: ; 1030cd +Function1030cd: ld a, [wcf44] ld l, a ld h, 0 @@ -7264,9 +6848,8 @@ Function1030cd: ; 1030cd dec c jr nz, .asm_1030de ret -; 103112 -Unknown_103112: ; 103112 +Unknown_103112: db $00, $00, $00, $00, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00 @@ -7312,9 +6895,8 @@ Unknown_103112: ; 103112 db $00, $00, $00, $00, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00 db $00, $00, $00, $00, $00, $00, $00, $00 -; 10327a -Unknown_10327a: ; 10327a +Unknown_10327a: db $00, $00, $00, $00 db $00, $00, $01, $00 db $00, $00, $02, $00 @@ -7350,15 +6932,13 @@ Palettes_1032e2: RGB 0, 0, 0 RGB 0, 0, 0 -; 103302 -Function103302: ; 103302 +Function103302: call Function103309 call Function103362 ret -; 103309 -Function103309: ; 103309 +Function103309: xor a ld [hBGMapMode], a ld hl, wBuffer1 @@ -7402,9 +6982,8 @@ Function103309: ; 103309 ld [wd1f0], a call Function10339a ret -; 103362 -Function103362: ; 103362 +Function103362: .asm_103362 ld a, [wd1f0] ld [wd1f1], a @@ -7430,9 +7009,8 @@ Function103362: ; 103362 .asm_103398 scf ret -; 10339a -Function10339a: ; 10339a +Function10339a: ld a, [wd1f0] ld [wd1f2], a ld c, a @@ -7445,9 +7023,8 @@ Function10339a: ; 10339a ld a, [hl] ld [wd1f3], a ret -; 1033af -Function1033af: ; 1033af +Function1033af: call GetJoypad ld a, [hJoyPressed] bit D_LEFT_F, a @@ -7518,18 +7095,16 @@ Function1033af: ; 1033af xor e ld [wBuffer1], a ret -; 10342c -Function10342c: ; 10342c +Function10342c: ld a, [wd1f0] ld [wd1f2], a call Function103490 call Function10343c call Function1034a7 ret -; 10343c -Function10343c: ; 10343c +Function10343c: ld a, [wd1f3] cp $02 jr nz, .asm_103452 @@ -7565,17 +7140,15 @@ Function10343c: ; 10343c ld bc, 11 call Function103487 ret -; 103487 -Function103487: ; 103487 +Function103487: push de call Function1034f7 pop de call PlaceString ret -; 103490 -Function103490: ; 103490 +Function103490: hlcoord 0, 15 ld c, $14 ld b, $03 @@ -7585,9 +7158,8 @@ Function103490: ; 103490 hlcoord 1, 16 call PlaceString ret -; 1034a7 -Function1034a7: ; 1034a7 +Function1034a7: ld a, [wd1f1] ld [wd1f2], a ld bc, 10 @@ -7597,9 +7169,8 @@ Function1034a7: ; 1034a7 call Function1034f1 ld [hl], $ed ret -; 1034be -Function1034be: ; 1034be +Function1034be: ld a, $01 ld [wd1f2], a ld hl, wd1ec @@ -7621,9 +7192,8 @@ Function1034be: ; 1034be jr nz, .asm_1034ca call Function103490 ret -; 1034e0 -Function1034e0: ; 1034e0 +Function1034e0: push bc push hl call ClearBox @@ -7634,13 +7204,12 @@ Function1034e0: ; 1034e0 ld a, $06 call FillBoxWithByte ret -; 1034f1 -Function1034f1: ; 1034f1 +Function1034f1: ld a, [wd1f0] ld [wd1f2], a -Function1034f7: ; 10134f7 +Function1034f7: hlcoord 0, 0 add hl, bc ld a, [wd1ef] @@ -7651,9 +7220,8 @@ Function1034f7: ; 10134f7 ld bc, 40 call AddNTimes ret -; 10350f -Function10350f: ; 10350f +Function10350f: ld a, [wd1f3] push bc ld hl, Unknown_103522 @@ -7665,9 +7233,8 @@ Function10350f: ; 10350f ld d, [hl] ld e, a ret -; 103522 -Unknown_103522: ; 103522 +Unknown_103522: dw String_103546 dw String_103598 dw String_1035a0 @@ -7702,9 +7269,8 @@ String_1035b1: db "すうじで いれる@" String_1035ba: db "する@" String_1035bd: db "しない@" String_1035c1: db "けってい@" -; 1035c6 -Function1035c6: ; 1035c6 +Function1035c6: farcall Function10138b ld b, 0 ld hl, Unknown_1035d7 @@ -7714,9 +7280,8 @@ Function1035c6: ; 1035c6 ld h, [hl] ld l, a ret -; 1035d7 -Unknown_1035d7: ; 1035d7 +Unknown_1035d7: dw Unknown_1035e7 dw Unknown_1035f3 dw Unknown_103608 @@ -7726,36 +7291,35 @@ Unknown_1035d7: ; 1035d7 dw AskMobileOrCable dw AskMobileOrCable -Unknown_1035e7: ; 1035e7 +Unknown_1035e7: dwcoord 0, 6 db $12, $07, $07 dw .this .this db 4, 2, 1, 0, 3 -Unknown_1035f3: ; 1035f3 +Unknown_1035f3: dwcoord 0, 7 db $12, $06, $09 dw .this .this db 3, 2, 1, 3 -Unknown_1035fe: ; 1035fe +Unknown_1035fe: dwcoord 0, 9 db $12, $04, $0b dw .this .this db 2, 0, 3 -Unknown_103608: ; 103608 +Unknown_103608: dwcoord 0, 9 db $12, $04, $0b dw .this .this db 2, 2, 3 -; 103612 -AskMobileOrCable: ; 103612 +AskMobileOrCable: ld hl, MenuHeader_103640 call LoadMenuHeader ld a, [wMobileOrCable_LastSelection] @@ -7780,22 +7344,20 @@ AskMobileOrCable: ; 103612 xor a ld [wScriptVar], a ret -; 103640 -MenuHeader_103640: ; 103640 +MenuHeader_103640: db MENU_BACKUP_TILES ; flags menu_coords 13, 6, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw MenuData_103648 db 1 ; default option -MenuData_103648: ; 103648 +MenuData_103648: db STATICMENU_CURSOR ; flags db 2 db "モバイル@" db "ケーブル@" -; 103654 -Function103654: ; 103654 +Function103654: farcall Mobile_AlwaysReturnNotCarry bit 7, c jr nz, .asm_103666 @@ -7809,9 +7371,8 @@ Function103654: ; 103654 set 5, [hl] ld c, $01 ret -; 10366e -Mobile_SelectThreeMons: ; 10366e +Mobile_SelectThreeMons: farcall Mobile_AlwaysReturnNotCarry bit 7, c jr z, .asm_10369b @@ -7883,15 +7444,13 @@ Mobile_SelectThreeMons: ; 10366e xor a ld [wScriptVar], a ret -; 1036f9 -Function1036f9: ; 1036f9 +Function1036f9: ld hl, UnknownText_0x103767 call PrintText ret -; 103700 -Function103700: ; 103700 +Function103700: ld c, $0a ld hl, wSwarmFlags bit SWARMFLAGS_MOBILE_4_F, [hl] @@ -7934,21 +7493,19 @@ Function103700: ; 103700 call JoyWaitAorB scf ret -; 103747 -MenuHeader_103747: ; 103747 +MenuHeader_103747: db MENU_BACKUP_TILES ; flags menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw MenuData_10374f db 1 ; default option -MenuData_10374f: ; 10374f +MenuData_10374f: db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags db 3 db "はい@" db "やめる@" db "せつめい@" -; 10375d UnknownText_0x10375d: ; 0x10375d text_jump UnknownText_0x1c422a @@ -7979,16 +7536,15 @@ UnknownText_0x10377b: ; 0x10377b db "@" ; 0x103780 -Function103780: ; 103780 +Function103780: ld a, [wd265] push af call Function10378c pop af ld [wd265], a ret -; 10378c -Function10378c: ; 10378c +Function10378c: ld c, 0 ld hl, wSwarmFlags bit SWARMFLAGS_MOBILE_4_F, [hl] @@ -8019,9 +7575,8 @@ Function10378c: ; 10378c ld hl, wSwarmFlags res SWARMFLAGS_MOBILE_4_F, [hl] ret -; 1037c2 -Function1037c2: ; 1037c2 +Function1037c2: call Function103823 jr c, .nope ld a, [wdc5f] @@ -8040,14 +7595,13 @@ Function1037c2: ; 1037c2 ld [wdc5f], a ld [wScriptVar], a ret -; 1037e6 UnknownText_0x1037e6: ; 0x1037e6 text_jump UnknownText_0x1c449c db "@" ; 0x1037eb -Function1037eb: ; 1037eb +Function1037eb: call Function103823 jr nc, .asm_103807 ld hl, UnknownText_0x103819 @@ -8072,7 +7626,6 @@ Function1037eb: ; 1037eb ld a, $02 ld [wScriptVar], a ret -; 103819 UnknownText_0x103819: ; 0x103819 text_jump UnknownText_0x1c44c0 @@ -8084,7 +7637,7 @@ UnknownText_0x10381e: ; 0x10381e db "@" ; 0x103823 -Function103823: ; 103823 +Function103823: farcall Mobile_AlwaysReturnNotCarry bit 7, c jr nz, .asm_103838 @@ -8100,9 +7653,8 @@ Function103823: ; 103823 .asm_10383a scf ret -; 10383c -Function10383c: ; 10383c +Function10383c: ld a, $01 ld [wdc60], a xor a @@ -8128,14 +7680,13 @@ Function10383c: ; 10383c ld a, $01 ld [wScriptVar], a ret -; 103876 UnknownText_0x103876: ; 0x103876 text_jump UnknownText_0x1c4508 db "@" ; 0x10387b -Function10387b: ; 10387b +Function10387b: farcall Mobile_AlwaysReturnNotCarry bit 7, c ret nz @@ -8146,7 +7697,6 @@ Function10387b: ; 10387b call PrintText call JoyWaitAorB ret -; 103898 UnknownText_0x103898: ; 0x103898 text_jump UnknownText_0x1c4525 diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm index 93c5a6f8817..a1f7f51e0c2 100644 --- a/mobile/mobile_41.asm +++ b/mobile/mobile_41.asm @@ -32,9 +32,8 @@ StubbedTrainerRankings_HallOfFame2:: ; 0x105ef6 call UpdateTrainerRankingsChecksum call CloseSRAM ret -; 105f33 -StubbedTrainerRankings_MagikarpLength: ; 105f33 +StubbedTrainerRankings_MagikarpLength: ret ld a, BANK(sTrainerRankingLongestMagikarp) call GetSRAMBank @@ -101,9 +100,8 @@ StubbedTrainerRankings_MagikarpLength: ; 105f33 call UpdateTrainerRankingsChecksum call CloseSRAM ret -; 105f79 -StubbedTrainerRankings_BugContestScore: ; 105f79 +StubbedTrainerRankings_BugContestScore: ret ld a, BANK(sTrainerRankingBugContestScore) call GetSRAMBank @@ -131,9 +129,8 @@ StubbedTrainerRankings_BugContestScore: ; 105f79 call UpdateTrainerRankingsChecksum call CloseSRAM ret -; 105f9f -StubbedTrainerRankings_AddToSlotsWinStreak: ; 105f9f +StubbedTrainerRankings_AddToSlotsWinStreak: ret ld a, BANK(sTrainerRankingCurrentSlotsStreak) call GetSRAMBank @@ -172,9 +169,8 @@ StubbedTrainerRankings_AddToSlotsWinStreak: ; 105f9f call UpdateTrainerRankingsChecksum call CloseSRAM ret -; 105fd0 -StubbedTrainerRankings_EndSlotsWinStreak: ; 105fd0 +StubbedTrainerRankings_EndSlotsWinStreak: ret ld a, BANK(sTrainerRankingCurrentSlotsStreak) call GetSRAMBank @@ -185,9 +181,8 @@ StubbedTrainerRankings_EndSlotsWinStreak: ; 105fd0 call UpdateTrainerRankingsChecksum call CloseSRAM ret -; 105fe3 -StubbedTrainerRankings_AddToSlotsPayouts: ; 105fe3 +StubbedTrainerRankings_AddToSlotsPayouts: ret ld a, BANK(sTrainerRankingTotalSlotsPayouts) call GetSRAMBank @@ -214,9 +209,8 @@ StubbedTrainerRankings_AddToSlotsPayouts: ; 105fe3 call UpdateTrainerRankingsChecksum call CloseSRAM ret -; 106008 -StubbedTrainerRankings_AddToBattlePayouts: ; 106008 +StubbedTrainerRankings_AddToBattlePayouts: ret ld a, BANK(sTrainerRankingTotalBattlePayouts) call GetSRAMBank @@ -245,14 +239,13 @@ StubbedTrainerRankings_AddToBattlePayouts: ; 106008 call UpdateTrainerRankingsChecksum call CloseSRAM ret -; 10602e -StubbedTrainerRankings_StepCount: ; 10602e (41:602e) +StubbedTrainerRankings_StepCount: ret ld hl, sTrainerRankingStepCount jp StubbedTrainerRankings_Increment4Byte -Unreferenced_StubbedTrainerRankings_BattleTowerWins: ; 106035 +Unreferenced_StubbedTrainerRankings_BattleTowerWins: ret ld a, $5 call GetSRAMBank @@ -263,12 +256,12 @@ Unreferenced_StubbedTrainerRankings_BattleTowerWins: ; 106035 ld hl, sTrainerRankingBattleTowerWins jp StubbedTrainerRankings_Increment2Byte -StubbedTrainerRankings_TMsHMsTaught: ; 106049 +StubbedTrainerRankings_TMsHMsTaught: ret ld hl, sTrainerRankingTMsHMsTaught jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Battles: ; 106050 +StubbedTrainerRankings_Battles: ret ld a, [wBattleType] cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle @@ -276,7 +269,7 @@ StubbedTrainerRankings_Battles: ; 106050 ld hl, sTrainerRankingBattles jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_WildBattles: ; 10605d +StubbedTrainerRankings_WildBattles: ret ld a, [wBattleType] cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle @@ -284,12 +277,12 @@ StubbedTrainerRankings_WildBattles: ; 10605d ld hl, sTrainerRankingWildBattles jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_TrainerBattles: ; 10606a +StubbedTrainerRankings_TrainerBattles: ret ld hl, sTrainerRankingTrainerBattles jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Unused1: ; 106071 +StubbedTrainerRankings_Unused1: ret ld hl, sTrainerRankingUnused1 jp StubbedTrainerRankings_Increment3Byte @@ -299,87 +292,87 @@ StubbedTrainerRankings_HallOfFame:: ; 0x106078 ld hl, sTrainerRankingHOFEntries jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_WildMonsCaught: ; 10607f (41:607f) +StubbedTrainerRankings_WildMonsCaught: ret ld hl, sTrainerRankingWildMonsCaught jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_HookedEncounters: ; 106086 +StubbedTrainerRankings_HookedEncounters: ret ld hl, sTrainerRankingHookedEncounters jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_EggsHatched: ; 10608d (41:608d) +StubbedTrainerRankings_EggsHatched: ret ld hl, sTrainerRankingEggsHatched jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_MonsEvolved: ; 106094 +StubbedTrainerRankings_MonsEvolved: ret ld hl, sTrainerRankingMonsEvolved jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_FruitPicked: ; 10609b +StubbedTrainerRankings_FruitPicked: ret ld hl, sTrainerRankingFruitPicked jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Healings: ; 1060a2 +StubbedTrainerRankings_Healings: ret ld hl, sTrainerRankingHealings jp StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_MysteryGift: ; 1060a9 (41:60a9) +StubbedTrainerRankings_MysteryGift: ret ld hl, sTrainerRankingMysteryGift jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Trades: ; 1060af +StubbedTrainerRankings_Trades: ret ld hl, sTrainerRankingTrades jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Fly: ; 1060b5 +StubbedTrainerRankings_Fly: ret ld hl, sTrainerRankingFly jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Surf: ; 1060bb +StubbedTrainerRankings_Surf: ret ld hl, sTrainerRankingSurf jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Waterfall: ; 1060c1 +StubbedTrainerRankings_Waterfall: ret ld hl, sTrainerRankingWaterfall jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_WhiteOuts: ; 1060c7 +StubbedTrainerRankings_WhiteOuts: ret ld hl, sTrainerRankingWhiteOuts jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_LuckyNumberShow: ; 1060cd +StubbedTrainerRankings_LuckyNumberShow: ret ld hl, sTrainerRankingLuckyNumberShow jr StubbedTrainerRankings_Increment2Byte -StubbedTrainerRankings_PhoneCalls: ; 1060d3 +StubbedTrainerRankings_PhoneCalls: ret ld hl, sTrainerRankingPhoneCalls jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Unused2: ; 1060df +StubbedTrainerRankings_Unused2: ret ld hl, sTrainerRankingUnused2 jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_LinkBattles: ; 1060df +StubbedTrainerRankings_LinkBattles: ret ld hl, sTrainerRankingLinkBattles jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Splash: ; 1060e5 +StubbedTrainerRankings_Splash: ret ; Only counts if it’s the player’s turn ld a, [hBattleTurn] @@ -388,12 +381,12 @@ StubbedTrainerRankings_Splash: ; 1060e5 ld hl, sTrainerRankingSplash jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_TreeEncounters: ; 1060ef +StubbedTrainerRankings_TreeEncounters: ret ld hl, sTrainerRankingTreeEncounters jr StubbedTrainerRankings_Increment3Byte -StubbedTrainerRankings_Unused3: ; 1060f5 +StubbedTrainerRankings_Unused3: ret ld hl, sTrainerRankingUnused3 jr StubbedTrainerRankings_Increment3Byte @@ -407,16 +400,14 @@ StubbedTrainerRankings_ColosseumLosses: ; lose ret ld hl, sTrainerRankingColosseumLosses jr StubbedTrainerRankings_Increment3Byte -; 106107 StubbedTrainerRankings_ColosseumDraws: ; draw ret ld hl, sTrainerRankingColosseumDraws jr StubbedTrainerRankings_Increment3Byte -; 10610d ; Counts uses of both Selfdestruct and Explosion. -StubbedTrainerRankings_Selfdestruct: ; 10610d +StubbedTrainerRankings_Selfdestruct: ret ; Only counts if it’s the player’s turn ld a, [hBattleTurn] @@ -424,33 +415,29 @@ StubbedTrainerRankings_Selfdestruct: ; 10610d ret nz ld hl, sTrainerRankingSelfdestruct jr StubbedTrainerRankings_Increment3Byte -; 106117 -StubbedTrainerRankings_Increment4Byte: ; 106117 +StubbedTrainerRankings_Increment4Byte: push bc ld bc, 3 jr StubbedTrainerRankings_Increment -; 10611d -StubbedTrainerRankings_Increment3Byte: ; 10611d +StubbedTrainerRankings_Increment3Byte: push bc ld bc, 2 jr StubbedTrainerRankings_Increment -; 106123 -StubbedTrainerRankings_Increment2Byte: ; 106123 +StubbedTrainerRankings_Increment2Byte: push bc ld bc, 1 jr StubbedTrainerRankings_Increment -; 106129 ; unused -StubbedTrainerRankings_Increment1Byte: ; 106129 +StubbedTrainerRankings_Increment1Byte: push bc ld bc, 0 ; Increments a big-endian value of bc + 1 bytes at hl -StubbedTrainerRankings_Increment: ; 10612d +StubbedTrainerRankings_Increment: ld a, BANK(sTrainerRankings) call GetSRAMBank push hl @@ -484,19 +471,17 @@ StubbedTrainerRankings_Increment: ; 10612d call CloseSRAM pop bc ret -; 106155 ; Used when SRAM bank 5 isn’t already loaded — what’s the point of this? -UpdateTrainerRankingsChecksum2: ; 106155 +UpdateTrainerRankingsChecksum2: ret ld a, BANK(sTrainerRankings) call GetSRAMBank call UpdateTrainerRankingsChecksum call CloseSRAM ret -; 106162 -UpdateTrainerRankingsChecksum: ; 106162 +UpdateTrainerRankingsChecksum: push de call CalculateTrainerRankingsChecksum ld hl, sTrainerRankingsChecksum @@ -505,9 +490,8 @@ UpdateTrainerRankingsChecksum: ; 106162 ld [hl], e pop de ret -; 10616e -CalculateTrainerRankingsChecksum: ; 10616e +CalculateTrainerRankingsChecksum: push bc ld hl, sTrainerRankings ld bc, sTrainerRankingsChecksum - sTrainerRankings @@ -528,10 +512,9 @@ CalculateTrainerRankingsChecksum: ; 10616e jr nz, .asm_106179 pop bc ret -; 106187 -BackupMobileEventIndex: ; 106187 +BackupMobileEventIndex: ld a, BANK(sMobileEventIndex) call GetSRAMBank ld a, [sMobileEventIndex] @@ -542,10 +525,9 @@ BackupMobileEventIndex: ; 106187 ld [sMobileEventIndexBackup], a call CloseSRAM ret -; 10619d -RestoreMobileEventIndex: ; 10619d (41:619d) +RestoreMobileEventIndex: ld a, BANK(sMobileEventIndexBackup) call GetSRAMBank ld a, [sMobileEventIndexBackup] @@ -556,9 +538,8 @@ RestoreMobileEventIndex: ; 10619d (41:619d) ld [sMobileEventIndex], a call CloseSRAM ret -; 1061b3 (41:61b3) -Unreferenced_VerifyTrainerRankingsChecksum: ; 1061b3 +Unreferenced_VerifyTrainerRankingsChecksum: call CalculateTrainerRankingsChecksum ld hl, sTrainerRankingsChecksum ld a, d @@ -568,16 +549,14 @@ Unreferenced_VerifyTrainerRankingsChecksum: ; 1061b3 ld a, e cp [hl] ret -; 1061c0 -DeleteMobileEventIndex: ; 1061c0 (41:61c0) +DeleteMobileEventIndex: ld a, BANK(sMobileEventIndex) call GetSRAMBank xor a ld [sMobileEventIndex], a call CloseSRAM ret -; 1061cd (41:61cd) ; Used in the Japanese version to initialize Trainer Rankings data ; for a new save file. Unreferenced in the English version. @@ -599,10 +578,9 @@ InitializeTrainerRankings: ld bc, sTrainerRankingsEnd - sTrainerRankings call CopyBytes ret -; 1061ef -_MobilePrintNum:: ; 1061ef +_MobilePrintNum:: ; Supports signed 31-bit integers (up to 10 digits) ; b: Bits 0-4 = # bytes ; Bit 7 = set if negative @@ -723,7 +701,6 @@ endr pop de pop bc ret -; 106292 ._9 dd 1000000000 ._8 dd 100000000 @@ -733,9 +710,8 @@ endr ._4 dd 10000 ._3 dd 1000 ._2 dd 100 -; 1062b2 -.Function1062b2: ; 1062b2 +.Function1062b2: ld c, $0 .asm_1062b4 ld a, [de] @@ -793,9 +769,8 @@ endr ld [hl], -10 ret -; 1062ff -.Function1062ff: ; 1062ff +.Function1062ff: ld a, [hPrintNum10] bit 7, a jr nz, .asm_10630d @@ -808,17 +783,15 @@ endr .asm_10630d inc hl ret -; 10630f ; functions related to the cable club and various NPC scripts referencing communications -Mobile_DummyReturnFalse: ; 10630f +Mobile_DummyReturnFalse: xor a ld [wScriptVar], a ret -; 106314 -Stubbed_Function106314: ; 106314 +Stubbed_Function106314: ret ld a, $4 call GetSRAMBank @@ -832,9 +805,8 @@ Stubbed_Function106314: ; 106314 ld [$a800], a call CloseSRAM ret -; 10632f -Mobile_AlwaysReturnNotCarry: ; 10632f +Mobile_AlwaysReturnNotCarry: or a ret @@ -872,9 +844,8 @@ Function106331: ; 106331 - called by Mobile_DummyReturnFalse in Crystal-J xor a ld c, a ret -; 10635c -Function10635c: ; 10635c +Function10635c: ld a, [wMobileCommsJumptableIndex] bit 7, a ret nz @@ -882,9 +853,8 @@ Function10635c: ; 10635c ld hl, .Jumptable rst JumpTable ret -; 10636a -.Jumptable: ; 10636a +.Jumptable: dw .init dw Function106392 dw Function1063cc @@ -894,9 +864,8 @@ Function10635c: ; 10635c dw Function106403 dw Function106442 dw Function106453 -; 10637c -.init: ; 10637c +.init: ld de, wcd30 ld hl, $41 ld bc, $41 @@ -906,9 +875,8 @@ Function10635c: ; 10635c inc a ld [wMobileCommsJumptableIndex], a ret -; 106392 -Function106392: ; 106392 +Function106392: xor a ld [wcf64], a ld a, [wc821] @@ -943,16 +911,15 @@ Function106392: ; 106392 inc a ld [wMobileCommsJumptableIndex], a ret -; 1063cc -Function1063cc: ; 1063cc +Function1063cc: ld a, $78 ld [wcd42], a ld a, [wMobileCommsJumptableIndex] inc a ld [wMobileCommsJumptableIndex], a -Function1063d8: ; 1063d8 +Function1063d8: ld hl, wcd42 dec [hl] ret nz @@ -960,9 +927,8 @@ Function1063d8: ; 1063d8 inc a ld [wMobileCommsJumptableIndex], a ret -; 1063e5 -Function1063e5: ; 1063e5 +Function1063e5: ld a, [wcf64] cp $3 ret nz @@ -970,9 +936,8 @@ Function1063e5: ; 1063e5 inc a ld [wMobileCommsJumptableIndex], a ret -; 1063f3 -Function1063f3: ; 1063f3 +Function1063f3: ld de, wcd31 ld a, $32 call Function3e32 @@ -980,9 +945,8 @@ Function1063f3: ; 1063f3 inc a ld [wMobileCommsJumptableIndex], a ret -; 106403 -Function106403: ; 106403 +Function106403: ld a, [wc821] bit 1, a jr nz, .asm_106426 @@ -1021,9 +985,8 @@ Function106403: ; 106403 inc a ld [wMobileCommsJumptableIndex], a ret -; 106442 -Function106442: ; 106442 +Function106442: ld a, $36 call Function3e32 xor a @@ -1033,7 +996,7 @@ Function106442: ; 106442 inc a ld [wMobileCommsJumptableIndex], a -Function106453: ; 106453 +Function106453: ld a, [wMobileCommsJumptableIndex] set 7, a ld [wMobileCommsJumptableIndex], a @@ -1041,14 +1004,12 @@ Function106453: ; 106453 ld a, $4 ld [wcf64], a ret -; 106462 Stubbed_Function106462: ret ret -; 106464 -Function106464:: ; 106464 +Function106464:: ld de, FontsExtra_SolidBlackGFX ld hl, vTiles2 tile "■" ; $60 lb bc, BANK(FontsExtra_SolidBlackGFX), 1 @@ -1068,9 +1029,8 @@ Function106464:: ; 106464 call Get2bpp farcall LoadFrame ret -; 10649b -Function10649b: ; 10649b +Function10649b: ld a, [wTextBoxFrame] maskbits NUM_FRAMES ld bc, 6 * LEN_1BPP_TILE @@ -1088,9 +1048,8 @@ Function10649b: ; 10649b ld b, BANK(TextBoxSpaceGFX) call Function1064c3 ret -; 1064c3 -Function1064c3: ; 1064c3 +Function1064c3: ld a, [rSVBK] push af ld a, $6 @@ -1106,7 +1065,7 @@ Function1064c3: ; 1064c3 ld [rSVBK], a jr asm_1064ed -Function1064d8: ; 1064d8 +Function1064d8: ld a, [rSVBK] push af ld a, $6 @@ -1139,14 +1098,12 @@ asm_1064ed pop af ld [rSVBK], a ret -; 10650a -Function10650a: ; 10650a +Function10650a: ld de, MobilePhoneTilesGFX lb bc, BANK(MobilePhoneTilesGFX), 17 call Get2bpp ret -; 106514 GFX_106514: INCBIN "gfx/unknown/106514.2bpp" diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm index 566b00755d9..60e59b5eb3d 100644 --- a/mobile/mobile_42.asm +++ b/mobile/mobile_42.asm @@ -1,9 +1,8 @@ -MobileTradeAnimation_SendGivemonToGTS: ; 108000 +MobileTradeAnimation_SendGivemonToGTS: ld a, $80 ld [wcf65], a ld de, .TradeAnimScript jp RunMobileTradeAnim_NoFrontpics -; 10800b .TradeAnimScript: mobiletradeanim_showgtsgivemon @@ -18,13 +17,12 @@ MobileTradeAnimation_RetrieveGivemonFromGTS: ld a, $80 jr asm_108018 -MobileTradeAnimation_ReceiveGetmonFromGTS: ; 108016 +MobileTradeAnimation_ReceiveGetmonFromGTS: ld a, $0 asm_108018: ld [wcf65], a ld de, .TradeAnimScript jp RunMobileTradeAnim_NoFrontpics -; 108021 .TradeAnimScript: mobiletradeanim_11 @@ -33,18 +31,17 @@ asm_108018: mobiletradeanim_showgtsgetmon mobiletradeanim_end -Function108026: ; 108026 +Function108026: ld a, $0 jr asm_10802c -Function10802a: ; 10802a +Function10802a: ld a, $1 asm_10802c: ld [wcf65], a ld de, .TradeAnimScript jp RunMobileTradeAnim_Frontpics -; 108035 .TradeAnimScript: ; trade mobiletradeanim_showgivemon @@ -56,12 +53,11 @@ asm_10802c: mobiletradeanim_showgetmon mobiletradeanim_end -Function10803d: ; 10803d +Function10803d: ld a, $0 ld [wcf65], a ld de, .TradeAnimScript jp RunMobileTradeAnim_NoFrontpics -; 108048 .TradeAnimScript: mobiletradeanim_11 @@ -70,19 +66,18 @@ Function10803d: ; 10803d mobiletradeanim_showoddegg mobiletradeanim_end -Function10804d: ; 10804d +Function10804d: ld a, $0 ld [wcf65], a ld de, .TradeAnimScript jp RunMobileTradeAnim_NoFrontpics -; 108058 .TradeAnimScript: mobiletradeanim_11 mobiletradeanim_showgtsgetmon mobiletradeanim_end -RunMobileTradeAnim_Frontpics: ; 10805b +RunMobileTradeAnim_Frontpics: ld hl, wTradeAnimAddress ld [hl], e inc hl @@ -110,9 +105,8 @@ RunMobileTradeAnim_Frontpics: ; 10805b pop af ld [hMapAnims], a ret -; 108089 -RunMobileTradeAnim_NoFrontpics: ; 108089 +RunMobileTradeAnim_NoFrontpics: ld hl, wTradeAnimAddress ld [hl], e inc hl @@ -140,9 +134,8 @@ RunMobileTradeAnim_NoFrontpics: ; 108089 pop af ld [hMapAnims], a ret -; 1080b7 -Function1080b7: ; 1080b7 +Function1080b7: xor a ld [wJumptableIndex], a call ClearBGPalettes @@ -216,9 +209,8 @@ Function1080b7: ; 1080b7 call Function108b98 call Function108af4 ret -; 108157 -Function108157: ; 108157 +Function108157: xor a ld [wJumptableIndex], a call ClearBGPalettes @@ -253,9 +245,8 @@ Function108157: ; 108157 call Function108b98 call Function108af4 ret -; 1081ad -MobileTradeAnim_ClearTiles: ; 1081ad +MobileTradeAnim_ClearTiles: ld a, $1 ld [rVBK], a ld hl, vTiles0 @@ -269,9 +260,8 @@ MobileTradeAnim_ClearTiles: ; 1081ad xor a call ByteFill ret -; 1081ca -MobileTradeAnim_ClearBGMap: ; 1081ca +MobileTradeAnim_ClearBGMap: ld a, $1 ld [rVBK], a hlbgcoord 0, 0 @@ -285,9 +275,8 @@ MobileTradeAnim_ClearBGMap: ; 1081ca ld a, $7f call ByteFill ret -; 1081e9 -MobileTradeAnim_GetFrontpic: ; 1081e9 +MobileTradeAnim_GetFrontpic: push de push af predef GetUnownLetter @@ -298,9 +287,8 @@ MobileTradeAnim_GetFrontpic: ; 1081e9 pop de predef GetMonFrontpic ret -; 108201 -Function108201: ; 108201 +Function108201: push de push af predef GetUnownLetter @@ -311,27 +299,24 @@ Function108201: ; 108201 pop de predef GetAnimatedFrontpic ret -; 108219 -Function108219: ; 108219 +Function108219: ld [wCurPartySpecies], a hlcoord 7, 2 ld d, $0 ld e, ANIM_MON_TRADE predef AnimateFrontpic ret -; 108229 -Function108229: ; 108229 +Function108229: ld [wCurPartySpecies], a hlcoord 7, 2 ld d, $0 ld e, ANIM_MON_TRADE predef LoadMonAnimation ret -; 108239 -MobileTradeAnim_InitSpeciesName: ; 108239 +MobileTradeAnim_InitSpeciesName: push de ld [wd265], a call GetPokemonName @@ -340,9 +325,8 @@ MobileTradeAnim_InitSpeciesName: ; 108239 ld bc, MON_NAME_LENGTH call CopyBytes ret -; 10824b -MobileTradeAnim_JumptableLoop: ; 10824b +MobileTradeAnim_JumptableLoop: ld a, [wJumptableIndex] bit 7, a jr nz, .StopAnim @@ -365,9 +349,8 @@ MobileTradeAnim_JumptableLoop: ; 10824b farcall Function106464 scf ret -; 10827b -.ExecuteMobileTradeAnimCommand: ; 10827b +.ExecuteMobileTradeAnimCommand: ld a, [wJumptableIndex] ld e, a ld d, 0 @@ -378,9 +361,8 @@ MobileTradeAnim_JumptableLoop: ; 10824b ld h, [hl] ld l, a jp hl -; 10828a -.Jumptable: ; 10828a +.Jumptable: dw GetMobileTradeAnimByte ; 00 dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01 dw MobileTradeAnim_02 ; 02 @@ -401,15 +383,13 @@ MobileTradeAnim_JumptableLoop: ; 10824b dw MobileTradeAnim_11 ; 11 dw MobileTradeAnim_FadeToBlack ; 12 dw MobileTradeAnim_GetOddEgg ; 13 get odd egg -; 1082b2 -MobileTradeAnim_Next: ; 1082b2 +MobileTradeAnim_Next: ld hl, wJumptableIndex inc [hl] ret -; 1082b7 -GetMobileTradeAnimByte: ; 1082b7 +GetMobileTradeAnimByte: ld hl, wTradeAnimAddress ld e, [hl] inc hl @@ -421,15 +401,13 @@ GetMobileTradeAnimByte: ; 1082b7 dec hl ld [hl], e ret -; 1082c6 -EndMobileTradeAnim: ; 1082c6 +EndMobileTradeAnim: ld hl, wJumptableIndex set 7, [hl] ret -; 1082cc -WaitMobileTradeSpriteAnims: ; 1082cc +WaitMobileTradeSpriteAnims: .loop push bc farcall PlaySpriteAnimations @@ -438,27 +416,24 @@ WaitMobileTradeSpriteAnims: ; 1082cc dec c jr nz, .loop ret -; 1082db -Function1082db: ; 1082db +Function1082db: .loop farcall PlaySpriteAnimations farcall SetUpPokeAnim farcall HDMATransferTileMapToWRAMBank3 jr nc, .loop ret -; 1082f0 -Function1082f0: ; 1082f0 +Function1082f0: .loop call Function108b78 call DelayFrame dec c jr nz, .loop ret -; 1082fa -Function1082fa: ; 1082fa +Function1082fa: .loop call Function108b78 push hl @@ -470,9 +445,8 @@ Function1082fa: ; 1082fa dec c jr nz, .loop ret -; 10830e -MobileTradeAnim_ShowPlayerMonToBeSent: ; 10830e +MobileTradeAnim_ShowPlayerMonToBeSent: ld de, MUSIC_EVOLUTION call PlayMusic2 ld a, $80 @@ -537,9 +511,8 @@ MobileTradeAnim_ShowPlayerMonToBeSent: ; 10830e call WaitMobileTradeSpriteAnims call GetMobileTradeAnimByte ret -; 10839b -MobileTradeAnim_ShowOTMonFromTrade: ; 10839b +MobileTradeAnim_ShowOTMonFromTrade: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -595,9 +568,8 @@ MobileTradeAnim_ShowOTMonFromTrade: ; 10839b call Function108c16 call GetMobileTradeAnimByte ret -; 10842c -MobileTradeAnim_ShowPlayerMonForGTS: ; 10842c +MobileTradeAnim_ShowPlayerMonForGTS: ld de, MUSIC_EVOLUTION call PlayMusic2 ld a, $80 @@ -672,9 +644,8 @@ MobileTradeAnim_ShowPlayerMonForGTS: ; 10842c call WaitMobileTradeSpriteAnims call GetMobileTradeAnimByte ret -; 1084d7 -MobileTradeAnim_ShowOTMonFromGTS: ; 1084d7 +MobileTradeAnim_ShowOTMonFromGTS: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -741,9 +712,8 @@ MobileTradeAnim_ShowOTMonFromGTS: ; 1084d7 call Function108c40 call GetMobileTradeAnimByte ret -; 108589 -MobileTradeAnim_GetOddEgg: ; 108589 +MobileTradeAnim_GetOddEgg: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -809,9 +779,8 @@ MobileTradeAnim_GetOddEgg: ; 108589 call Function1082db call GetMobileTradeAnimByte ret -; 108638 -MobileTradeAnim_02: ; 108638 +MobileTradeAnim_02: farcall DeinitializeAllSprites call ClearBGPalettes call ClearSprites @@ -845,9 +814,8 @@ MobileTradeAnim_02: ; 108638 call Function108af4 call GetMobileTradeAnimByte ret -; 108689 -MobileTradeAnim_10: ; 108689 +MobileTradeAnim_10: farcall DeinitializeAllSprites call ClearBGPalettes call ClearSprites @@ -891,9 +859,8 @@ MobileTradeAnim_10: ; 108689 call Function108af4 call GetMobileTradeAnimByte ret -; 1086f4 -MobileTradeAnim_11: ; 1086f4 +MobileTradeAnim_11: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -940,9 +907,8 @@ MobileTradeAnim_11: ; 1086f4 call PlayMusic2 call GetMobileTradeAnimByte ret -; 108763 -MobileTradeAnim_GiveTrademon1: ; 108763 +MobileTradeAnim_GiveTrademon1: ld de, SFX_GIVE_TRADEMON call PlaySFX ld c, 40 @@ -1006,9 +972,8 @@ MobileTradeAnim_GiveTrademon1: ; 108763 .done call MobileTradeAnim_Next ret -; 1087cf -MobileTradeAnim_GiveTrademon2: ; 1087cf +MobileTradeAnim_GiveTrademon2: ld c, 40 ld hl, wBGPals2 + 1 palettes call Function1082f0 @@ -1039,9 +1004,8 @@ MobileTradeAnim_GiveTrademon2: ; 1087cf .done call GetMobileTradeAnimByte ret -; 108811 -MobileTradeAnim_05: ; 108811 +MobileTradeAnim_05: ld c, 40 call WaitMobileTradeSpriteAnims ld a, $1 @@ -1057,9 +1021,8 @@ MobileTradeAnim_05: ; 108811 ld de, SFX_THROW_BALL call PlaySFX ret -; 108838 -MobileTradeAnim_06: ; 108838 +MobileTradeAnim_06: ld c, 40 call WaitMobileTradeSpriteAnims ld a, $1 @@ -1068,9 +1031,8 @@ MobileTradeAnim_06: ; 108838 call PlaySFX call GetMobileTradeAnimByte ret -; 10884c -MobileTradeAnim_07: ; 10884c +MobileTradeAnim_07: ld c, 80 call DelayFrames depixel 30, 10, 2, 0 @@ -1080,9 +1042,8 @@ MobileTradeAnim_07: ; 10884c ld de, SFX_THROW_BALL call PlaySFX ret -; 108863 -MobileTradeAnim_GetTrademon1: ; 108863 +MobileTradeAnim_GetTrademon1: ld c, 40 call WaitMobileTradeSpriteAnims .loop @@ -1105,9 +1066,8 @@ MobileTradeAnim_GetTrademon1: ; 108863 call Function108af4 call MobileTradeAnim_Next ret -; 108894 -MobileTradeAnim_GetTrademon2: ; 108894 +MobileTradeAnim_GetTrademon2: ld c, 20 ld hl, wBGPals2 + 1 palettes call Function1082fa @@ -1174,18 +1134,16 @@ MobileTradeAnim_GetTrademon2: ; 108894 .asm_108906 call MobileTradeAnim_Next ret -; 10890a -MobileTradeAnim_GetTrademon3: ; 10890a +MobileTradeAnim_GetTrademon3: ld c, 40 ld hl, wBGPals2 palette 6 call Function1082f0 call Function108af4 call GetMobileTradeAnimByte ret -; 108919 -MobileTradeAnim_0f: ; 108919 +MobileTradeAnim_0f: ld c, 40 call WaitMobileTradeSpriteAnims farcall DeinitializeAllSprites @@ -1198,9 +1156,8 @@ MobileTradeAnim_0f: ; 108919 call EnableLCD call GetMobileTradeAnimByte ret -; 10893d -MobileTradeAnim_FadeToBlack: ; 10893d +MobileTradeAnim_FadeToBlack: .loop ld a, [rBGP] and a @@ -1219,9 +1176,8 @@ MobileTradeAnim_FadeToBlack: ; 10893d call DmgToCgbObjPal0 call GetMobileTradeAnimByte ret -; 10895e -Function10895e: ; 10895e +Function10895e: ld de, vTiles0 tile $30 jr asm_108966 @@ -1241,9 +1197,8 @@ asm_108966 predef PlaceGraphic call WaitBGMap ret -; 10898a -Function10898a: ; 10898a +Function10898a: ld de, vTiles2 call MobileTradeAnim_GetFrontpic call WaitTop @@ -1255,9 +1210,8 @@ Function10898a: ; 10898a predef PlaceGraphic call WaitBGMap ret -; 1089a8 -MobileTradeAnim_DisplayMonToBeSent: ; 1089a8 +MobileTradeAnim_DisplayMonToBeSent: ld de, wPlayerTrademonSpecies ld a, [de] cp EGG @@ -1307,16 +1261,14 @@ MobileTradeAnim_DisplayEggData: call PlaceString call MobileTradeAnim_MonDisplay_UpdateBGMap ret -; 108a1d -.EggTemplate: ; 108a1d +.EggTemplate: db "タマゴ" next "おや/?????" next "?????" db "@" -; 108a33 -Function108a33: ; 108a33 +Function108a33: call WaitTop call MobileTradeAnim_ClearTilemap ld a, HIGH(vBGMap1) @@ -1330,13 +1282,11 @@ Function108a33: ; 108a33 call PlaceString call MobileTradeAnim_MonDisplay_UpdateBGMap ret -; 108a54 -.OddEgg: ; 108a54 +.OddEgg: db "なぞのタマゴ@" -; 108a5b -MobileTradeAnim_LoadMonTemplate: ; 108a5b +MobileTradeAnim_LoadMonTemplate: call WaitTop call MobileTradeAnim_ClearTilemap ld a, HIGH(vBGMap1) @@ -1349,38 +1299,33 @@ MobileTradeAnim_LoadMonTemplate: ; 108a5b ld de, .MonTemplate call PlaceString ret -; 108a79 -.MonTemplate: ; 108a79 +.MonTemplate: db "─ №" next "" next "おや/" next "" db "@" -; 108a87 -MobileTradeAnim_MonDisplay_UpdateBGMap: ; 108a87 +MobileTradeAnim_MonDisplay_UpdateBGMap: call WaitBGMap call WaitTop ld a, HIGH(vBGMap0) ld [hBGMapAddress + 1], a ret -; 108a92 -MobileTradeAnim_MonDisplay_PrintSpeciesNumber: ; 108a92 +MobileTradeAnim_MonDisplay_PrintSpeciesNumber: hlcoord 9, 0 lb bc, PRINTNUM_LEADINGZEROS | 1, 3 call PrintNum ret -; 108a9c -MobileTradeAnim_MonDisplay_PrintSpeciesName: ; 108a9c +MobileTradeAnim_MonDisplay_PrintSpeciesName: hlcoord 5, 2 call PlaceString ret -; 108aa3 -MobileTradeAnim_MonDisplay_PrintOTNameAndGender: ; 108aa3 +MobileTradeAnim_MonDisplay_PrintOTNameAndGender: cp $3 jr c, .got_gender xor a @@ -1397,30 +1342,26 @@ MobileTradeAnim_MonDisplay_PrintOTNameAndGender: ; 108aa3 ld a, [hl] ld [bc], a ret -; 108abb -.GenderChars: ; 108abb +.GenderChars: db " " db "♂" db "♀" -; 108abe -MobileTradeAnim_MonDisplay_PrintIDNumber: ; 108abe +MobileTradeAnim_MonDisplay_PrintIDNumber: hlcoord 8, 6 lb bc, PRINTNUM_LEADINGZEROS | 2, 5 call PrintNum ret -; 108ac8 -MobileTradeAnim_ClearTilemap: ; 108ac8 +MobileTradeAnim_ClearTilemap: hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT ld a, " " call ByteFill ret -; 108ad4 -Function108ad4: ; 108ad4 +Function108ad4: and a jr z, .asm_108adc ld de, GFX_1092c7 @@ -1438,9 +1379,8 @@ Function108ad4: ; 108ad4 ld a, $0 ld [rVBK], a ret -; 108af4 -Function108af4: ; 108af4 +Function108af4: ld a, [rSVBK] push af ld a, $5 @@ -1477,9 +1417,8 @@ Function108af4: ; 108af4 call DmgToCgbBGPals call DelayFrame ret -; 108b45 -Function108b45: ; 108b45 +Function108b45: ld a, [rSVBK] push af ld a, $5 @@ -1493,9 +1432,8 @@ Function108b45: ; 108b45 pop af ld [rSVBK], a ret -; 108b5a -Function108b5a: ; 108b5a +Function108b5a: ld a, [rSVBK] push af ld a, $5 @@ -1515,9 +1453,8 @@ Function108b5a: ; 108b5a ld a, $1 ld [hCGBPalUpdate], a ret -; 108b78 -Function108b78: ; 108b78 +Function108b78: ld a, [rSVBK] push af ld a, $5 @@ -1540,12 +1477,11 @@ Function108b78: ; 108b78 ld a, $1 ld [hCGBPalUpdate], a ret -; 108b98 Palette_108b98: ; removed -Function108b98: ; 108b98 +Function108b98: ld d, a ld a, [rSVBK] push af @@ -1567,15 +1503,13 @@ Function108b98: ; 108b98 pop af ld [rSVBK], a ret -; 108bbd -MobileTradeAnim_DeleteSprites: ; 108bbd +MobileTradeAnim_DeleteSprites: farcall DeinitializeAllSprites call ClearSprites ret -; 108bc7 -Function108bc7: ; 108bc7 (42:4bc7) +Function108bc7: ld a, [wcf64] and a ret z @@ -1592,7 +1526,7 @@ Function108bc7: ; 108bc7 (42:4bc7) farcall DeinitializeSprite ret -Function108be0: ; 108be0 (42:4be0) +Function108be0: ld hl, SPRITEANIMSTRUCT_YCOORD add hl, bc ld a, [hl] @@ -1601,9 +1535,8 @@ Function108be0: ; 108be0 (42:4be0) add 1 * 8 ld [hl], a ret -; 108bec (42:4bec) -Function108bec: ; 108bec +Function108bec: ld a, $90 ld [hWY], a ld hl, .PlayerWillTradeMon @@ -1615,7 +1548,6 @@ Function108bec: ; 108bec ld c, 80 call DelayFrames ret -; 108c07 .PlayerWillTradeMon: ; 0x108c07 text_jump UnknownText_0x1bc787 @@ -1632,7 +1564,7 @@ Function108bec: ; 108bec db "@" ; 0x108c16 -Function108c16: ; 108c16 +Function108c16: ld a, $90 ld [hWY], a ld hl, .TakeGoodCareOfMon @@ -1640,14 +1572,13 @@ Function108c16: ; 108c16 ld c, 80 call DelayFrames ret -; 108c26 .TakeGoodCareOfMon: ; 0x108c26 text_jump UnknownText_0x1bc7c3 db "@" ; 0x108c2b -Function108c2b: ; 108c2b +Function108c2b: ld a, $90 ld [hWY], a ld hl, .PlayersMonTrade @@ -1655,14 +1586,13 @@ Function108c2b: ; 108c2b ld c, 80 call DelayFrames ret -; 108c3b .PlayersMonTrade: ; 0x108c3b text_jump UnknownText_0x1bc7dd db "@" ; 0x108c40 -Function108c40: ; 108c40 +Function108c40: ld a, $90 ld [hWY], a ld a, [wcf65] @@ -1680,7 +1610,6 @@ Function108c40: ; 108c40 ld c, 80 call DelayFrames ret -; 108c63 .TakeGoodCareOf: ; 0x108c63 text_jump UnknownText_0x1bc7f0 @@ -1692,7 +1621,7 @@ Function108c40: ; 108c40 db "@" ; 0x108c6d -Function108c6d: ; 108c6d +Function108c6d: ld hl, LZ_108fe7 debgcoord 0, 0 call Decompress @@ -1700,9 +1629,8 @@ Function108c6d: ; 108c6d debgcoord 0, 0, vBGMap1 call Decompress ret -; 108c80 -Function108c80: ; 108c80 +Function108c80: ld a, $1 ld [rVBK], a ld hl, LZ_1090a7 @@ -1714,9 +1642,8 @@ Function108c80: ; 108c80 ld a, $0 ld [rVBK], a ret -; 108c9b -DebugMobileTrade: ; 108c9b +DebugMobileTrade: ; localization error: NAME_LENGTH (11) should be NAME_LENGTH_JAPANESE (6) here ld hl, .DebugTradeData @@ -1781,7 +1708,6 @@ DebugMobileTrade: ; 108c9b jr nz, .their_ot_loop ret -; 108ce9 .DebugTradeData: db VENUSAUR @@ -1792,9 +1718,8 @@ DebugMobileTrade: ; 108c9b db "クりーチャ@" dw $0456 db "マツミヤ@@" -; 108d07 -Function108d07: ; 108d07 +Function108d07: ld a, [wc74e] and $7f cp $8 @@ -1810,7 +1735,6 @@ Function108d07: ; 108d07 ld bc, 1 palettes call FarCopyWRAM ret -; 108d27 LZ_108d27: INCBIN "gfx/unknown/108d27.2bpp.lz" diff --git a/mobile/mobile_45.asm b/mobile/mobile_45.asm index 6bcced09e07..12eab3aa225 100644 --- a/mobile/mobile_45.asm +++ b/mobile/mobile_45.asm @@ -7,7 +7,7 @@ String_114000: String_114004: db "CGB-AAAA-00", 0, 0 -Unknown_114011: ; 114011 +Unknown_114011: dw String_114033 dw String_11403a dw String_114043 @@ -26,41 +26,40 @@ Unknown_114011: ; 114011 dw String_114160 dw String_114163 -String_114033: ; 114033 +String_114033: db "From: ", 0 -String_11403a: ; 11403a +String_11403a: db "Sender: ", 0 -String_114043: ; 114043 +String_114043: db "Reply-To: ", 0 -String_11404e: ; 11404e +String_11404e: db "To: ", 0 -String_114053: ; 114053 +String_114053: db "Cc: ", 0 -String_114058: ; 114058 +String_114058: db "Subject: ", 0 -String_114062: ; 114062 +String_114062: db "MIME-Version: 1.0", 0 -String_114074: ; 114074 +String_114074: db "X-Game-title: XXXXXXXXXX", 0 -String_11408d: ; 11408d +String_11408d: db "X-Game-code: CGB-", 0 -String_11409f: ; 11409f +String_11409f: db "X-GBmail-type: exclusive", 0 -String_1140b8: ; 1140b8 +String_1140b8: db "Content-Type: text/plain; charset=iso-2022-jp", 0 -String_1140e6: ; 1140e6 +String_1140e6: db "Content-Type: multipart/mixed; boundary=\"", 0 -String_114110: ; 114110 +String_114110: db "Content-Type: Application/Octet-Stream; name=\"", 0 -String_11413f: ; 11413f +String_11413f: db "Content-Transfer-Encoding:Base64", 0 -String_114160: ; 114160 +String_114160: db "--", 0 -String_114163: ; 114163 +String_114163: db ".", 0 -; 114165 -Jumptable_114165: ; 114165 +Jumptable_114165: dw Stubbed_Function114268 dw Function114269 dw Function11433c @@ -74,9 +73,8 @@ Jumptable_114165: ; 114165 dw Function1154d4 dw Function1156cc dw Function1159fb -; 11417f -Unknown_11417f: ; 11417f +Unknown_11417f: dw .From dw .Sender dw .ReplyTo @@ -91,45 +89,43 @@ Unknown_11417f: ; 11417f dw .XGameCode dw .XGBMailType -.From: ; 114199 +.From: db "FROM:", 0 -.Sender: ; 11419f +.Sender: db "SENDER:", 0 -.ReplyTo: ; 1141a7 +.ReplyTo: db "REPLY-TO:", 0 -.To: ; 1141b1 +.To: db "TO:", 0 -.CC: ; 1141b5 +.CC: db "CC:", 0 -.Subject: ; 1141b9 +.Subject: db "SUBJECT:", 0 -.Date: ; 1141c2 +.Date: db "DATE:", 0 -.ContentType: ; 1141c8 +.ContentType: db "CONTENT-TYPE:", 0 -.MimeVersion: ; 1141d6 +.MimeVersion: db "MIME-VERSION:", 0 -.XMailer: ; 1141e4 +.XMailer: db "X-MAILER:", 0 -.XGameTitle: ; 1141ee +.XGameTitle: db "X-GAME-TITLE:", 0 -.XGameCode: ; 1141fc +.XGameCode: db "X-GAME-CODE:", 0 -.XGBMailType: ; 114209 +.XGBMailType: db "X-GBMAIL-TYPE:", 0 -; 114218 -String_114218: ; 114218 +String_114218: db "NAME=", 0 -String_11421e: ; 11421e +String_11421e: db "MULTIPART", 0 -String_114228: ; 114228 +String_114228: db "BOUNDARY=", 0 -String_114232: ; 114232 +String_114232: db "=?ISO-2022-JP?B?", 0 -; 114243 -Function114243:: ; 114243 +Function114243:: ld a, SRAM_ENABLE ld [MBC3SRamEnable], a ld a, [hFF8C] @@ -147,9 +143,8 @@ Function114243:: ; 114243 pop de jp hl -; 11425c -Function11425c: ; 11425c +Function11425c: ld [$dc02], a pop af ld [hFF8C], a @@ -157,14 +152,12 @@ Function11425c: ; 11425c ld [MBC3SRamBank], a ret -; 114268 Stubbed_Function114268: ret -; 114269 -Function114269: ; 114269 +Function114269: ld h, d ld l, e xor a @@ -303,18 +296,16 @@ Function114269: ; 114269 ld [$dc02], a jp .asm_11429b -; 114333 -Function114333: ; 114333 +Function114333: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 11433c -Function11433c: ; 11433c +Function11433c: push de ld h, d ld l, e @@ -406,9 +397,8 @@ Function11433c: ; 11433c ld b, $1 jp Function11425c -; 1143b7 -Function1143b7: ; 1143b7 +Function1143b7: ld a, [de] ld b, a inc de @@ -458,9 +448,8 @@ Function1143b7: ; 1143b7 pop hl jp Function11425c -; 1143f3 -Function1143f3: ; 1143f3 +Function1143f3: call Function114412 and a jr nz, .asm_11440d @@ -487,9 +476,8 @@ Function1143f3: ; 1143f3 ld b, $84 ret -; 114412 -Function114412: ; 114412 +Function114412: ld a, c ld [$dc00], a ld [hFF8C], a @@ -618,18 +606,16 @@ Function114412: ; 114412 ld a, $1 ret -; 1144c8 -Function1144c8: ; 1144c8 +Function1144c8: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 1144d1 -Function1144d1: ; 1144d1 +Function1144d1: call Function114561 dec de dec de @@ -726,9 +712,8 @@ Function1144d1: ; 1144d1 ld a, $1 jp Function11425c -; 114561 -Function114561: ; 114561 +Function114561: ld hl, $dc03 ld a, [de] ld [hli], a @@ -749,9 +734,8 @@ Function114561: ; 114561 ld [hl], a ret -; 114576 -Function114576: ; 114576 +Function114576: xor a ld [wDecoBed], a ld b, $7 @@ -805,9 +789,8 @@ Function114576: ; 114576 ld [wDecoBed], a ret -; 1145c5 -Function1145c5: ; 1145c5 +Function1145c5: ld hl, $dc24 ld de, String_11421e ld c, $0 @@ -899,9 +882,8 @@ Function1145c5: ; 1145c5 xor a ret -; 11463c -Function11463c: ; 11463c +Function11463c: ld a, [$dc00] push af push de @@ -963,18 +945,16 @@ Function11463c: ; 11463c ld a, $1 ret -; 11469b -Function11469b: ; 11469b +Function11469b: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 1146a4 -Function1146a4: ; 1146a4 +Function1146a4: call Function114867 and a jr nz, .asm_1146e4 @@ -1031,9 +1011,8 @@ Function1146a4: ; 1146a4 ld a, $1 ret -; 1146fa -Function1146fa: ; 1146fa +Function1146fa: call Function114867 and a jp nz, .asm_11478a @@ -1158,9 +1137,8 @@ Function1146fa: ; 1146fa xor a ret -; 1147cd -Function1147cd: ; 1147cd +Function1147cd: ld bc, NULL ld a, [wDecoRightOrnament] and a @@ -1236,18 +1214,16 @@ Function1147cd: ; 1147cd ld a, $1 ret -; 11483a -Function11483a: ; 11483a +Function11483a: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 114843 -Function114843: ; 114843 +Function114843: ld a, [$dc00] push af push de @@ -1270,9 +1246,8 @@ Function114843: ; 114843 ld a, $1 ret -; 114867 -Function114867: ; 114867 +Function114867: ld hl, $dc06 ld a, [hli] ld [wCurrMapBGEventCount], a @@ -1330,18 +1305,16 @@ Function114867: ; 114867 ld a, $1 ret -; 1148b9 -Function1148b9: ; 1148b9 +Function1148b9: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 1148c2 -Function1148c2: ; 1148c2 +Function1148c2: ld hl, $dc06 ld a, [hli] ld [wCurrMapBGEventCount], a @@ -1432,18 +1405,16 @@ Function1148c2: ; 1148c2 ld a, $1 ret -; 114944 -Function114944: ; 114944 +Function114944: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 11494d -Function11494d: ; 11494d +Function11494d: ld hl, $dc06 ld a, [hli] ld [wCurrMapBGEventCount], a @@ -1526,18 +1497,16 @@ Function11494d: ; 11494d ld a, $1 ret -; 1149c3 -Function1149c3: ; 1149c3 +Function1149c3: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 1149cc -Function1149cc: ; 1149cc +Function1149cc: ld hl, $dc06 ld a, [hl] ld [wCurrMapBGEventCount], a @@ -1586,18 +1555,16 @@ Function1149cc: ; 1149cc ld a, $1 ret -; 114a0f -Function114a0f: ; 114a0f +Function114a0f: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 114a18 -Function114a18: ; 114a18 +Function114a18: ld bc, NULL ld h, b .asm_114a1c @@ -1663,18 +1630,16 @@ Function114a18: ; 114a18 ld a, $1 ret -; 114a71 -Function114a71: ; 114a71 +Function114a71: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 114a7a -Function114a7a: ; 114a7a +Function114a7a: ld bc, NULL .asm_114a7d inc bc @@ -1725,18 +1690,16 @@ Function114a7a: ; 114a7a ld a, $1 ret -; 114ac6 -Function114ac6: ; 114ac6 +Function114ac6: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 114acf -Function114acf: ; 114acf +Function114acf: .asm_114acf push hl push bc @@ -1838,18 +1801,16 @@ Function114acf: ; 114acf xor a ret -; 114b4c -Function114b4c: ; 114b4c +Function114b4c: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 114b55 -Function114b55: ; 114b55 +Function114b55: call Function114561 ld b, $0 ld hl, $dc03 @@ -1923,9 +1884,8 @@ endr ld b, $82 jp Function11425c -; 114bbc -Function114bbc: ; 114bbc +Function114bbc: ld h, d ld l, e ld a, [hli] @@ -1978,9 +1938,8 @@ Function114bbc: ; 114bbc pop hl jp Function11425c -; 114c0b -Function114c0b: ; 114c0b +Function114c0b: ld hl, $dc24 push bc call Function115d53 @@ -2038,18 +1997,16 @@ Function114c0b: ; 114c0b jr z, .asm_114c24 jr .asm_114c18 -; 114c55 -Function114c55: ; 114c55 +Function114c55: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 114c5e -Function114c5e: ; 114c5e +Function114c5e: ld de, wPartyMon5Defense push hl .asm_114c62 @@ -2148,9 +2105,8 @@ Function114c5e: ; 114c5e dec bc ret -; 114cd9 -Function114cd9: ; 114cd9 +Function114cd9: ld h, d ld l, e ld b, [hl] @@ -2215,9 +2171,8 @@ endr ld a, $1 jp Function11425c -; 114d39 -Function114d39: ; 114d39 +Function114d39: .asm_114d39 ld a, [$dc04] and a @@ -2284,9 +2239,8 @@ Function114d39: ; 114d39 ld [hli], a ret -; 114d99 -Function114d99: ; 114d99 +Function114d99: ld de, wPartyMon5Defense xor a ld [de], a @@ -2359,9 +2313,8 @@ Function114d99: ; 114d99 xor a ret -; 114df1 -Function114df1: ; 114df1 +Function114df1: cp $1b ret nz ld a, [hli] @@ -2410,9 +2363,8 @@ Function114df1: ; 114df1 xor a ret -; 114e2d -Function114e2d: ; 114e2d +Function114e2d: cp $30 jr c, .asm_114e45 cp $40 @@ -2447,9 +2399,8 @@ Function114e2d: ; 114e2d xor a ret -; 114e62 -Function114e62: ; 114e62 +Function114e62: ld a, c and a jr nz, .asm_114e6f @@ -2492,9 +2443,8 @@ Function114e62: ; 114e62 ld b, $83 jp Function11425c -; 114ea0 -Function114ea0: ; 114ea0 +Function114ea0: ld hl, $dc06 ld a, [hli] ld [wCurrMapBGEventCount], a @@ -2540,18 +2490,16 @@ Function114ea0: ; 114ea0 ld b, $83 ret -; 114ee0 -Function114ee0: ; 114ee0 +Function114ee0: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 114ee9 -Function114ee9: ; 114ee9 +Function114ee9: ld hl, $dc03 ld a, b ld [hli], a @@ -2584,9 +2532,8 @@ Function114ee9: ; 114ee9 ld [hl], d ret -; 114f0a -Function114f0a: ; 114f0a +Function114f0a: call Function114f39 and a jr nz, .asm_114f26 @@ -2621,9 +2568,8 @@ Function114f0a: ; 114f0a ld a, $ff ret -; 114f39 -Function114f39: ; 114f39 +Function114f39: ld hl, $dc0d ld e, [hl] inc hl @@ -2653,9 +2599,8 @@ Function114f39: ; 114f39 .asm_114f58 ret -; 114f59 -Function114f59: ; 114f59 +Function114f59: ld a, [wTimerEventStartDay] and a jr nz, .asm_114f7c @@ -2781,9 +2726,8 @@ Function114f59: ; 114f59 xor a ret -; 115020 -Function115020: ; 115020 +Function115020: push hl ld hl, $dc06 ld a, [hli] @@ -2830,18 +2774,16 @@ Function115020: ; 115020 ld a, $1 ret -; 115059 -Function115059: ; 115059 +Function115059: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 115062 -Function115062: ; 115062 +Function115062: ld hl, wDecoBed ld a, [hli] and a @@ -2894,9 +2836,8 @@ Function115062: ; 115062 .asm_1150b2 ret -; 1150b3 -Function1150b3: ; 1150b3 +Function1150b3: ld hl, $dc24 ld de, wPartyMon5Defense ld b, $0 @@ -2998,9 +2939,8 @@ Function1150b3: ; 1150b3 ld [de], a ret -; 115136 -Function115136: ; 115136 +Function115136: ld hl, $dc06 ld a, [hli] ld [wCurrMapBGEventCount], a @@ -3046,18 +2986,16 @@ Function115136: ; 115136 ld a, $1 ret -; 115170 -Function115170: ; 115170 +Function115170: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 115179 -Function115179: ; 115179 +Function115179: ld hl, $dc06 ld a, [hli] ld [wCurrMapBGEventCount], a @@ -3167,18 +3105,16 @@ Function115179: ; 115179 xor a ret -; 11520e -Function11520e: ; 11520e +Function11520e: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 115217 -Function115217: ; 115217 +Function115217: push hl ld hl, $dc06 ld a, [hli] @@ -3263,18 +3199,16 @@ Function115217: ; 115217 call z, Function115286 jr .asm_115252 -; 115286 -Function115286: ; 115286 +Function115286: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 11528f -Function11528f: ; 11528f +Function11528f: ld hl, wDecoBed ld c, [hl] inc hl @@ -3297,18 +3231,16 @@ Function11528f: ; 11528f ld [hl], c ret -; 1152af -Function1152af: ; 1152af +Function1152af: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 1152b8 -Function1152b8: ; 1152b8 +Function1152b8: push bc call Function11537d push de @@ -3433,9 +3365,8 @@ Function1152b8: ; 1152b8 xor a jp Function11425c -; 11537d -Function11537d: ; 11537d +Function11537d: ld hl, $dc06 ld a, [de] ld [hli], a @@ -3483,9 +3414,8 @@ Function11537d: ; 11537d ld [wTimerEventStartDay], a ret -; 1153b5 -Function1153b5: ; 1153b5 +Function1153b5: ld hl, $dc0d ld e, [hl] inc hl @@ -3510,9 +3440,8 @@ Function1153b5: ; 1153b5 ld [hl], d ret -; 1153d2 -Function1153d2: ; 1153d2 +Function1153d2: ld a, [$dc03] ld d, a ld a, [$dc04] @@ -3698,9 +3627,8 @@ Function1153d2: ; 1153d2 xor a ret -; 1154d4 -Function1154d4: ; 1154d4 +Function1154d4: xor a ld [wTimerEventStartDay], a call Function1155af @@ -3830,9 +3758,8 @@ Function1154d4: ; 1154d4 call Function1155d1 jr .asm_115547 -; 1155af -Function1155af: ; 1155af +Function1155af: ld hl, $dc06 ld a, [de] ld [hli], a @@ -3862,9 +3789,8 @@ Function1155af: ; 1155af call Function1155d1 ret -; 1155d1 -Function1155d1: ; 1155d1 +Function1155d1: ld a, [$dc0d] ld l, a ld a, [$dc0e] @@ -3907,9 +3833,8 @@ Function1155d1: ; 1155d1 ld [$dc0e], a ret -; 11560a -Function11560a: ; 11560a +Function11560a: ld a, [$dc06] ld [wCurrMapBGEventCount], a ld a, [$dc17] @@ -4035,9 +3960,8 @@ Function11560a: ; 11560a ld bc, $03db jr .asm_115659 -; 1156cc -Function1156cc: ; 1156cc +Function1156cc: ld a, [wTimerEventStartDay] and a jp z, Function11425c @@ -4099,9 +4023,8 @@ Function1156cc: ; 1156cc ld b, $83 jp Function11425c -; 115732 -Function115732: ; 115732 +Function115732: ld hl, $dc02 ld a, [de] ld [hli], a @@ -4143,9 +4066,8 @@ Function115732: ; 115732 ld [hl], b ret -; 11575c -Function11575c: ; 11575c +Function11575c: ld hl, $dc05 ld a, [hli] ld h, [hl] @@ -4231,9 +4153,8 @@ Function11575c: ; 11575c ld [wTimerEventStartDay], a ret -; 1157d0 -Function1157d0: ; 1157d0 +Function1157d0: ld hl, $dc05 ld a, [hli] ld h, [hl] @@ -4290,9 +4211,8 @@ Function1157d0: ; 1157d0 ld [wTimerEventStartDay], a ret -; 11581e -Function11581e: ; 11581e +Function11581e: ld a, [wTimerEventStartDay] and a ret z @@ -4398,9 +4318,8 @@ Function11581e: ; 11581e ld [wTimerEventStartDay], a ret -; 1158c2 -Function1158c2: ; 1158c2 +Function1158c2: ld a, e ld [wSwarmFlags], a ld a, d @@ -4608,9 +4527,8 @@ endr ld [hl], a ret -; 1159dc -Function1159dc: ; 1159dc +Function1159dc: cp $1a jr c, .asm_1159ef cp $34 @@ -4638,9 +4556,8 @@ Function1159dc: ; 1159dc ld a, $2b ret -; 1159fb -Function1159fb: ; 1159fb +Function1159fb: ld a, [wTimerEventStartDay] and a jp z, Function11425c @@ -4701,9 +4618,8 @@ Function1159fb: ; 1159fb ld a, $1 jp Function11425c -; 115a5f -Function115a5f: ; 115a5f +Function115a5f: ld hl, $dc05 ld a, [hli] ld h, [hl] @@ -4762,9 +4678,8 @@ Function115a5f: ; 115a5f ld [wTimerEventStartDay], a ret -; 115ab0 -Function115ab0: ; 115ab0 +Function115ab0: ld hl, $dc05 ld a, [hli] ld h, [hl] @@ -4823,9 +4738,8 @@ Function115ab0: ; 115ab0 xor a ret -; 115b00 -Function115b00: ; 115b00 +Function115b00: ld a, [wTimerEventStartDay] and a ret z @@ -4957,9 +4871,8 @@ Function115b00: ; 115b00 xor a ret -; 115bc8 -Function115bc8: ; 115bc8 +Function115bc8: xor a ld [wDecoCarpet], a .asm_115bcc @@ -5058,9 +4971,8 @@ Function115bc8: ; 115bc8 ld a, $2 ret -; 115c49 -Function115c49: ; 115c49 +Function115c49: ld a, e ld [wWeeklyFlags], a ld a, d @@ -5197,9 +5109,8 @@ endr jp nz, .asm_115c64 ret -; 115cfd -Function115cfd: ; 115cfd +Function115cfd: cp $2b jr c, .asm_115d27 jr z, .asm_115d2f @@ -5268,9 +5179,8 @@ Function115cfd: ; 115cfd sub $47 ret -; 115d53 -Function115d53: ; 115d53 +Function115d53: .asm_115d53 ld a, [de] ld [hli], a @@ -5284,18 +5194,16 @@ Function115d53: ; 115d53 ld [hl], a ret -; 115d61 -Function115d61: ; 115d61 +Function115d61: push bc ld bc, $dc00 call Function115d80 pop bc ret -; 115d6a -Function115d6a: ; 115d6a +Function115d6a: .asm_115d6a ld a, [hli] ld [de], a @@ -5308,18 +5216,16 @@ Function115d6a: ; 115d6a xor a ret -; 115d77 -Function115d77: ; 115d77 +Function115d77: push bc ld bc, wCurrMapBGEventCount call Function115d80 pop bc ret -; 115d80 -Function115d80: ; 115d80 +Function115d80: ld e, a ld a, d cp $bf @@ -5340,13 +5246,11 @@ Function115d80: ; 115d80 ld e, $0 ret -; 115d99 INCLUDE "mobile/mobile_45_sprite_engine.asm" -; 116567 -Function116567: ; 116567 +Function116567: ld hl, wc3f7 dec [hl] ret nz @@ -5383,9 +5287,8 @@ Function116567: ; 116567 ld [wc3f7], a ret -; 11659d -Function11659d: ; 11659d +Function11659d: ld a, [wc314] cp $12 ret nc @@ -5399,9 +5302,8 @@ Function11659d: ; 11659d ld l, a jp hl -; 1165af -Jumptable_1165af: ; 1165af +Jumptable_1165af: dw Function11677e dw Function1165d5 dw Function1165d8 @@ -5421,9 +5323,8 @@ Jumptable_1165af: ; 1165af dw Function1166c4 dw Function1166d6 dw Function1166d6 -; 1165d5 -Function1165d5: ; 1165d5 +Function1165d5: call Function11678e Function1165d8: @@ -5444,9 +5345,8 @@ Function1165e3: ret c jp Function116797 -; 1165f5 -Function1165f5: ; 1165f5 +Function1165f5: ld a, $1 ld c, a ld a, $1 @@ -5466,9 +5366,8 @@ Function116600: ld [wc314], a ret -; 116615 -Function116615: ; 116615 +Function116615: call Function11678e Function116618: @@ -5489,9 +5388,8 @@ Function116623: ret c jp Function116797 -; 116635 -Function116635: ; 116635 +Function116635: ld a, $2 ld c, a ld a, $ff @@ -5511,9 +5409,8 @@ Function116640: ld [wc314], a ret -; 116655 -Function116655: ; 116655 +Function116655: xor a ld [wc314 + 3], a call Function11678e @@ -5558,9 +5455,8 @@ Function11668d: ld [wc314], a ret -; 11669f -Function11669f: ; 11669f +Function11669f: call Function11678e Function1166a2: @@ -5607,9 +5503,8 @@ Function1166d6: ld [wc314], a ret -; 1166f4 -Function1166f4: ; 1166f4 +Function1166f4: ld [wc30e], a ld a, b ld [wc314 + 2], a @@ -5635,9 +5530,8 @@ Function1166f4: ; 1166f4 call Function116797 ret -; 11671f -Function11671f: ; 11671f +Function11671f: ld [wc30f], a ld a, b ld [wc314 + 3], a @@ -5659,9 +5553,8 @@ Function11671f: ; 11671f call Function116797 ret -; 116747 -Function116747: ; 116747 +Function116747: ld hl, wc30e ld a, [wc314 + 2] add [hl] @@ -5672,9 +5565,8 @@ Function116747: ; 116747 ld [hl], a ret -; 116758 -Function116758: ; 116758 +Function116758: ld a, [wc30f] cp $30 jr c, .asm_116770 @@ -5703,9 +5595,8 @@ Function116758: ; 116758 ld [wc314 + 4], a ret -; 11677e -Function11677e: ; 11677e +Function11677e: ld a, $0 Function116780: @@ -5721,23 +5612,20 @@ Function116780: and a ret -; 11678e -Function11678e: ; 11678e +Function11678e: ld hl, wc314 ld a, [hl] ld [wc314 + 1], a inc [hl] ret -; 116797 -Function116797: ; 116797 +Function116797: ld hl, wc314 inc [hl] ret -; 11679c Function11679c: ld a, c @@ -5746,7 +5634,7 @@ Function11679c: ld [wc312], a jr asm_1167af -Function1167a6: ; 1167a6 +Function1167a6: ld hl, wc313 dec [hl] ret nz @@ -5794,7 +5682,6 @@ asm_1167af ld [wc313], a ret -; 1167eb Unknown_1167eb: dw Unknown_1167fb @@ -5806,7 +5693,7 @@ Unknown_1167eb: dw Unknown_116881 dw Unknown_1168ae -Unknown_1167fb: ; 1167fb +Unknown_1167fb: db $0, $6 db $1, $4 db $2, $4 @@ -5815,7 +5702,7 @@ Unknown_1167fb: ; 1167fb db $1, $4 db $fe -Unknown_116808: ; 116808 +Unknown_116808: db $4, $6 db $5, $4 db $6, $4 @@ -5824,7 +5711,7 @@ Unknown_116808: ; 116808 db $5, $4 db $fe -Unknown_116815: ; 116815 +Unknown_116815: db $fd, $20 db $8, $c db $9, $24 @@ -5847,7 +5734,7 @@ Unknown_116815: ; 116815 db $8, $4 db -1 ; end -Unknown_11683e: ; 11683e +Unknown_11683e: db $fd, $20 db $e, $c db $f, $24 @@ -5870,14 +5757,14 @@ Unknown_11683e: ; 11683e db $e, $4 db -1 ; end -Unknown_116867: ; 116867 +Unknown_116867: db $14, $8 db $15, $8 db $16, $8 db $15, $8 db $fe -Unknown_116870: ; 116870 +Unknown_116870: db $17, $5 db $18, $5 db $19, $5 @@ -5888,7 +5775,7 @@ Unknown_116870: ; 116870 db $18, $5 db $fe -Unknown_116881: ; 116881 +Unknown_116881: db $1c, $7 db $1d, $7 db $1e, $a @@ -5913,7 +5800,7 @@ Unknown_116881: ; 116881 db $fd, $40 db -1 ; end -Unknown_1168ae: ; 1168ae +Unknown_1168ae: db $24, $4 db $25, $4 db $26, $4 @@ -5926,7 +5813,6 @@ Unknown_1168ae: ; 1168ae db $2d, $4 db $2e, $4 db $fe -; 1168c5 Unknown_1168c5: dw Unknown_116923 @@ -5977,7 +5863,7 @@ Unknown_1168c5: dw Unknown_1172c4 dw Unknown_1172e9 -Unknown_116923: ; 116923 +Unknown_116923: db $f db $0, $0, $1, $a db $0, $8, $2, $d @@ -5995,7 +5881,7 @@ Unknown_116923: ; 116923 db $18, $8, $32, $a db $18, $10, $33, $a -Unknown_116960: ; 116960 +Unknown_116960: db $10 db $1, $0, $1, $a db $1, $8, $2, $d @@ -6014,7 +5900,7 @@ Unknown_116960: ; 116960 db $19, $10, $17, $a db $19, $18, $35, $a -Unknown_1169a1: ; 1169a1 +Unknown_1169a1: db $f db $1, $0, $1, $a db $1, $8, $2, $d @@ -6032,7 +5918,7 @@ Unknown_1169a1: ; 1169a1 db $19, $10, $37, $a db $19, $18, $35, $a -Unknown_1169de: ; 1169de +Unknown_1169de: db $f db $0, $0, $1, $a db $0, $8, $2, $d @@ -6050,7 +5936,7 @@ Unknown_1169de: ; 1169de db $18, $8, $32, $a db $18, $10, $33, $a -Unknown_116a1b: ; 116a1b +Unknown_116a1b: db $f db $0, $0, $4, $2d db $0, $8, $3, $2d @@ -6068,7 +5954,7 @@ Unknown_116a1b: ; 116a1b db $18, $10, $32, $2a db $18, $18, $31, $2a -Unknown_116a58: ; 116a58 +Unknown_116a58: db $10 db $1, $0, $4, $2d db $1, $8, $3, $2d @@ -6087,7 +5973,7 @@ Unknown_116a58: ; 116a58 db $19, $10, $16, $2a db $19, $18, $15, $2a -Unknown_116a99: ; 116a99 +Unknown_116a99: db $f db $1, $0, $4, $2d db $1, $8, $3, $2d @@ -6105,7 +5991,7 @@ Unknown_116a99: ; 116a99 db $19, $8, $37, $2a db $19, $10, $36, $2a -Unknown_116ad6: ; 116ad6 +Unknown_116ad6: db $f db $0, $0, $4, $2d db $0, $8, $3, $2d @@ -6123,7 +6009,7 @@ Unknown_116ad6: ; 116ad6 db $18, $10, $32, $2a db $18, $18, $31, $2a -Unknown_116b13: ; 116b13 +Unknown_116b13: db $10 db $18, $0, $0, $b db $18, $8, $8, $b @@ -6142,7 +6028,7 @@ Unknown_116b13: ; 116b13 db $0, $10, $44, $2b db $0, $18, $43, $2b -Unknown_116b54: ; 116b54 +Unknown_116b54: db $10 db $19, $0, $0, $b db $19, $8, $18, $b @@ -6161,7 +6047,7 @@ Unknown_116b54: ; 116b54 db $1, $10, $44, $2b db $1, $18, $d, $2b -Unknown_116b95: ; 116b95 +Unknown_116b95: db $10 db $18, $0, $0, $b db $18, $8, $5c, $2b @@ -6180,7 +6066,7 @@ Unknown_116b95: ; 116b95 db $0, $10, $44, $2b db $0, $18, $43, $2b -Unknown_116bd6: ; 116bd6 +Unknown_116bd6: db $10 db $18, $0, $0, $a db $18, $8, $56, $a @@ -6199,7 +6085,7 @@ Unknown_116bd6: ; 116bd6 db $0, $10, $49, $2a db $0, $18, $48, $2a -Unknown_116c17: ; 116c17 +Unknown_116c17: db $10 db $19, $0, $0, $a db $19, $8, $76, $a @@ -6218,7 +6104,7 @@ Unknown_116c17: ; 116c17 db $1, $10, $19, $2a db $1, $18, $63, $2a -Unknown_116c58: ; 116c58 +Unknown_116c58: db $10 db $1a, $0, $6c, $a db $1a, $8, $6d, $a @@ -6237,7 +6123,7 @@ Unknown_116c58: ; 116c58 db $2, $10, $47, $2a db $2, $18, $46, $2a -Unknown_116c99: ; 116c99 +Unknown_116c99: db $10 db $19, $0, $0, $2a db $19, $8, $77, $2a @@ -6256,7 +6142,7 @@ Unknown_116c99: ; 116c99 db $1, $10, $19, $2a db $1, $18, $63, $2a -Unknown_116cda: ; 116cda +Unknown_116cda: db $10 db $18, $0, $0, $a db $18, $8, $57, $2a @@ -6275,7 +6161,7 @@ Unknown_116cda: ; 116cda db $0, $10, $49, $2a db $0, $18, $48, $2a -Unknown_116d1b: ; 116d1b +Unknown_116d1b: db $c db $0, $0, $38, $4a db $0, $8, $39, $4a @@ -6290,7 +6176,7 @@ Unknown_116d1b: ; 116d1b db $10, $10, $19, $6a db $10, $18, $9, $6d -Unknown_116d4c: ; 116d4c +Unknown_116d4c: db $e db $0, $8, $3b, $4a db $0, $10, $3b, $6a @@ -6307,7 +6193,7 @@ Unknown_116d4c: ; 116d4c db $18, $10, $b, $6a db $18, $18, $a, $6a -Unknown_116d85: ; 116d85 +Unknown_116d85: db $e db $0, $0, $35, $2a db $0, $8, $3c, $4a @@ -6324,7 +6210,7 @@ Unknown_116d85: ; 116d85 db $18, $10, $e, $4d db $18, $18, $f, $4a -Unknown_116dbe: ; 116dbe +Unknown_116dbe: db $e db $0, $0, $65, $4a db $0, $8, $66, $4a @@ -6341,7 +6227,7 @@ Unknown_116dbe: ; 116dbe db $18, $8, $40, $4d db $18, $10, $41, $4d -Unknown_116df7: ; 116df7 +Unknown_116df7: db $e db $0, $0, $3e, $6a db $0, $8, $3d, $6a @@ -6358,7 +6244,7 @@ Unknown_116df7: ; 116df7 db $18, $0, $f, $6a db $18, $8, $e, $6d -Unknown_116e30: ; 116e30 +Unknown_116e30: db $e db $0, $0, $68, $6a db $0, $8, $67, $6a @@ -6375,7 +6261,7 @@ Unknown_116e30: ; 116e30 db $18, $10, $40, $6d db $18, $18, $3f, $6d -Unknown_116e69: ; 116e69 +Unknown_116e69: db $c db $8, $0, $9, $d db $8, $8, $19, $a @@ -6390,7 +6276,7 @@ Unknown_116e69: ; 116e69 db $18, $10, $39, $2a db $18, $18, $38, $2a -Unknown_116e9a: ; 116e9a +Unknown_116e9a: db $e db $0, $0, $a, $a db $0, $8, $b, $a @@ -6407,7 +6293,7 @@ Unknown_116e9a: ; 116e9a db $18, $8, $3b, $a db $18, $10, $3b, $2a -Unknown_116ed3: ; 116ed3 +Unknown_116ed3: db $e db $0, $10, $e, $d db $0, $18, $f, $a @@ -6424,7 +6310,7 @@ Unknown_116ed3: ; 116ed3 db $18, $10, $3d, $a db $18, $18, $3e, $a -Unknown_116f0c: ; 116f0c +Unknown_116f0c: db $e db $0, $0, $3f, $d db $0, $8, $40, $d @@ -6441,7 +6327,7 @@ Unknown_116f0c: ; 116f0c db $18, $10, $67, $a db $18, $18, $68, $a -Unknown_116f45: ; 116f45 +Unknown_116f45: db $e db $0, $0, $f, $2a db $0, $8, $e, $2d @@ -6458,7 +6344,7 @@ Unknown_116f45: ; 116f45 db $18, $10, $3c, $2a db $18, $18, $35, $4a -Unknown_116f7e: ; 116f7e +Unknown_116f7e: db $e db $0, $8, $41, $2d db $0, $10, $40, $2d @@ -6475,7 +6361,7 @@ Unknown_116f7e: ; 116f7e db $18, $10, $66, $2a db $18, $18, $65, $2a -Unknown_116fb7: ; 116fb7 +Unknown_116fb7: db $d db $fa, $0, $72, $a db $fa, $8, $73, $d @@ -6491,7 +6377,7 @@ Unknown_116fb7: ; 116fb7 db $a, $18, $94, $a db $12, $10, $a3, $a -Unknown_116fec: ; 116fec +Unknown_116fec: db $e db $fd, $0, $85, $d db $fd, $8, $86, $d @@ -6508,7 +6394,7 @@ Unknown_116fec: ; 116fec db $15, $10, $b5, $a db $15, $18, $b6, $a -Unknown_117025: ; 117025 +Unknown_117025: db $c db $8, $0, $79, $d db $8, $8, $7a, $d @@ -6523,7 +6409,7 @@ Unknown_117025: ; 117025 db $18, $10, $9b, $a db $18, $18, $9c, $a -Unknown_117056: ; 117056 +Unknown_117056: db $b db $8, $0, $7d, $a db $8, $8, $7e, $d @@ -6537,7 +6423,7 @@ Unknown_117056: ; 117056 db $18, $10, $9f, $a db $18, $18, $a0, $a -Unknown_117083: ; 117083 +Unknown_117083: db $f db $0, $0, $a1, $a db $0, $8, $a2, $a @@ -6555,7 +6441,7 @@ Unknown_117083: ; 117083 db $18, $10, $87, $a db $18, $18, $88, $a -Unknown_1170c0: ; 1170c0 +Unknown_1170c0: db $f db $0, $0, $a1, $a db $0, $8, $a2, $d @@ -6573,7 +6459,7 @@ Unknown_1170c0: ; 1170c0 db $18, $10, $87, $a db $18, $18, $88, $a -Unknown_1170fd: ; 1170fd +Unknown_1170fd: db $f db $0, $0, $a9, $a db $0, $8, $aa, $a @@ -6591,7 +6477,7 @@ Unknown_1170fd: ; 1170fd db $18, $10, $ba, $a db $18, $18, $bb, $a -Unknown_11713a: ; 11713a +Unknown_11713a: db $f db $0, $0, $ae, $c db $0, $8, $af, $c @@ -6609,7 +6495,7 @@ Unknown_11713a: ; 11713a db $18, $10, $c0, $c db $18, $18, $be, $c -Unknown_117177: ; 117177 +Unknown_117177: db $9 db $14, $0, $1f, $6 db $14, $8, $20, $6 @@ -6621,7 +6507,7 @@ Unknown_117177: ; 117177 db $4, $8, $2, $6 db $4, $10, $3, $6 -Unknown_11719c: ; 11719c +Unknown_11719c: db $9 db $14, $0, $22, $6 db $14, $8, $23, $6 @@ -6633,7 +6519,7 @@ Unknown_11719c: ; 11719c db $4, $8, $5, $6 db $4, $10, $6, $6 -Unknown_1171c1: ; 1171c1 +Unknown_1171c1: db $9 db $14, $0, $25, $6 db $14, $8, $26, $6 @@ -6645,7 +6531,7 @@ Unknown_1171c1: ; 1171c1 db $4, $8, $8, $6 db $4, $10, $9, $6 -Unknown_1171e6: ; 1171e6 +Unknown_1171e6: db $9 db $14, $0, $28, $6 db $14, $8, $29, $6 @@ -6657,7 +6543,7 @@ Unknown_1171e6: ; 1171e6 db $4, $8, $b, $6 db $4, $10, $c, $6 -Unknown_11720b: ; 11720b +Unknown_11720b: db $9 db $14, $0, $2b, $6 db $14, $8, $2c, $6 @@ -6669,7 +6555,7 @@ Unknown_11720b: ; 11720b db $4, $8, $e, $6 db $4, $10, $f, $6 -Unknown_117230: ; 117230 +Unknown_117230: db $9 db $14, $0, $47, $6 db $14, $8, $48, $6 @@ -6681,7 +6567,7 @@ Unknown_117230: ; 117230 db $4, $8, $2f, $6 db $4, $10, $30, $6 -Unknown_117255: ; 117255 +Unknown_117255: db $9 db $14, $0, $35, $6 db $14, $8, $4a, $6 @@ -6693,7 +6579,7 @@ Unknown_117255: ; 117255 db $4, $8, $32, $6 db $4, $10, $31, $26 -Unknown_11727a: ; 11727a +Unknown_11727a: db $9 db $14, $0, $4b, $6 db $14, $8, $4c, $6 @@ -6705,7 +6591,7 @@ Unknown_11727a: ; 11727a db $4, $8, $34, $6 db $4, $10, $35, $6 -Unknown_11729f: ; 11729f +Unknown_11729f: db $9 db $14, $0, $4e, $6 db $14, $8, $4f, $6 @@ -6717,7 +6603,7 @@ Unknown_11729f: ; 11729f db $4, $8, $36, $6 db $4, $10, $37, $6 -Unknown_1172c4: ; 1172c4 +Unknown_1172c4: db $9 db $14, $0, $51, $6 db $14, $8, $52, $6 @@ -6729,7 +6615,7 @@ Unknown_1172c4: ; 1172c4 db $4, $8, $39, $6 db $4, $10, $3a, $6 -Unknown_1172e9: ; 1172e9 +Unknown_1172e9: db $9 db $10, $0, $0, $2 db $10, $8, $0, $2 @@ -6740,7 +6626,6 @@ Unknown_1172e9: ; 1172e9 db $0, $0, $0, $2 db $0, $8, $0, $2 db $4, $10, $10, $6 -; 11730e Palette_11730e: RGB 31, 31, 31 @@ -6782,7 +6667,7 @@ Palette_11734e: RGB 10, 9, 9 RGB 15, 14, 14 -Unknown_117356: ; 117356 +Unknown_117356: db $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9, $c9 db $c9, $c9, $c9, $c9, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1, $c1 db $c5, $c6, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2, $c2 @@ -6832,18 +6717,16 @@ Unknown_117356: ; 117356 db $8f, $8f, $af, $af, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 db $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f, $8f db $8f, $8f, $8f, $8f, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08, $08 -; 117656 SECTION "Mobile Stadium", ROMX -GiveOddEgg: ; 117656 +GiveOddEgg: farcall _GiveOddEgg ret -; 11765d -Function11765d: ; 11765d (45:765d) +Function11765d: ld a, [hInMenu] push af ld a, $1 @@ -6853,7 +6736,7 @@ Function11765d: ; 11765d (45:765d) ld [hInMenu], a ret -Function11766b: ; 11766b (45:766b) +Function11766b: call Function117699 ld a, [rSVBK] push af @@ -6874,7 +6757,7 @@ Function11766b: ; 11766b (45:766b) ld [rSVBK], a ret -Function117699: ; 117699 (45:7699) +Function117699: ld a, $5 call GetSRAMBank ld hl, wcd49 @@ -6903,7 +6786,7 @@ Function117699: ; 117699 (45:7699) farcall ClearSpriteAnims ret -Function1176ee: ; 1176ee (45:76ee) +Function1176ee: .loop call JoyTextDelay ld a, [wcd49] @@ -6921,7 +6804,7 @@ Function1176ee: ; 1176ee (45:76ee) call ClearSprites ret -Function117719: ; 117719 (45:7719) +Function117719: ld a, [wcd49] ld e, a ld d, 0 @@ -6933,7 +6816,7 @@ Function117719: ; 117719 (45:7719) ld l, a jp hl -Jumptable_117728: ; 117728 (45:7728) +Jumptable_117728: dw Function117738 dw Function117764 dw Function1178aa @@ -6944,7 +6827,7 @@ Jumptable_117728: ; 117728 (45:7728) dw Function1179a7 -Function117738: ; 117738 (45:7738) +Function117738: farcall Function171ccd depixel 6, 3 ld a, $1d @@ -6964,7 +6847,7 @@ Function117738: ; 117738 (45:7738) ld [wcd23], a jp MobilePassword_IncrementJumptable -Function117764: ; 117764 (45:7764) +Function117764: ld a, [wcd4a] cp $10 jr nz, .asm_11776f @@ -7003,18 +6886,18 @@ Function117764: ; 117764 (45:7764) jp nz, Function117764_d_right ret -Function117764_select: ; 1177a5 (45:77a5) +Function117764_select: farcall Function171cf0 ret -Function117764_start: ; 1177ac (45:77ac) +Function117764_start: ld a, $2 ld [wcd4c], a ld a, $4 ld [wcd4d], a ret -Function1177b7: ; 1177b7 (45:77b7) +Function1177b7: ld a, $3 ld [wcd24], a ld a, [wcd4a] @@ -7027,13 +6910,13 @@ Function1177b7: ; 1177b7 (45:77b7) ld [wcd49], a ret -Function1177cb: ; 1177cb (45:77cb) +Function1177cb: ld a, $80 ld [wcd49], a ld [wScriptVar], a jp MobilePassword_IncrementJumptable -Function117764_b_button: ; 1177d6 (45:77d6) +Function117764_b_button: call PlayClickSFX ld a, [wcd4a] and a @@ -7051,7 +6934,7 @@ Function117764_b_button: ; 1177d6 (45:77d6) ld [hl], a ret -Function117764_d_up: ; 1177f1 (45:77f1) +Function117764_d_up: ld a, [wcd4d] and a ret z @@ -7064,11 +6947,11 @@ Function117764_d_up: ; 1177f1 (45:77f1) sla a sla a add e -Function117764_d_vertical_load: ; 117806 (45:7806) +Function117764_d_vertical_load: ld [wcd4c], a ret -Function117764_d_down: ; 11780a (45:780a) +Function117764_d_down: ld a, [wcd4d] cp $4 ret z @@ -7092,7 +6975,7 @@ Function117764_d_down: ; 11780a (45:780a) ld a, $1 jr Function117764_d_vertical_load -Function117764_d_left: ; 11782d (45:782d) +Function117764_d_left: ld a, [wcd4c] and a ret z @@ -7100,7 +6983,7 @@ Function117764_d_left: ; 11782d (45:782d) ld [wcd4c], a ret -Function117764_d_right: ; 117837 (45:7837) +Function117764_d_right: ld e, $d ld a, [wcd4d] cp $4 @@ -7114,7 +6997,7 @@ Function117764_d_right: ; 117837 (45:7837) ld [wcd4c], a ret -Function117764_a_button: ; 11784c (45:784c) +Function117764_a_button: call PlayClickSFX ld a, [wcd4d] cp $4 @@ -7167,7 +7050,7 @@ Function117764_a_button: ; 11784c (45:784c) ret nz jp Function117764_start -Function1178aa: ; 1178aa (45:78aa) +Function1178aa: ld hl, MenuHeader_1179b5 call LoadMenuHeader call MenuBox @@ -7190,7 +7073,7 @@ Function1178aa: ; 1178aa (45:78aa) ld [wcd4e], a jp MobilePassword_IncrementJumptable -Function1178e8: ; 1178e8 (45:78e8) +Function1178e8: ld a, [hJoyPressed] cp B_BUTTON jr z, .b_button @@ -7242,7 +7125,7 @@ Function1178e8: ; 1178e8 (45:78e8) call ExitMenu jp MobilePassword_IncrementJumptable -Function117942: ; 117942 (45:7942) +Function117942: call SpeechTextBox hlcoord 1, 14 ld de, SavedPasswordString @@ -7263,17 +7146,17 @@ Function117942: ; 117942 (45:7942) jr z, asm_11797e call MobilePassword_IncrementJumptable -Function117976: ; 117976 (45:7976) +Function117976: ld hl, wcd4e dec [hl] ret nz call ExitMenu -asm_11797e: ; 11797e (45:797e) +asm_11797e: ld a, $80 ld [wcd49], a ret -Function117984: ; 117984 (45:7984) +Function117984: ld hl, MenuHeader_1179b5 call LoadMenuHeader call MenuBox @@ -7286,7 +7169,7 @@ Function117984: ; 117984 (45:7984) ld [wcd4e], a call MobilePassword_IncrementJumptable -Function1179a7: ; 1179a7 (45:79a7) +Function1179a7: ld hl, wcd4e dec [hl] ret nz @@ -7295,56 +7178,47 @@ Function1179a7: ; 1179a7 (45:79a7) ld [wcd49], a ret -; 1179b5 (45:79b5) -MenuHeader_1179b5: ; 1179b5 +MenuHeader_1179b5: db MENU_BACKUP_TILES ; flags menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option -; 1179bd -MenuHeader_1179bd: ; 1179bd +MenuHeader_1179bd: db MENU_BACKUP_TILES ; flags menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 0 ; default option -; 1179c5 -YessNoString_1179c5: ; 1179c5 +YessNoString_1179c5: db "はい" next "いいえ@" -; 1179cc -AskSavePasswordString: ; 1179cc +AskSavePasswordString: db "こパスワード¯ほぞんして" line "おきますか?@" -; 1179e1 -NotAPokemonPasswordString: ; 1179e1 +NotAPokemonPasswordString: db "パスワードにゅうりょく" line "されていません!@" -; 1179f7 -SavedPasswordString: ; 1179f7 +SavedPasswordString: db "ログインパスワード¯ほぞん" line "しました@" -; 117a0a -MobilePassword_IncrementJumptable: ; 117a0a (45:7a0a) +MobilePassword_IncrementJumptable: ld hl, wcd49 inc [hl] ret -; 117a0f (45:7a0f) Unknown_117a0f: INCBIN "data/mobile/ascii-alpha.txt" Unknown_117a47: INCBIN "data/mobile/ascii-sym.txt" -; 117a7f ; everything from here to the end of the bank is related to the diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm index 1edafb47c66..70e8ef9f846 100644 --- a/mobile/mobile_45_sprite_engine.asm +++ b/mobile/mobile_45_sprite_engine.asm @@ -1,4 +1,4 @@ -Function115d99: ; 115d99 +Function115d99: ld de, GFX_11601a ld hl, vTiles0 tile $60 lb bc, BANK(GFX_11601a), 20 @@ -16,9 +16,8 @@ Function115d99: ; 115d99 ld [wc308], a ret -; 115dc3 -Function115dc3: ; 115dc3 +Function115dc3: xor a ld [wc305], a ld a, $a0 @@ -27,9 +26,8 @@ Function115dc3: ; 115dc3 call ByteFill ret -; 115dd3 -Function115dd3: ; 115dd3 +Function115dd3: ld a, [wc305] and a ret z @@ -77,25 +75,23 @@ Function115dd3: ; 115dd3 jr nz, .asm_115e04 ret -; 115e18 -Function115e18: ; 115e18 +Function115e18: ld a, c ld [wc30a], a xor a ld [wc30b], a jr Function115e2b -; 115e22 -Function115e22: ; 115e22 +Function115e22: ld hl, wc30c dec [hl] ret nz ld hl, wc30b inc [hl] -Function115e2b: ; 115e2b +Function115e2b: ld a, [wc30a] sla a ld c, a @@ -126,7 +122,6 @@ Function115e2b: ; 115e2b ld [wc30c], a ret -; 115e59 Unknown_115e59: dw Unknown_115e61 @@ -135,7 +130,7 @@ Unknown_115e59: dw Unknown_115e79 ; OAM idx (see Unknown_115e86), flip flags/duration -Unknown_115e61: ; 115e61 +Unknown_115e61: db $04, $08 db $05, $08 db $06, $08 @@ -143,17 +138,17 @@ Unknown_115e61: ; 115e61 db $08, $08 db -1 -Unknown_115e6c: ; 115e6c +Unknown_115e6c: db $01, $08 db $02, $08 db $03, $08 db $09, $08 db $0a, $08 -Unknown_115e76: ; 115e76 +Unknown_115e76: db $00, $08 db -1 -Unknown_115e79: ; 115e79 +Unknown_115e79: db $0b, $08 db $0c, $08 db $0d, $08 @@ -161,7 +156,6 @@ Unknown_115e79: ; 115e79 db $0f, $08 db $00, $08 db -1 -; 115e86 Unknown_115e86: dw Unknown_115ea6 @@ -181,14 +175,14 @@ Unknown_115e86: dw Unknown_115ff0 dw Unknown_116005 -Unknown_115ea6: ; 115ea6 +Unknown_115ea6: db 4 dsprite 1, 0, 0, 0, $60, $01 dsprite 1, 0, 1, 0, $61, $01 dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115eb7: ; 115eb7 +Unknown_115eb7: db 5 dsprite 0, 0, 1, 0, $64, $00 dsprite 1, 0, 0, 0, $60, $01 @@ -196,7 +190,7 @@ Unknown_115eb7: ; 115eb7 dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115ecc: ; 115ecc +Unknown_115ecc: db 5 dsprite 0, 0, 1, 0, $65, $00 dsprite 1, 0, 0, 0, $60, $01 @@ -204,7 +198,7 @@ Unknown_115ecc: ; 115ecc dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115ee1: ; 115ee1 +Unknown_115ee1: db 5 dsprite 0, 0, 1, 0, $66, $00 dsprite 1, 0, 0, 0, $60, $01 @@ -212,7 +206,7 @@ Unknown_115ee1: ; 115ee1 dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115ef6: ; 115ef6 +Unknown_115ef6: db 7 dsprite 0, 0, 0, 0, $67, $01 dsprite 1, 0, 0, 0, $68, $01 @@ -222,7 +216,7 @@ Unknown_115ef6: ; 115ef6 dsprite 3, 0, 1, 0, $6b, $00 dsprite 3, 0, 2, 0, $6c, $00 -Unknown_115f13: ; 115f13 +Unknown_115f13: db 7 dsprite 0, 0, 0, 0, $67, $01 dsprite 1, 0, 0, 0, $68, $01 @@ -232,7 +226,7 @@ Unknown_115f13: ; 115f13 dsprite 3, 0, 1, 0, $6b, $00 dsprite 3, 0, 2, 0, $6c, $00 -Unknown_115f30: ; 115f30 +Unknown_115f30: db 7 dsprite 0, 0, 0, 0, $67, $01 dsprite 1, 0, 0, 0, $68, $01 @@ -242,7 +236,7 @@ Unknown_115f30: ; 115f30 dsprite 3, 0, 1, 0, $6b, $00 dsprite 3, 0, 2, 0, $6c, $00 -Unknown_115f4d: ; 115f4d +Unknown_115f4d: db 7 dsprite 0, 0, 0, 0, $67, $01 dsprite 1, 0, 0, 0, $68, $01 @@ -252,7 +246,7 @@ Unknown_115f4d: ; 115f4d dsprite 3, 0, 1, 0, $6b, $00 dsprite 3, 0, 2, 0, $6c, $00 -Unknown_115f6a: ; 115f6a +Unknown_115f6a: db 7 dsprite 0, 0, 0, 0, $67, $01 dsprite 1, 0, 0, 0, $68, $01 @@ -262,7 +256,7 @@ Unknown_115f6a: ; 115f6a dsprite 3, 0, 1, 0, $6b, $00 dsprite 3, 0, 2, 0, $6c, $00 -Unknown_115f87: ; 115f87 +Unknown_115f87: db 5 dsprite 0, 0, 1, 0, $72, $00 dsprite 1, 0, 0, 0, $60, $01 @@ -270,7 +264,7 @@ Unknown_115f87: ; 115f87 dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115f9c: ; 115f9c +Unknown_115f9c: db 5 dsprite 0, 0, 1, 0, $73, $00 dsprite 1, 0, 0, 0, $60, $01 @@ -278,7 +272,7 @@ Unknown_115f9c: ; 115f9c dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115fb1: ; 115fb1 +Unknown_115fb1: db 5 dsprite 0, 1, 1, 0, $64, $60 dsprite 1, 0, 0, 0, $60, $01 @@ -286,7 +280,7 @@ Unknown_115fb1: ; 115fb1 dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115fc6: ; 115fc6 +Unknown_115fc6: db 5 dsprite 0, 1, 1, 0, $65, $60 dsprite 1, 0, 0, 0, $60, $01 @@ -294,7 +288,7 @@ Unknown_115fc6: ; 115fc6 dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115fdb: ; 115fdb +Unknown_115fdb: db 5 dsprite 0, 1, 1, 0, $66, $60 dsprite 1, 0, 0, 0, $60, $01 @@ -302,7 +296,7 @@ Unknown_115fdb: ; 115fdb dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_115ff0: ; 115ff0 +Unknown_115ff0: db 5 dsprite 0, 1, 1, 0, $72, $60 dsprite 1, 0, 0, 0, $60, $01 @@ -310,20 +304,19 @@ Unknown_115ff0: ; 115ff0 dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -Unknown_116005: ; 116005 +Unknown_116005: db 5 dsprite 0, 1, 1, 0, $73, $60 dsprite 1, 0, 0, 0, $60, $01 dsprite 1, 0, 1, 0, $61, $01 dsprite 2, 0, 0, 0, $62, $01 dsprite 2, 0, 1, 0, $63, $01 -; 11601a -GFX_11601a:: ; 11601a +GFX_11601a:: INCBIN "gfx/unknown/11601a.2bpp" -Function11615a: ; 11615a +Function11615a: xor a ld [wc30d], a ld [$c319], a @@ -350,9 +343,8 @@ Function11615a: ; 11615a ld [wc3f3], a ret -; 11619d -Function11619d: ; 11619d +Function11619d: ld a, [wc30d] and a ret z @@ -368,9 +360,8 @@ Function11619d: ; 11619d call Function1161b8 ret -; 1161b8 -Function1161b8: ; 1161b8 +Function1161b8: ld a, [$c319] ld e, a ld d, 0 @@ -382,9 +373,8 @@ Function1161b8: ; 1161b8 ld l, a jp hl -; 1161c7 -.Jumptable: ; 1161c7 +.Jumptable: dw Function1161d5 dw Function116294 dw Function1162cb @@ -392,9 +382,8 @@ Function1161b8: ; 1161b8 dw Function1163c0 dw Function11636e dw Function116441 -; 1161d5 -Function1161d5: ; 1161d5 +Function1161d5: ld a, [rSVBK] push af @@ -504,16 +493,14 @@ Function1161d5: ; 1161d5 ld [$c319], a ret -; 11628c -MenuHeader_11628c: ; 11628c +MenuHeader_11628c: db MENU_BACKUP_TILES ; flags menu_coords 0, 6, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option -; 116294 -Function116294: ; 116294 +Function116294: farcall Function170d02 ld a, [$c319] inc a @@ -537,9 +524,8 @@ Function116294: ; 116294 ld [hWY], a ret -; 1162cb -Function1162cb: ; 1162cb +Function1162cb: farcall Function170cc6 ld a, [$c319] inc a @@ -557,9 +543,8 @@ Function1162cb: ; 1162cb ld [rSVBK], a ret -; 1162f2 -Function1162f2: ; 1162f2 +Function1162f2: call Function11659d call Function116758 call Function1167a6 @@ -648,9 +633,8 @@ Function1162f2: ; 1162f2 jr nz, .asm_11635a ret -; 11636e -Function11636e: ; 11636e +Function11636e: ld a, [rSVBK] push af ld a, $5 @@ -687,9 +671,8 @@ Function11636e: ; 11636e ld [wc30d], a ret -; 1163c0 -Function1163c0: ; 1163c0 +Function1163c0: ld a, [rSVBK] push af ld a, $1 @@ -746,9 +729,8 @@ Function1163c0: ; 1163c0 ld [wc30d], a ret -; 116441 -Function116441: ; 116441 +Function116441: farcall Function17d405 ld a, $90 ld [hWY], a @@ -764,9 +746,8 @@ Function116441: ; 116441 ld [wc30d], a ret -; 116468 -Function116468: ; 116468 +Function116468: call Function116567 ld a, [wc314] cp $d diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm index 5ee3ea1e84a..50950204fd3 100644 --- a/mobile/mobile_46.asm +++ b/mobile/mobile_46.asm @@ -1,11 +1,11 @@ SECTION "Mobile 46", ROMX -Function118000: ; 118000 +Function118000: ld a, $1 ld [wcd38], a jr asm_11800b -Function118007: ; 118007 +Function118007: xor a ld [wcd38], a @@ -44,11 +44,10 @@ asm_11800b ld [rSVBK], a call BattleTowerRoomMenu_Cleanup call ReturnToMapFromSubmenu -BattleTowerRoomMenu_DoNothing: ; 11805e (46:405e) +BattleTowerRoomMenu_DoNothing: ret -; 11805f -Function11805f: ; 11805f +Function11805f: ld a, $1 ld [wcd38], a call BattleTowerRoomMenu_InitRAM @@ -86,9 +85,8 @@ Function11805f: ; 11805f call BattleTowerRoomMenu_Cleanup call ReturnToMapFromSubmenu ret -; 1180b8 -Function1180b8: ; 1180b8 +Function1180b8: call BattleTowerRoomMenu_InitRAM ld a, $22 ld [wcd33], a @@ -132,17 +130,16 @@ Function1180b8: ; 1180b8 call BattleTowerRoomMenu_Cleanup call ReturnToMapFromSubmenu ret -; 11811a -Function11811a: ; 11811a +Function11811a: ld a, 1 ld [wcd38], a jr Function118125 -_BattleTowerRoomMenu: ; 118121 +_BattleTowerRoomMenu: xor a ld [wcd38], a -Function118125: ; 118125 +Function118125: call BattleTowerRoomMenu_InitRAM ld a, $3 ld [wcd33], a @@ -180,9 +177,8 @@ Function118125: ; 118125 call Function118180 call ReturnToMapFromSubmenu ret -; 118180 -Function118180: ; 118180 +Function118180: ld a, [wScriptVar] and a ret nz @@ -226,9 +222,8 @@ Function118180: ; 118180 ld [wc300], a ld [wScriptVar], a jr .reset_banks -; 1181da -Function1181da: ; 1181da +Function1181da: call BattleTowerRoomMenu_InitRAM ld a, $2 ld [wcd38], a @@ -266,9 +261,8 @@ Function1181da: ; 1181da call BattleTowerRoomMenu_Cleanup call ReturnToMapFromSubmenu ret -; 118233 -Function118233: ; 118233 +Function118233: call BattleTowerRoomMenu_InitRAM ld a, $1b ld [wcd33], a @@ -303,9 +297,8 @@ Function118233: ; 118233 ld [rSVBK], a call BattleTowerRoomMenu_Cleanup ret -; 118284 -Function118284: ; 118284 +Function118284: call BattleTowerRoomMenu_InitRAM ld a, $19 ld [wcd33], a @@ -339,10 +332,9 @@ Function118284: ; 118284 ld [rSVBK], a call BattleTowerRoomMenu_Cleanup ret -; 1182d5 (46:42d5) -Function1182d5: ; 1182d5 +Function1182d5: call BattleTowerRoomMenu_InitRAM ld a, $18 ld [wcd33], a @@ -378,9 +370,8 @@ Function1182d5: ; 1182d5 call BattleTowerRoomMenu_Cleanup call ReturnToMapFromSubmenu ret -; 118329 -Function118329: ; 118329 +Function118329: call BattleTowerRoomMenu_InitRAM ld a, $15 ld [wcd33], a @@ -415,9 +406,8 @@ Function118329: ; 118329 ld [rSVBK], a call BattleTowerRoomMenu_Cleanup ret -; 11837a -Function11837a: ; 11837a +Function11837a: call BattleTowerRoomMenu_InitRAM ld a, $16 ld [wcd33], a @@ -452,9 +442,8 @@ Function11837a: ; 11837a ld [rSVBK], a call BattleTowerRoomMenu_Cleanup ret -; 1183cb -BattleTowerRoomMenu_InitRAM: ; 1183cb +BattleTowerRoomMenu_InitRAM: di ld a, [rIE] ld [wcd32], a @@ -497,9 +486,8 @@ BattleTowerRoomMenu_InitRAM: ; 1183cb ld [$bfff], a call CloseSRAM ret -; 118440 -Function118440: ; 118440 +Function118440: push af ld a, $5 call GetSRAMBank @@ -509,9 +497,8 @@ Function118440: ; 118440 call CloseSRAM pop af ret -; 118452 -BattleTowerRoomMenu_Cleanup: ; 118452 +BattleTowerRoomMenu_Cleanup: di xor a ld [hMobileReceive], a @@ -528,9 +515,8 @@ BattleTowerRoomMenu_Cleanup: ; 118452 ld a, [wc300] ld [wScriptVar], a ret -; 118473 -Function118473: ; 118473 +Function118473: ld a, [wcd65] and a ret z @@ -559,13 +545,11 @@ Function118473: ; 118473 xor a ld [wcd65], a ret -; 1184a5 -Function1184a5: ; 1184a5 +Function1184a5: jumptable .Jumptable, wcf66 -; 1184b4 -.Jumptable: ; 1184b4 +.Jumptable: dw Function11886e dw Function118880 dw Function11878d @@ -594,13 +578,11 @@ Function1184a5: ; 1184a5 dw Function118e76 dw BattleTowerRoomMenu_CallRoomMenu2 dw Function118e76 -; 1184ec -Function1184ec: ; 1184ec +Function1184ec: jumptable .Jumptable, wcf66 -; 1184fb -.Jumptable: ; 1184fb +.Jumptable: dw Function11886e dw Function118880 dw Function11878d @@ -642,13 +624,11 @@ Function1184ec: ; 1184ec dw Function11878d dw Function119ac9 dw Function118e76 -; 11854d -BattleTowerRoomMenu_Jumptable: ; 11854d +BattleTowerRoomMenu_Jumptable: jumptable .Jumptable, wcf66 -; 11855c -.Jumptable: ; 11855c +.Jumptable: dw BattleTowerRoomMenu_PickLevelMessage dw BattleTowerRoomMenu_PlacePickLevelMenu dw BattleTowerRoomMenu_UpdatePickLevelMenu @@ -665,13 +645,11 @@ BattleTowerRoomMenu_Jumptable: ; 11854d dw Function118e76 ; mobile dw BattleTowerRoomMenu_CallRoomMenu2 ; mobile dw Function118e76 ; mobile -; 11857c -Function11857c: ; 11857c +Function11857c: jumptable .Jumptable, wcf66 -; 11858b -.Jumptable: ; 11858b +.Jumptable: dw Function11886e dw Function118880 dw Function11878d @@ -700,13 +678,11 @@ Function11857c: ; 11857c dw Function118e76 dw BattleTowerRoomMenu_CallRoomMenu2 dw Function118e76 -; 1185c3 -Function1185c3: ; 1185c3 +Function1185c3: jumptable .Jumptable, wcf66 -; 1185d2 -.Jumptable: ; 1185d2 +.Jumptable: dw Function11886e dw Function118880 dw Function11878d @@ -748,13 +724,11 @@ Function1185c3: ; 1185c3 dw BattleTowerRoomMenu_UpdateYesNoMenu dw Function11914e dw Function118e76 -; 118624 -Function118624: ; 118624 +Function118624: jumptable .Jumptable, wcf66 -; 118633 -.Jumptable: ; 118633 +.Jumptable: dw Function118866 dw Function118880 dw Function11878d @@ -786,13 +760,11 @@ Function118624: ; 118624 dw Function118e76 dw BattleTowerRoomMenu_CallRoomMenu2 dw Function118e76 -; 118671 -Function118671: ; 118671 +Function118671: jumptable .Jumptable, wcf66 -; 118680 -.Jumptable: ; 118680 +.Jumptable: dw Function118866 dw Function118880 dw Function11878d @@ -818,13 +790,11 @@ Function118671: ; 118671 dw Function118e76 dw BattleTowerRoomMenu_CallRoomMenu2 dw Function118e76 -; 1186b2 -Function1186b2: ; 1186b2 +Function1186b2: jumptable .Jumptable, wcf66 -; 1186c1 -.Jumptable: ; 1186c1 +.Jumptable: dw Function118866 dw Function118880 dw Function11878d @@ -851,13 +821,11 @@ Function1186b2: ; 1186b2 dw Function118e76 dw BattleTowerRoomMenu_CallRoomMenu2 dw Function118e76 -; 1186f5 -Function1186f5: ; 1186f5 (46:46f5) +Function1186f5: jumptable .Jumptable, wcf66 -; 118704 (46:4704) -.Jumptable: ; 118704 (46:4704) +.Jumptable: dw Function11886a dw Function118880 dw Function11878d @@ -891,13 +859,11 @@ Function1186f5: ; 1186f5 (46:46f5) dw Function118e76 dw BattleTowerRoomMenu_CallRoomMenu2 dw Function118e76 -; 118746 (46:4746) -Function118746: ; 118746 +Function118746: jumptable .Jumptable, wcf66 -; 118755 -.Jumptable: ; 118755 +.Jumptable: dw Function11886e dw Function118880 dw Function11878d @@ -926,9 +892,8 @@ Function118746: ; 118746 dw Function118e76 dw BattleTowerRoomMenu_CallRoomMenu2 dw Function118e76 -; 11878d -Function11878d: ; 11878d (46:478d) +Function11878d: ld a, [wc821] bit 1, a jr nz, .asm_1187af @@ -994,7 +959,7 @@ Function11878d: ; 11878d (46:478d) .asm_118803 ld a, $d3 -Function118805: ; 118805 (46:4805) +Function118805: ld [wc300], a xor a ld [wc301], a @@ -1007,7 +972,7 @@ Function118805: ; 118805 (46:4805) ld [wcf66], a ret -Function118821: ; 118821 (46:4821) +Function118821: ld a, [$c319] cp $3 jr c, .asm_11884a @@ -1029,9 +994,8 @@ Function118821: ; 118821 (46:4821) .asm_11884a and a ret -; 11884c (46:484c) -Function11884c: ; 11884c +Function11884c: ld a, [hJoyDown] cp $5 jr nz, .asm_118864 @@ -1047,16 +1011,14 @@ Function11884c: ; 11884c .asm_118864 and a ret -; 118866 Function118866: ld a, 2 jr asm_11886f -Function11886a: ; 11886a (46:486a) +Function11886a: ld a, 1 jr asm_11886f -; 11886e (46:486e) Function11886e: xor a @@ -1069,7 +1031,7 @@ asm_11886f ld a, [wcd33] ld [wMobileInactivityTimerSeconds], a -Function118880: ; 118880 (46:4880) +Function118880: call BattleTowerRoomMenu2 ret c xor a @@ -1079,9 +1041,8 @@ Function118880: ; 118880 (46:4880) ld hl, $46 ld a, $2 jp Function119e2b -; 118896 (46:4896) -Function118896: ; 118896 +Function118896: ld a, [wc821] bit 1, a jr nz, .asm_1188a5 @@ -1097,24 +1058,23 @@ Function118896: ; 118896 .asm_1188aa call BattleTowerRoomMenu_IncrementJumptable jp BattleTowerRoomMenu_IncrementJumptable -; 1188b0 -Function1188b0: ; 1188b0 (46:48b0) +Function1188b0: ld de, $c346 ld a, $c jp Function119e2b -Function1188b8: ; 1188b8 (46:48b8) +Function1188b8: ld de, wc3ac ld a, $e jp Function119e2b -Function1188c0: ; 1188c0 (46:48c0) +Function1188c0: ld de, wc3cd ld a, $10 jp Function119e2b -Function1188c8: ; 1188c8 (46:48c8) +Function1188c8: ld a, $1 ld [wcd65], a call Function1188e7 @@ -1131,7 +1091,7 @@ Function1188c8: ; 1188c8 (46:48c8) ld a, $6 jp Function119e2b -Function1188e7: ; 1188e7 (46:48e7) +Function1188e7: ld de, $c346 ld a, $5 call GetSRAMBank @@ -1150,7 +1110,7 @@ Function1188e7: ; 1188e7 (46:48e7) jr nz, .asm_1188fa ret -Function118903: ; 118903 (46:4903) +Function118903: ld a, [wc3f0] ld [$c319], a ld c, $1 @@ -1161,12 +1121,12 @@ Function118903: ; 118903 (46:4903) jp BattleTowerRoomMenu_IncrementJumptable -Function11891c: ; 11891c +Function11891c: call Function118b42 jp BattleTowerRoomMenu_IncrementJumptable -BattleTowerRoomMenu_PickLevelMessage: ; 118922 +BattleTowerRoomMenu_PickLevelMessage: ld a, [wcd38] and a jr nz, .asm_11892d @@ -1349,7 +1309,7 @@ BattleTowerRoomMenu_UpdatePickLevelMenu: -Function118a54: ; 118a54 +Function118a54: ld a, [wcd55] ld l, a ld a, [wcd56] @@ -1357,9 +1317,8 @@ Function118a54: ; 118a54 ld de, wc3ec ld bc, $0004 jp Function118ae4 -; 118a65 -Function118a65: ; 118a65 +Function118a65: ld hl, BattleDownloadURL ld de, wcc60 ld bc, $80 @@ -1367,9 +1326,8 @@ Function118a65: ; 118a65 ld de, w3_d000 ld bc, $1000 jp Function118b10 -; 118a7a -Function118a7a: ; 118a7a +Function118a7a: ld hl, BattleDownloadURL ld de, wcc60 ld bc, $80 @@ -1377,9 +1335,8 @@ Function118a7a: ; 118a7a ld de, w3_d000 ld bc, $1000 jp Function118b10 -; 118a8f -Function118a8f: ; 118a8f +Function118a8f: ld hl, ExchangeDownloadURL ld de, wcc60 ld bc, $80 @@ -1387,9 +1344,8 @@ Function118a8f: ; 118a8f ld de, w3_d000 ld bc, $1000 jp Function118b10 -; 118aa4 -Function118aa4: ; 118aa4 +Function118aa4: ld hl, NewsDownloadURL ld de, wcc60 ld bc, $80 @@ -1399,9 +1355,8 @@ Function118aa4: ; 118aa4 ld de, w3_d100 ld bc, $e00 jr Function118b10 -; 118abc -Function118abc: ; 118abc (46:4abc) +Function118abc: ld hl, MenuDownloadURL ld de, wcc60 ld bc, $80 @@ -1409,7 +1364,6 @@ Function118abc: ; 118abc (46:4abc) ld de, w3_d000 ld bc, $1000 jr Function118b10 -; 118ad0 (46:4ad0) Function118ad0: ld hl, IndexDownloadURL @@ -1449,7 +1403,6 @@ Function118ae4: pop bc ld a, $2a jp Function119e2b -; 118b10 Function118b10: push de @@ -1463,7 +1416,7 @@ Function118b10: ld a, $2a jp Function119e2b -Function118b24: ; 118b24 (46:4b24) +Function118b24: ld hl, $c346 ld a, $8 ld [hli], a @@ -1479,9 +1432,8 @@ Function118b24: ; 118b24 (46:4b24) ld [wcd89], a ld hl, $c346 ret -; 118b42 (46:4b42) -Function118b42: ; 118b42 +Function118b42: ld hl, wd002 ld a, l ld [wcd51], a @@ -1514,9 +1466,8 @@ Function118b42: ; 118b42 ld a, h ld [wcd60], a ret -; 118b8c -Function118b8c: ; 118b8c +Function118b8c: .asm_118b8c call Function118b9a ret nc @@ -1528,9 +1479,8 @@ Function118b8c: ; 118b8c ld [hli], a ld [hli], a ret -; 118b9a -Function118b9a: ; 118b9a +Function118b9a: ld a, h cp $e0 ret c @@ -1538,7 +1488,6 @@ Function118b9a: ; 118b9a call Function118805 and a ret -; 118ba5 charmap " ", $20 ; revert to ascii @@ -1559,7 +1508,7 @@ IndexDownloadURL: ; 0x118ce5 db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0 -Unreferenced_Function118d35: ; 118d35 +Unreferenced_Function118d35: ld hl, $d200 ld a, [wcd38] and a @@ -1600,9 +1549,8 @@ Unreferenced_Function118d35: ; 118d35 .asm_118d7b ld a, $d3 jp Function118805 -; 118d80 -Function118d80: ; 118d80 +Function118d80: call Function118e06 ld a, [wcd38] and a @@ -1662,9 +1610,8 @@ asm_118d9f ld bc, $0200 ld a, $2c jp Function119e2b -; 118ded -Function118ded: ; 118ded +Function118ded: ld a, [wcd38] and a jr z, .asm_118e03 @@ -1678,9 +1625,8 @@ Function118ded: ; 118ded .asm_118e03 jp BattleTowerRoomMenu_IncrementJumptable -; 118e06 -Function118e06: ; 118e06 +Function118e06: ld hl, wd002 ld a, [wcd38] and a @@ -1715,7 +1661,7 @@ Function118e06: ; 118e06 ld [hl], a jr asm_118e3e -Function118e39: ; 118e39 (46:4e39) +Function118e39: .asm_118e39 ld a, [hli] and a @@ -1755,33 +1701,32 @@ asm_118e3e inc de jr .asm_118e63 -Function118e6d: ; 118e6d (46:4e6d) +Function118e6d: xor a ld [wcd65], a ld a, $a jp Function119e2b -Function118e76: ; 118e76 (46:4e76) +Function118e76: ; Call $c in BattleTowerRoomMenu2 ld a, $c ld [wcd3c], a jp BattleTowerRoomMenu_IncrementJumptable -Function118e7e: ; 118e7e (46:4e7e) +Function118e7e: call BattleTowerRoomMenu2 ret c ld a, $36 jp Function119e2b -BattleTowerRoomMenu_CallRoomMenu2: ; 118e87 (46:4e87) +BattleTowerRoomMenu_CallRoomMenu2: call BattleTowerRoomMenu2 ret c ld a, [wcd33] ld [wcf66], a ret -; 118e92 (46:4e92) -Function118e92: ; 118e92 +Function118e92: call Function118440 call Function1191d3 ld a, [wcd53] @@ -1794,9 +1739,8 @@ Function118e92: ; 118e92 ld de, w3_d800 ld bc, $0800 jp Function118b10 -; 118eb0 -Function118eb0: ; 118eb0 +Function118eb0: call Function118440 ld hl, $d802 ld de, wBGMapBuffer @@ -1805,9 +1749,8 @@ Function118eb0: ; 118eb0 call Function1192cc ret c jp BattleTowerRoomMenu_IncrementJumptable -; 118ec6 -Function118ec6: ; 118ec6 +Function118ec6: call Function118440 call SpeechTextBox ld hl, $d80e @@ -1836,9 +1779,8 @@ Function118ec6: ; 118ec6 ld a, $1c ld [wcd47], a jp BattleTowerRoomMenu_IncrementJumptable -; 118f0d -Function118f0d: ; 118f0d +Function118f0d: call BattleTowerRoomMenu2 ret c call Function118440 @@ -1877,9 +1819,8 @@ Function118f14: ld a, $1c ld [wcd47], a jp BattleTowerRoomMenu_IncrementJumptable -; 118f5e -Function118f5e: ; 118f5e +Function118f5e: call BattleTowerRoomMenu2 ret c call Function118440 @@ -1929,9 +1870,8 @@ Function118f68: .asm_118fba call BattleTowerRoomMenu_IncrementJumptable jp BattleTowerRoomMenu_IncrementJumptable -; 118fc0 -Function118fc0: ; 118fc0 +Function118fc0: call Function118440 ld a, [wcd55] ld l, a @@ -2006,9 +1946,8 @@ Function119009: ld bc, $1000 ld a, $2c jp Function119e2b -; 119054 -Function119054: ; 119054 +Function119054: ld a, $6 call GetSRAMBank ld hl, wd002 @@ -2063,9 +2002,8 @@ Function119054: ; 119054 ld [rSVBK], a call CloseSRAM jp BattleTowerRoomMenu_IncrementJumptable -; 1190d0 -Function1190d0: ; 1190d0 +Function1190d0: ld a, $3 ld [rSVBK], a ld a, [wcd57] @@ -2078,9 +2016,8 @@ Function1190d0: ; 1190d0 ld de, w3_d000 ld bc, $1000 jp Function118b10 -; 1190ec -Function1190ec: ; 1190ec +Function1190ec: ld a, $5 call GetSRAMBank ld hl, wBGMapBuffer @@ -2123,9 +2060,8 @@ Function1190ec: ; 1190ec ld hl, Text_ReceivedNews call BattleTowerRoomMenu_SetMessage jp BattleTowerRoomMenu_IncrementJumptable -; 11914e -Function11914e: ; 11914e +Function11914e: call BattleTowerRoomMenu2 ret c ld a, $1c @@ -2133,9 +2069,8 @@ Function11914e: ; 11914e ld a, $a ld [wc300], a ret -; 11915d -Function11915d: ; 11915d +Function11915d: ld hl, $d802 ld de, wBGMapBuffer ld bc, $000c @@ -2165,9 +2100,8 @@ Function11915d: ; 11915d .asm_11918e call CloseSRAM ret -; 119192 -Function119192: ; 119192 +Function119192: inc b inc c jr .asm_11919e @@ -2193,9 +2127,8 @@ Function119192: ; 119192 call Function118805 scf ret -; 1191ad -Function1191ad: ; 1191ad +Function1191ad: push bc ld c, $0 ld a, $5 @@ -2224,9 +2157,8 @@ Function1191ad: ; 1191ad pop bc and a ret -; 1191d3 -Function1191d3: ; 1191d3 +Function1191d3: ld hl, w3_d100 + 2 ld a, l ld [wcd53], a @@ -2253,9 +2185,8 @@ Function1191d3: ; 1191d3 ld [wcd58], a call Function11920f ret -; 11920f -Function11920f: ; 11920f +Function11920f: .asm_11920f call Function118b9a ret nc @@ -2271,9 +2202,8 @@ Function11920f: ; 11920f ld [hli], a inc hl ret -; 119223 -Function119223: ; 119223 +Function119223: xor a ld [wcd4b], a ld [wcd4c], a @@ -2382,9 +2312,8 @@ Function119223: ; 119223 ld [wcd4e], a and a ret -; 1192cc -Function1192cc: ; 1192cc +Function1192cc: ld a, $5 call GetSRAMBank ld hl, $aa73 @@ -2414,9 +2343,8 @@ Function1192cc: ; 1192cc .asm_1192fe and a ret -; 119300 -Function119300: ; 119300 +Function119300: xor a ld [wcd4b], a ld [wcd4c], a @@ -2501,15 +2429,13 @@ Function119300: ; 119300 .asm_11937f ret -; 119380 -Function119380: ; 119380 +Function119380: ld a, $80 ld [wcd49], a jp BattleTowerRoomMenu_IncrementJumptable -; 119388 -Function119388: ; 119388 +Function119388: ld hl, wcd49 dec [hl] ret nz @@ -2554,9 +2480,8 @@ Function1193a0: ld bc, $0200 ld a, $2c jp Function119e2b -; 1193e3 -Function1193e3: ; 1193e3 +Function1193e3: ld hl, wcd49 dec [hl] ret nz @@ -2578,9 +2503,8 @@ Function1193fb: ld de, w3_d000 ld bc, $1000 jp Function118b10 -; 119413 -Function119413: ; 119413 +Function119413: ld a, $6 call GetSRAMBank ld a, [w3_d000] @@ -2614,9 +2538,8 @@ Function119413: ; 119413 ld [rSVBK], a call CloseSRAM jp BattleTowerRoomMenu_IncrementJumptable -; 119451 -Function119451: ; 119451 (46:5451) +Function119451: ld a, [wcd89] and $1 jr z, .asm_11945d @@ -2632,7 +2555,7 @@ Function119451: ; 119451 (46:5451) ld a, [wd002] ld hl, wd003 -Function119471: ; 119471 (46:5471) +Function119471: push af ld a, [hli] ld [$c608], a @@ -2813,7 +2736,7 @@ endr call Function1195c4 ret -Function119584: ; 119584 (46:5584) +Function119584: ld a, [$c608] ld b, a ld a, [$c608 + 3] @@ -2858,7 +2781,7 @@ Function119584: ; 119584 (46:5584) and a ret -Function1195c4: ; 1195c4 (46:55c4) +Function1195c4: ld a, [hli] ld c, a ld a, [hli] @@ -2891,7 +2814,7 @@ Function1195c4: ; 1195c4 (46:55c4) ld a, $d8 jp Function118805 -Function1195f8: ; 1195f8 (46:55f8) +Function1195f8: ld a, $11 ld [wcd3c], a ld a, $1c @@ -2903,7 +2826,7 @@ Function1195f8: ; 1195f8 (46:55f8) call BattleTowerRoomMenu_IncrementJumptable jp BattleTowerRoomMenu_IncrementJumptable -Function119612: ; 119612 (46:5612) +Function119612: ld a, $14 ld [wcd3c], a ld a, $1c @@ -2914,7 +2837,7 @@ Function119612: ; 119612 (46:5612) ld [wcd47], a jp BattleTowerRoomMenu_IncrementJumptable -Function119629: ; 119629 (46:5629) +Function119629: call BattleTowerRoomMenu2 ret c ld a, $60 @@ -2930,7 +2853,7 @@ Function119629: ; 119629 (46:5629) ld [wcd47], a call BattleTowerRoomMenu_IncrementJumptable -Function119648: ; 119648 (46:5648) +Function119648: call BattleTowerRoomMenu2 ret c call DelayFrame @@ -2943,12 +2866,12 @@ Function119648: ; 119648 (46:5648) ld a, $2a jp Function119e2b -Function119665: ; 119665 (46:5665) +Function119665: ld a, $1a ld [wcd3c], a call BattleTowerRoomMenu_IncrementJumptable -Function11966d: ; 11966d (46:566d) +Function11966d: call BattleTowerRoomMenu2 ret c ld a, [wcd47] @@ -2957,12 +2880,12 @@ Function11966d: ; 11966d (46:566d) ld [wc300], a ret -Function11967d: ; 11967d (46:567d) +Function11967d: ld a, $18 ld [wcd3c], a call BattleTowerRoomMenu_IncrementJumptable -Function119685: ; 119685 (46:5685) +Function119685: call BattleTowerRoomMenu2 ret c ld a, $14 @@ -2971,7 +2894,7 @@ Function119685: ; 119685 (46:5685) ld [wc300], a ret -Function119694: ; 119694 (46:5694) +Function119694: ld b, 0 ld hl, Unknown_1196b8 .asm_119699 @@ -3002,9 +2925,8 @@ Function119694: ; 119694 (46:5694) cp $7 jr nz, .asm_119699 ret -; 1196b8 (46:56b8) -Unknown_1196b8: ; 1196b8 +Unknown_1196b8: db "Mon" db "Tue" db "Wed" @@ -3012,13 +2934,12 @@ Unknown_1196b8: ; 1196b8 db "Fri" db "Sat" db "Sun" -; 1196cd SECTION "Mobile 46 ASCII", ROMX ; A hack to use ascii above. -Function1196cd: ; 1196cd (46:56cd) +Function1196cd: ld de, $c719 call Function1196de ld [wcd4a], a @@ -3027,7 +2948,7 @@ Function1196cd: ; 1196cd (46:56cd) ld [wcd4b], a ret -Function1196de: ; 1196de (46:56de) +Function1196de: ld a, [de] inc de ; b = ([de] - 48) * 2 @@ -3045,9 +2966,8 @@ Function1196de: ; 1196de (46:56de) sub $30 add c ret -; 1196f2 (46:56f2) -Function1196f2: ; 1196f2 +Function1196f2: ld hl, wd002 .asm_1196f5 call Function118b9a @@ -3169,9 +3089,8 @@ Function1196f2: ; 1196f2 call Function1197bf ld [hli], a jp BattleTowerRoomMenu_IncrementJumptable -; 119798 -Function119798: ; 119798 +Function119798: ld d, $0 ld e, d call Function1197b4 @@ -3189,9 +3108,8 @@ Function119798: ; 119798 or e ld e, a ret -; 1197b4 -Function1197b4: ; 1197b4 +Function1197b4: ld a, [hli] cp $61 jr nc, .asm_1197bc @@ -3201,9 +3119,8 @@ Function1197b4: ; 1197b4 .asm_1197bc sub $57 ret -; 1197bf -Function1197bf: ; 1197bf +Function1197bf: cp $a jr nc, .asm_1197c6 add $30 @@ -3212,9 +3129,8 @@ Function1197bf: ; 1197bf .asm_1197c6 add $57 ret -; 1197c9 -Function1197c9: ; 1197c9 +Function1197c9: ld hl, wd002 call Function118e39 ld a, $9 @@ -3239,9 +3155,8 @@ Function1197dc: ld bc, $1000 ld a, $2a jp Function119e2b -; 119800 -Function119800: ; 119800 +Function119800: ld a, $fd ld [$c6d0], a ld [wOTTrademonSpecies], a @@ -3273,9 +3188,8 @@ Function119800: ; 119800 ld [wJumptableIndex], a farcall Function115dc3 jp BattleTowerRoomMenu_IncrementJumptable -; 11984e -Function11984e: ; 11984e +Function11984e: ld a, [wcd80] and a jr nz, .asm_1198a0 @@ -3343,9 +3257,8 @@ Function11984e: ; 11984e ld [wJumptableIndex], a farcall Function115dc3 jp BattleTowerRoomMenu_IncrementJumptable -; 1198ee -Function1198ee: ; 1198ee +Function1198ee: ld hl, Text_RegisteringRecord call BattleTowerRoomMenu_SetMessage call BattleTowerRoomMenu_IncrementJumptable @@ -3382,14 +3295,12 @@ Function1198f7: ld bc, $0200 ld a, $2c jp Function119e2b -; 119937 -Function119937: ; 119937 +Function119937: farcall Function1707f4 jp BattleTowerRoomMenu_IncrementJumptable -; 119940 -Function119940: ; 119940 +Function119940: ld de, wc3cd ld c, $1e .asm_119945 @@ -3408,9 +3319,8 @@ Function119940: ; 119940 .asm_119953 ret -; 119954 -Function119954: ; 119954 +Function119954: ld a, $1c ld [wcd3c], a call BattleTowerRoomMenu2 @@ -3426,9 +3336,8 @@ Function119954: ; 119954 ld hl, $c608 ld a, $1e jp Function119e2b -; 119973 -Function119973: ; 119973 +Function119973: ld a, $1 ld [wcf64], a xor a @@ -3437,9 +3346,8 @@ Function119973: ; 119973 ld de, w3_d000 ld a, $20 jp Function119e2b -; 119987 -Function119987: ; 119987 +Function119987: ld hl, w3_d000 + 1 ld a, [w3_d000] or [hl] @@ -3464,9 +3372,8 @@ Function119987: ; 119987 ld a, $1b ld [wcf66], a ret -; 1199b4 -Function1199b4: ; 1199b4 +Function1199b4: ld a, [w3_d081+1] and a jr nz, .asm_1199c7 @@ -3478,9 +3385,8 @@ Function1199b4: ; 1199b4 .asm_1199c7 jp Function119ac9 -; 1199ca -Function1199ca: ; 1199ca +Function1199ca: ld a, $20 ld [wcd89], a ld a, [wcf64] @@ -3491,9 +3397,8 @@ Function1199ca: ; 1199ca ld bc, $0700 ld a, $28 jp Function119e2b -; 1199e2 -Function1199e2: ; 1199e2 +Function1199e2: ld c, $c ld de, XGameCodePrefix call Function119e4f @@ -3624,15 +3529,13 @@ Function119ac9: ld a, $10 ld [wcf66], a ret -; 119af1 XGameCode: INCBIN "data/mobile/x-game-code.txt" XGameResult: INCBIN "data/mobile/x-game-result.txt" -; 119b0d -Function119b0d: ; 119b0d +Function119b0d: ld a, $8 ld [wcd3c], a call BattleTowerRoomMenu2 @@ -3671,9 +3574,8 @@ Function119b45: asm_119b4d ld a, $26 jp Function119e2b -; 119b52 -Function119b52: ; 119b52 +Function119b52: ld a, [w3_d090] cp $1 jr nz, .asm_119b66 @@ -3686,9 +3588,8 @@ Function119b52: ; 119b52 .asm_119b66 ld a, $1c jp Function119e2b -; 119b6b -Function119b6b: ; 119b6b +Function119b6b: ld a, [w3_d090] cp $1 jr z, .asm_119b75 @@ -3816,9 +3717,8 @@ Function119b6b: ; 119b6b ld bc, $0069 call CopyBytes jp BattleTowerRoomMenu_IncrementJumptable -; 119c3e -Function119c3e: ; 119c3e +Function119c3e: cp $2b jr c, .asm_119c68 jr z, .asm_119c80 @@ -3883,9 +3783,8 @@ Function119c3e: ; 119c3e sub $47 and a ret -; 119c97 -BattleTowerRoomMenu_UberRestrictionMessage: ; 119c97 +BattleTowerRoomMenu_UberRestrictionMessage: ld hl, Text_UberRestriction call BattleTowerRoomMenu_SetMessage call BattleTowerRoomMenu_IncrementJumptable @@ -3914,9 +3813,8 @@ BattleTowerRoomMenu_DelayRestartMenu: ld a, $0 ld [wcf66], a ret -; 119cc3 -BattleTowerRoomMenu_QuitMessage: ; 119cc3 +BattleTowerRoomMenu_QuitMessage: ld a, [wcd38] and a jr z, .asm_119cd1 @@ -3951,26 +3849,23 @@ BattleTowerRoomMenu_UpdateYesNoMenu: ld a, [wMobileInactivityTimerFrames] ld [wcf66], a ret -; 119cf7 -MenuHeader_119cf7: ; 119cf7 +MenuHeader_119cf7: db MENU_BACKUP_TILES ; flags menu_coords 12, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 0 ; default option -; 119cff -MenuData_119cff: ; 119cff +MenuData_119cff: db MENU_BACKUP_TILES ; flags menu_coords 15, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 0 ; default option -; 119d07 String_119d07: db " ▼@" -Strings_L10ToL100: ; 119d0c +Strings_L10ToL100: db " L:10 @@" db " L:20 @@" db " L:30 @@" @@ -3983,7 +3878,7 @@ Strings_L10ToL100: ; 119d0c db " L:100@@" db "CANCEL@@" -Strings_Ll0ToL40: ; 119d64 +Strings_Ll0ToL40: db " L:10 @@" db " L:20 @@" db " L:30 @@" @@ -3992,9 +3887,8 @@ Strings_Ll0ToL40: ; 119d64 String_119d8c: db "CANCEL@" -; 119d93 -BattleTower_LevelCheck: ; 119d93 (46:5d93) +BattleTower_LevelCheck: ld a, [rSVBK] push af ld a, $1 @@ -4038,7 +3932,7 @@ BattleTower_LevelCheck: ; 119d93 (46:5d93) scf ret -BattleTower_UbersCheck: ; 119dd1 (46:5dd1) +BattleTower_UbersCheck: ld a, [rSVBK] push af ld a, [wcd4f] @@ -4092,26 +3986,22 @@ BattleTower_UbersCheck: ; 119dd1 (46:5dd1) ld [rSVBK], a scf ret -; 119e2b (46:5e2b) -Function119e2b: ; 119e2b (46:5e2b) +Function119e2b: call Function3e32 -BattleTowerRoomMenu_IncrementJumptable: ; 119e2e (46:5e2e) +BattleTowerRoomMenu_IncrementJumptable: ld hl, wcf66 inc [hl] ret -; 119e33 (46:5e33) -XGameCodePrefix: ; 119e33 +XGameCodePrefix: INCBIN "data/mobile/x-game-code-prefix.txt" -;119e40 -XGameResultPrefix: ; 119e40 +XGameResultPrefix: INCBIN "data/mobile/x-game-result-prefix.txt" -; 119e4f -Function119e4f: ; 119e4f +Function119e4f: push bc ld hl, w3_d100 ld a, [hli] @@ -4173,9 +4063,8 @@ Function119e4f: ; 119e4f .finish and a ret -; 119e8e -Function119e8e: ; 119e8e +Function119e8e: cp $60 jr c, .less_than_0x60 sub $57 @@ -4184,9 +4073,8 @@ Function119e8e: ; 119e8e .less_than_0x60 sub $30 ret -; 119e98 -Function119e98: ; 119e98 +Function119e98: ld a, $2 .loop push af @@ -4210,9 +4098,8 @@ Function119e98: ; 119e98 and a jr nz, .loop ret -; 119eb4 -Function119eb4: ; 119eb4 (46:5eb4) +Function119eb4: xor a ld [wc3cc], a ld de, wc3ac @@ -4224,7 +4111,7 @@ Function119eb4: ; 119eb4 (46:5eb4) jr nz, .loop ret -Function119ec2: ; 119ec2 (46:5ec2) +Function119ec2: ld a, BANK(sMobileLoginPassword) call GetSRAMBank xor a @@ -4239,7 +4126,7 @@ Function119ec2: ; 119ec2 (46:5ec2) call CloseSRAM ret -BattleTowerRoomMenu2: ; 119ed8 (46:5ed8) +BattleTowerRoomMenu2: ld a, [rSVBK] ld [wcd8c], a ld a, $1 @@ -4290,23 +4177,20 @@ BattleTowerRoomMenu2: ; 119ed8 (46:5ed8) dw Function11a4fe dw Function11a466 dw Function11a47a -; 119f3f -Function119f3f: ; 119f3f +Function119f3f: call Function11a5b9 jp BattleTowerRoomMenu2_IncrementJumptable -; 119f45 -Function119f45: ; 119f45 +Function119f45: hlcoord 4, 2 ld de, String_11a661 call PlaceString ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 119f56 -Function119f56: ; 119f56 +Function119f56: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_119f62 @@ -4323,9 +4207,8 @@ Function119f56: ; 119f56 ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 119f76 -Function119f76: ; 119f76 +Function119f76: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_119f82 @@ -4343,9 +4226,8 @@ Function119f76: ; 119f76 xor a ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 119f98 -Function119f98: ; 119f98 +Function119f98: call Function11a536 ret c call PlayClickSFX @@ -4393,9 +4275,8 @@ Function119f98: ; 119f98 ld [wc300], a scf ret -; 11a00e -Function11a00e: ; 11a00e +Function11a00e: ld a, BANK(sMobileLoginPassword) call GetSRAMBank ld a, [sMobileLoginPassword] @@ -4467,9 +4348,8 @@ Function11a00e: ; 11a00e ld a, $1 ld [wc305], a ret -; 11a0ca -Function11a0ca: ; 11a0ca +Function11a0ca: xor a ld [wMenuBorderLeftCoord], a ld [wMenuBorderTopCoord], a @@ -4490,9 +4370,8 @@ Function11a0ca: ; 11a0ca ld a, $1 ld [wc305], a ret -; 11a113 -Function11a113: ; 11a113 +Function11a113: call Function11a63c ld c, $1 farcall Function115e18 @@ -4501,15 +4380,13 @@ Function11a113: ; 11a113 call PlaceString and a ret -; 11a129 -Function11a129: ; 11a129 +Function11a129: ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a131 -Function11a131: ; 11a131 +Function11a131: ld hl, wMobileInactivityTimerMinutes dec [hl] ret nz @@ -4524,9 +4401,8 @@ Function11a13d: call PlaceString and a ret -; 11a14b -Function11a14b: ; 11a14b +Function11a14b: ld hl, wcd85 ld a, [hl] cp $f3 @@ -4544,9 +4420,8 @@ Function11a14b: ; 11a14b ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a16d -Function11a16d: ; 11a16d +Function11a16d: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_11a179 @@ -4565,9 +4440,8 @@ Function11a16d: ; 11a16d xor a ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a192 -Function11a192: ; 11a192 +Function11a192: call Function11a536 ret c call PlayClickSFX @@ -4595,9 +4469,8 @@ Function11a192: ; 11a192 call PlaceString scf ret -; 11a1d6 -Function11a1d6: ; 11a1d6 +Function11a1d6: ld a, [wcd85] cp $50 jr nz, .asm_11a1e4 @@ -4609,9 +4482,8 @@ Function11a1d6: ; 11a1d6 .asm_11a1e4 and a ret -; 11a1e6 -Function11a1e6: ; 11a1e6 +Function11a1e6: ld hl, String_11a706 ld de, $c346 call Function11a1ff @@ -4622,9 +4494,8 @@ Function11a1e6: ; 11a1e6 ld a, $50 ld [de], a ret -; 11a1ff -Function11a1ff: ; 11a1ff +Function11a1ff: .asm_11a1ff ld a, [hli] cp $50 @@ -4632,9 +4503,8 @@ Function11a1ff: ; 11a1ff ld [de], a inc de jr .asm_11a1ff -; 11a207 -BattleTowerRoomMenu2_PlaceYesNoMenu: ; 11a207 +BattleTowerRoomMenu2_PlaceYesNoMenu: ld hl, MenuHeader_11a2de call LoadMenuHeader call MenuBox @@ -4652,9 +4522,8 @@ BattleTowerRoomMenu2_PlaceYesNoMenu: ; 11a207 xor a ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a235 -BattleTowerRoomMenu2_UpdateYesNoMenu: ; 11a235 +BattleTowerRoomMenu2_UpdateYesNoMenu: ld hl, hJoyPressed ld a, [hl] and A_BUTTON @@ -4741,31 +4610,26 @@ BattleTowerRoomMenu2_UpdateYesNoMenu: ; 11a235 farcall ReloadMapPart and a ret -; 11a2cf -String_11a2cf: ; 11a2cf +String_11a2cf: db "YES@" -; 11a2d3 -String_11a2d3: ; 11a2d3 +String_11a2d3: db "NO@" -; 11a2d6 -MenuHeader_11a2d6: ; 11a2d6 +MenuHeader_11a2d6: db MENU_BACKUP_TILES ; flags menu_coords 14, 6, SCREEN_WIDTH - 1, 10 dw NULL db 0 ; default option -; 11a2de -MenuHeader_11a2de: ; 11a2de +MenuHeader_11a2de: db MENU_BACKUP_TILES ; flags menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 0 ; default option -; 11a2e6 -Function11a2e6: ; 11a2e6 +Function11a2e6: call Function11a63c ld c, $2 farcall Function115e18 @@ -4775,9 +4639,8 @@ Function11a2e6: ; 11a2e6 ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a302 -Function11a302: ; 11a302 +Function11a302: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_11a30e @@ -4802,9 +4665,8 @@ Function11a302: ; 11a302 ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a33a -Function11a33a: ; 11a33a +Function11a33a: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_11a346 @@ -4819,9 +4681,8 @@ Function11a33a: ; 11a33a farcall Function115dc3 and a ret -; 11a357 -Function11a357: ; 11a357 +Function11a357: call Function11a63c hlcoord 4, 2 ld de, String_11a743 @@ -4829,9 +4690,8 @@ Function11a357: ; 11a357 ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a36b -Function11a36b: ; 11a36b +Function11a36b: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_11a377 @@ -4849,9 +4709,8 @@ Function11a36b: ; 11a36b xor a ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a38d -Function11a38d: ; 11a38d +Function11a38d: call Function11a536 ret c call PlayClickSFX @@ -4875,9 +4734,8 @@ Function11a38d: ; 11a38d ld [wcd80], a scf ret -; 11a3c5 -Function11a3c5: ; 11a3c5 +Function11a3c5: call Function11a63c hlcoord 4, 2 ld de, String_11a762 @@ -4885,9 +4743,8 @@ Function11a3c5: ; 11a3c5 ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a3d9 -Function11a3d9: ; 11a3d9 +Function11a3d9: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_11a3e5 @@ -4904,9 +4761,8 @@ Function11a3d9: ; 11a3d9 ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a3f9 -Function11a3f9: ; 11a3f9 +Function11a3f9: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_11a405 @@ -4924,9 +4780,8 @@ Function11a3f9: ; 11a3f9 xor a ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a41b -Function11a41b: ; 11a41b +Function11a41b: call Function11a536 ret c call PlayClickSFX @@ -4950,9 +4805,8 @@ Function11a41b: ; 11a41b ld [wcd80], a scf ret -; 11a452 -Function11a452: ; 11a452 +Function11a452: call Function11a63c hlcoord 4, 2 ld de, String_11a791 @@ -4960,9 +4814,8 @@ Function11a452: ; 11a452 ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a466 -Function11a466: ; 11a466 +Function11a466: call Function11a63c hlcoord 4, 2 ld de, String_11a7c1 @@ -4970,9 +4823,8 @@ Function11a466: ; 11a466 ld a, $80 ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a47a -Function11a47a: ; 11a47a +Function11a47a: ld a, [wMobileInactivityTimerMinutes] and a jr z, .asm_11a486 @@ -4984,9 +4836,8 @@ Function11a47a: ; 11a47a .asm_11a486 and a ret -; 11a488 -Function11a488: ; 11a488 +Function11a488: call Function11a63c hlcoord 4, 2 ld de, String_11a7ac @@ -4995,9 +4846,8 @@ Function11a488: ; 11a488 xor a ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a49e -Function11a49e: ; 11a49e +Function11a49e: call Function11a536 ret c call PlayClickSFX @@ -5023,17 +4873,15 @@ Function11a49e: ; 11a49e ld [wcd80], a scf ret -; 11a4db -Function11a4db: ; 11a4db +Function11a4db: call Function11a63c ld de, String_11a6db hlcoord 4, 2 call PlaceString ret -; 11a4e8 -Function11a4e8: ; 11a4e8 +Function11a4e8: call Function11a63c hlcoord 4, 2 ld de, String_11a7d7 @@ -5042,9 +4890,8 @@ Function11a4e8: ; 11a4e8 xor a ld [wMobileInactivityTimerMinutes], a jp BattleTowerRoomMenu2_IncrementJumptable -; 11a4fe -Function11a4fe: ; 11a4fe +Function11a4fe: call Function11a536 ret c call PlayClickSFX @@ -5068,9 +4915,8 @@ Function11a4fe: ; 11a4fe ld [wcd80], a scf ret -; 11a536 -Function11a536: ; 11a536 +Function11a536: ld hl, hJoyPressed ld a, [hl] and $1 @@ -5141,17 +4987,15 @@ Function11a536: ; 11a536 ld [wcd8b], a and a ret -; 11a5b0 -BattleTowerRoomMenu2_IncrementJumptable: ; 11a5b0 +BattleTowerRoomMenu2_IncrementJumptable: ld a, [wcd3c] inc a ld [wcd3c], a scf ret -; 11a5b9 -Function11a5b9: ; 11a5b9 +Function11a5b9: xor a ld [wMenuBorderLeftCoord], a ld [wMenuBorderTopCoord], a @@ -5174,9 +5018,8 @@ Function11a5b9: ; 11a5b9 ld a, $1 ld [wc305], a ret -; 11a5f5 -Function11a5f5: ; 11a5f5 +Function11a5f5: ld a, $e ld [wMenuBorderLeftCoord], a ld a, $13 @@ -5204,9 +5047,8 @@ Function11a5f5: ; 11a5f5 ld [hl], a farcall ReloadMapPart ret -; 11a63c -Function11a63c: ; 11a63c +Function11a63c: hlcoord 4, 1 ld de, String_11a7f4 call PlaceString @@ -5220,115 +5062,92 @@ Function11a63c: ; 11a63c ld de, String_11a7f4 call PlaceString ret -; 11a661 -String_11a661: ; 11a661 +String_11a661: db "これから モバイルセンターに" next "でんわかけます@" -; 11a679 -String_11a679: ; 11a679 +String_11a679: db "モバイルアダプタじゅんびは" next "できて いますか?@" -; 11a692 -String_11a692: ; 11a692 +String_11a692: db "でんわかけています" next "しばらく おまちください@" -; 11a6aa -String_11a6aa: ; 11a6aa +String_11a6aa: db "でんわをかけると つうわりょう" next "せつぞくりょうかかります@" -; 11a6c8 -String_11a6c8: ; 11a6c8 +String_11a6c8: db "せつぞく しました@" -; 11a6d2 -String_11a6d2: ; 11a6d2 +String_11a6d2: db "つうしん ちゅう@" -; 11a6db -String_11a6db: ; 11a6db +String_11a6db: db "つうしん ちゅう" next "セレクト エーでちゅうし@" -; 11a6f1 -String_11a6f1: ; 11a6f1 +String_11a6f1: db "この サービスには" next "つうわりょうほかに@" -; 11a706 -String_11a706: ; 11a706 +String_11a706: db "おかね@" -; 11a70b -String_11a70b: ; 11a70b +String_11a70b: db "えん" next "かかります よろしい ですか?@" -; 11a71e -String_11a71e: ; 11a71e +String_11a71e: db "つうしん しゅうりょう@" -; 11a72a -String_11a72a: ; 11a72a +String_11a72a: db "つないだ じかん" next "  やく   ふん   びょう@" -; 11a743 -String_11a743: ; 11a743 +String_11a743: db "もっていない データが" next "あります!@" -; 11a755 -String_11a755: ; 11a755 +String_11a755: db "データよみこみますか?@" -; 11a762 -String_11a762: ; 11a762 +String_11a762: db "おなじ データよみこんだ" next "ことありますが@" -; 11a779 -String_11a779: ; 11a779 +String_11a779: db "そのデータなくなっているか" next "こわれて います@" -; 11a791 -String_11a791: ; 11a791 +String_11a791: db "もっている データと" next "おなじデータしか ありません!@" -; 11a7ac -String_11a7ac: ; 11a7ac +String_11a7ac: db "データよみこみを" next "ちゅうし しますか?@" -; 11a7c1 String_11a7c1: ; 11a7c1 ; new news? db "あたらしい ニュースは" next "ありません でした@" -; 11a7d7 -String_11a7d7: ; 11a7d7 +String_11a7d7: db "あたらしいニュースあります" next "ニュースよみこみますか?@" -; 11a7f4 -String_11a7f4: ; 11a7f4 +String_11a7f4: db "               @" -; 11a804 -MenuHeader_11a804: ; 11a804 +MenuHeader_11a804: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, SCREEN_WIDTH - 1, 5 dw NULL db 0 ; default option -; 11a80c -Function11a80c: ; 11a80c +Function11a80c: ld de, hDivisor ld bc, hDividend ld hl, Unknown_11a89a @@ -5386,18 +5205,16 @@ Function11a80c: ; 11a80c call Function11a884 ld [wcd64], a ret -; 11a884 -Function11a884: ; 11a884 +Function11a884: add e cp $a ret c sub $a inc b ret -; 11a88c -Function11a88c: ; 11a88c +Function11a88c: ld a, [bc] sla a ld c, a @@ -5411,41 +5228,37 @@ Function11a88c: ; 11a88c ld [de], a inc de ret -; 11a89a -Unknown_11a89a: ; 11a89a +Unknown_11a89a: x = 0 rept 16 bcd x % 100, x / 100 x = x + 1 endr -Unknown_11a8ba: ; 11a8ba +Unknown_11a8ba: x = 0 rept 16 bcd x % 100, x / 100 x = x + 16 endr -Unknown_11a8da: ; 11a8da +Unknown_11a8da: x = 0 rept 16 bcd x % 100, x / 100 x = x + 256 endr -; 11a8fa -BattleTowerRoomMenu_WriteMessage: ; 11a8fa +BattleTowerRoomMenu_WriteMessage: jumptable .Jumptable, $c31a -; 11a909 -.Jumptable: ; 11a909 +.Jumptable: dw BattleTowerRoomMenu_WriteMessage_DoNothing dw Function11a90f dw Function11a971 -; 11a90f -Function11a90f: ; 11a90f +Function11a90f: ld a, $1 ld [rSVBK], a call SpeechTextBox @@ -5505,9 +5318,8 @@ Function11a90f: ; 11a90f BattleTowerRoomMenu_WriteMessage_DoNothing: ret -; 11a971 -Function11a971: ; 11a971 +Function11a971: ld hl, $c31f ld a, [hJoyDown] and a @@ -5554,9 +5366,8 @@ Function11a971: ; 11a971 .asm_11a9bf ret -; 11a9c0 -BattleTowerRoomMenu_SetMessage: ; 11a9c0 +BattleTowerRoomMenu_SetMessage: ld a, l ld [$c31b], a ld a, h @@ -5564,9 +5375,8 @@ BattleTowerRoomMenu_SetMessage: ; 11a9c0 ld a, $1 ld [$c31a], a ret -; 11a9ce -Function11a9ce: ; 11a9ce +Function11a9ce: call ClearBGPalettes call ReloadTilesetAndPalettes call Call_ExitMenu @@ -5576,15 +5386,13 @@ Function11a9ce: ; 11a9ce farcall FinishExitMenu call UpdateSprites ret -; 11a9f0 -Function11a9f0: ; 11a9f0 +Function11a9f0: ld a, $1 and a ret -; 11a9f4 -Function11a9f4: ; 11a9f4 +Function11a9f4: ld a, [wcd8a] ld l, a ld a, [wcd8b] @@ -5602,7 +5410,6 @@ Function11a9f4: ; 11a9f4 call Function118805 and a ret -; 11aa13 Text_SaveFileWillBeSent: ; 0x11aa13 text "SAVE FILE will be" @@ -5722,16 +5529,15 @@ Text_ThisBattleRoomPleaseWait: ; 0x11ac1f done ; 0x11ac3e -Function11ac3e: ; 11ac3e +Function11ac3e: call SpeechTextBox call FadeToMenu callfar ClearSpriteAnims2 call Function11ac51 call CloseSubmenu ret -; 11ac51 -Function11ac51: ; 11ac51 +Function11ac51: xor a ld [hBGMapMode], a ld hl, wOptions @@ -5778,9 +5584,8 @@ Function11ac51: ; 11ac51 pop af ld [wOptions], a ret -; 11acb7 -Function11acb7: ; 11acb7 +Function11acb7: ld hl, TilemapPack_11ba44 ld a, [wcd49] ld c, a @@ -5831,9 +5636,8 @@ Function11acb7: ; 11acb7 xor a ld [wcd4a], a ret -; 11ad1b -Function11ad1b: ; 11ad1b +Function11ad1b: call ClearBGPalettes call ClearSprites call ClearTileMap @@ -5866,16 +5670,14 @@ Function11ad1b: ; 11ad1b ld [wc7d4], a farcall Pokedex_OrderMonsByMode ret -; 11ad6e -Function11ad6e: ; 11ad6e +Function11ad6e: ld a, [wJumptableIndex] ld hl, Jumptable_11ad78 call Function11b239 jp hl -; 11ad78 -Jumptable_11ad78: ; 11ad78 +Jumptable_11ad78: dw Function11b082 dw Function11b0ff dw Function11ad95 @@ -5885,21 +5687,18 @@ Jumptable_11ad78: ; 11ad78 dw Function11ad8f dw Function11af04 dw Function11af4e -; 11ad8a -Function11ad8a: ; 11ad8a +Function11ad8a: ld hl, wJumptableIndex inc [hl] ret -; 11ad8f -Function11ad8f: ; 11ad8f +Function11ad8f: ld hl, wJumptableIndex set 7, [hl] ret -; 11ad95 -Function11ad95: ; 11ad95 +Function11ad95: ld hl, MenuHeader_11ae38 call LoadMenuHeader call MenuBox @@ -5990,23 +5789,20 @@ Function11adc4: call ExitMenu farcall ReloadMapPart ret -; 11ae38 -MenuHeader_11ae38: ; 11ae38 +MenuHeader_11ae38: db MENU_BACKUP_TILES ; flags menu_coords 10, 10, 17, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option -; 11ae40 -String_11ae40: ; 11ae40 +String_11ae40: db "どちらでも" next "♂オス" next "♀メス" db "@" -; 11ae4e -Function11ae4e: ; 11ae4e +Function11ae4e: ld hl, MenuHeader_11afe8 call LoadMenuHeader call MenuBox @@ -6095,9 +5891,8 @@ Function11ae98: call ExitMenu farcall ReloadMapPart ret -; 11af04 -Function11af04: ; 11af04 +Function11af04: ld hl, MenuHeader_11afe8 call LoadMenuHeader call MenuBox @@ -6186,9 +5981,8 @@ Function11af4e: call ExitMenu farcall ReloadMapPart ret -; 11afb7 -Function11afb7: ; 11afb7 +Function11afb7: ld e, $ed jr asm_11afbd @@ -6208,7 +6002,6 @@ asm_11afbd: ld d, [hl] ld [de], a ret -; 11afcc Unknown_11afcc: dwcoord 11, 12 @@ -6218,9 +6011,8 @@ Unknown_11afcc: Unknown_11afd2: dwcoord 15, 8 dwcoord 15, 10 -; 11afd6 -Function11afd6: ; 11afd6 +Function11afd6: ld de, SCREEN_WIDTH ld a, $3 .row @@ -6236,38 +6028,32 @@ Function11afd6: ; 11afd6 dec b jr nz, .row ret -; 11afe8 -MenuHeader_11afe8: ; 11afe8 +MenuHeader_11afe8: db MENU_BACKUP_TILES ; flags menu_coords 9, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option -; 11aff0 -String_11aff0: ; 11aff0 +String_11aff0: db "この じょうけんで" next "よろしいですか?@" -; 11b003 -String_11b003: ; 11b003 +String_11b003: db "こうかんを" next "ちゅうししますか?@" -; 11b013 -MenuHeader_11b013: ; 11b013 +MenuHeader_11b013: db MENU_BACKUP_TILES ; flags menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 dw NULL db 1 ; default option -; 11b01b String_11b01b: db "はい" next "いいえ@" -; 11b022 -Function11b022: ; 11b022 +Function11b022: ld a, [wcd2e] and a jr z, .asm_11b02e @@ -6283,9 +6069,8 @@ Function11b022: ; 11b022 ld hl, wStringBuffer4 call Function11b03d ret -; 11b03d -Function11b03d: ; 11b03d +Function11b03d: push hl push af ld c, $1 @@ -6334,12 +6119,11 @@ Function11b03d: ; 11b03d ld bc, 4 ; string length call CopyBytes ret -; 11b07a .MaleString: db "オスの " .FemaleString: db "メスの " -Function11b082: ; 11b082 +Function11b082: call Function11b242 ld a, $7 ld [wc7d3], a @@ -6348,9 +6132,8 @@ Function11b082: ; 11b082 call Function11b275 call SetPalettes jp Function11ad8a -; 11b099 -Function11b099: ; 11b099 +Function11b099: ld c, $6 hlcoord 11, 1 ld a, [wc7d3] @@ -6383,9 +6166,8 @@ Function11b099: ; 11b099 dec a jr nz, .loop ret -; 11b0cf -.PlaceMonNameOrPlaceholderString: ; 11b0cf +.PlaceMonNameOrPlaceholderString: and a ret z @@ -6398,9 +6180,8 @@ Function11b099: ; 11b099 pop hl call PlaceString ret -; 11b0e1 -.SetCaughtFlag: ; 11b0e1 +.SetCaughtFlag: call CheckCaughtMemMon jr nz, .okay inc hl @@ -6410,9 +6191,8 @@ Function11b099: ; 11b099 ld a, $1 ld [hli], a ret -; 11b0ec -.CheckSeenFlag: ; 11b0ec +.CheckSeenFlag: call CheckSeenMemMon ret nz @@ -6421,13 +6201,11 @@ Function11b099: ; 11b099 call PlaceString scf ret -; 11b0f9 -.EmptySlot: ; 11b0f9 +.EmptySlot: db "ーーーーー@" -; 11b0ff -Function11b0ff: ; 11b0ff +Function11b0ff: ld hl, hJoyPressed ld a, [hl] and $2 @@ -6504,9 +6282,8 @@ Function11b0ff: ; 11b0ff ld a, $4 ld [wJumptableIndex], a ret -; 11b175 -Function11b175: ; 11b175 +Function11b175: ld a, [wc7d3] ld d, a ld a, [wc7d2] @@ -6610,17 +6387,15 @@ Function11b175: ; 11b175 call Function11b275 scf ret -; 11b1f7 -Function11b1f7: ; 11b1f7 +Function11b1f7: hlcoord 0, 0 ld a, $32 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT call ByteFill ret -; 11b203 -Function11b203: ; 11b203 +Function11b203: .asm_11b203 ld a, [de] cp $ff @@ -6628,9 +6403,8 @@ Function11b203: ; 11b203 inc de ld [hli], a jr .asm_11b203 -; 11b20b -Function11b20b: ; 11b20b +Function11b20b: ld a, [wc7d1] ld hl, wc7d0 add [hl] @@ -6641,9 +6415,8 @@ Function11b20b: ; 11b20b ld a, [hl] ld [wd265], a ret -; 11b21e -CheckCaughtMemMon: ; 11b21e +CheckCaughtMemMon: push de push hl ld a, [wd265] @@ -6652,9 +6425,8 @@ CheckCaughtMemMon: ; 11b21e pop hl pop de ret -; 11b22a -CheckSeenMemMon: ; 11b22a +CheckSeenMemMon: push de push hl ld a, [wd265] @@ -6663,13 +6435,11 @@ CheckSeenMemMon: ; 11b22a pop hl pop de ret -; 11b236 -Function11b236: ; 11b236 +Function11b236: jp FillBoxWithByte -; 11b239 -Function11b239: ; 11b239 +Function11b239: ld e, a ld d, 0 add hl, de @@ -6678,9 +6448,8 @@ Function11b239: ; 11b239 ld h, [hl] ld l, a ret -; 11b242 -Function11b242: ; 11b242 +Function11b242: hlcoord 3, 4 ld de, wStringBuffer3 call PlaceString @@ -6714,14 +6483,12 @@ asm_11b26f Function11b272: ld [hl], $f5 ret -; 11b275 -Function11b275: ; 11b275 +Function11b275: call Function11b279 ret -; 11b279 -Function11b279: ; 11b279 +Function11b279: ld a, [wd265] ld [wCurSpecies], a call CheckSeenMemMon @@ -6737,9 +6504,8 @@ Function11b279: ; 11b279 .asm_11b294 ret -; 11b295 -Function11b295: ; 11b295 +Function11b295: hlcoord 4, 13 ld de, String_11b308 call PlaceString @@ -6796,31 +6562,25 @@ Function11b295: ; 11b295 ld de, wStringBuffer4 call PlaceString ret -; 11b2fe -String_11b2fe: ; 11b2fe +String_11b2fe: db "あげる#@" -; 11b303 -String_11b303: ; 11b303 +String_11b303: db "ほしい#@" -; 11b308 -String_11b308: ; 11b308 +String_11b308: db "     @" -; 11b30e -String_11b30e: ; 11b30e +String_11b30e: db "みはっけん@" -; 11b314 -Function11b314: ; 11b314 +Function11b314: call Function11b31b call Function11b3d9 ret -; 11b31b -Function11b31b: ; 11b31b +Function11b31b: ld hl, .Coords ld a, [wJumptableIndex] cp 2 @@ -6851,7 +6611,6 @@ Function11b31b: ; 11b31b .load_sprites call Function11b397 ret -; 11b350 .Coords: dbpixel 3, 11, 2, 6 ; 0 @@ -6918,7 +6677,7 @@ Function11b31b: ; 11b31b db $39 ; 12 db $39 ; 13 -Function11b397: ; 11b397 +Function11b397: ld de, wVirtualOAMSprite00 .loop ld a, [hl] @@ -6944,9 +6703,8 @@ Function11b397: ; 11b397 ld [de], a ; attributes inc de jr .loop -; 11b3b6 -Unreferenced_Function11b3b6: ; 11b3b6 +Unreferenced_Function11b3b6: .loop ld a, [hl] cp -1 @@ -6974,9 +6732,8 @@ Unreferenced_Function11b3b6: ; 11b3b6 ld [de], a inc de jr .loop -; 11b3d9 -Function11b3d9: ; 11b3d9 +Function11b3d9: ld de, wVirtualOAMSprite28 push de ld a, [wc7d2] @@ -7048,16 +6805,14 @@ Function11b3d9: ; 11b3d9 xor a ld [hl], a ret -; 11b444 -Function11b444: ; 11b444 +Function11b444: ; special call Mobile46_InitJumptable call Mobile46_RunJumptable ret -; 11b44b -Mobile46_InitJumptable: ; 11b44b +Mobile46_InitJumptable: xor a ld [wJumptableIndex], a ld [wcf64], a @@ -7065,9 +6820,8 @@ Mobile46_InitJumptable: ; 11b44b ld [wcf66], a call UpdateTime ret -; 11b45c -Mobile46_RunJumptable: ; 11b45c +Mobile46_RunJumptable: .loop call .IterateJumptable call DelayFrame @@ -7075,9 +6829,8 @@ Mobile46_RunJumptable: ; 11b45c cp 4 jr nz, .loop ret -; 11b46a -.IterateJumptable: ; 11b46a +.IterateJumptable: jumptable .Jumptable, wJumptableIndex .Jumptable: @@ -7086,9 +6839,8 @@ Mobile46_RunJumptable: ; 11b45c dw Function11b5c0 dw Function11b5e0 dw Function11b5e7 ; unused -; 11b483 -Function11b483: ; 11b483 +Function11b483: call .InitRAM ld hl, wPlayerName ld a, NAME_LENGTH_JAPANESE - 1 @@ -7264,9 +7016,8 @@ Function11b483: ; 11b483 ld [bc], a inc bc ret -; 11b570 -Function11b570: ; 11b570 +Function11b570: call Function118007 ld a, [wScriptVar] and a @@ -7315,9 +7066,8 @@ Function11b570: ; 11b570 call CloseSRAM ret -; 11b5c0 -Function11b5c0: ; 11b5c0 +Function11b5c0: ld a, [wcd82] dec a ld [wCurPartyMon], a @@ -7327,19 +7077,16 @@ Function11b5c0: ; 11b5c0 farcall Function170807 farcall SaveAfterLinkTrade jp Function11ad8a -; 11b5e0 -Function11b5e0: ; 11b5e0 +Function11b5e0: xor a ld [wScriptVar], a jp Function11ad8a -; 11b5e7 -Function11b5e7: ; 11b5e7 +Function11b5e7: ret -; 11b5e8 -Function11b5e8: ; 11b5e8 +Function11b5e8: ld a, $0 call GetSRAMBank ld hl, wRTC @@ -7390,9 +7137,8 @@ Function11b5e8: ; 11b5e8 .Jumptable: dw Function11b66d dw Function11b6b3 -; 11b66d -Function11b66d: ; 11b66d +Function11b66d: call Function1180b8 ld a, [wScriptVar] and a @@ -7431,13 +7177,11 @@ Function11b66d: ; 11b66d .asm_11b6b0 jp Function11ad8a -; 11b6b3 -Function11b6b3: ; 11b6b3 +Function11b6b3: ret -; 11b6b4 -Function11b6b4: ; 11b6b4 +Function11b6b4: ld a, $5 call GetSRAMBank ld a, [wcd30] @@ -7573,9 +7317,8 @@ Function11b6b4: ; 11b6b4 ld [hl], a call AddMobileMonToParty ret -; 11b7e5 -Function11b7e5: ; 11b7e5 +Function11b7e5: ld a, [$c60d] ; species ld [wOTTrademonSpecies], a ld [wCurPartySpecies], a @@ -7632,9 +7375,8 @@ Function11b7e5: ; 11b7e5 call CloseSubmenu call RestartMapMusic ret -; 11b879 -Function11b879: ; 11b879 +Function11b879: farcall BattleTower_CheckSaveFileExistsAndIsYours ld a, [wScriptVar] and a @@ -7725,9 +7467,8 @@ Function11b879: ; 11b879 ld a, $2 ld [wScriptVar], a ret -; 11b920 -Function11b920: ; 11b920 +Function11b920: call Mobile46_InitJumptable ld a, $5 call GetSRAMBank @@ -7738,9 +7479,8 @@ Function11b920: ; 11b920 call CloseSRAM call Function118000 ret -; 11b93b -Function11b93b: ; 11b93b +Function11b93b: ld a, $5 call GetSRAMBank xor a @@ -7778,9 +7518,8 @@ Function11b93b: ; 11b93b call AddMobileMonToParty farcall SaveAfterLinkTrade ret -; 11b98f -AddMobileMonToParty: ; 11b98f +AddMobileMonToParty: ld hl, wPartyCount ld a, [hl] ld e, a @@ -7882,15 +7621,13 @@ AddMobileMonToParty: ; 11b98f call CloseSRAM ret -; 11ba38 -Function11ba38: ; 11ba38 +Function11ba38: farcall CheckCurPartyMonFainted ret c xor a ld [wScriptVar], a ret -; 11ba44 TilemapPack_11ba44: db $47, $30, $0a, $0a, $0a, $0a, $0a, $56 ; 00 diff --git a/mobile/mobile_5b.asm b/mobile/mobile_5b.asm index 3ebe1736c6c..fe08690677b 100644 --- a/mobile/mobile_5b.asm +++ b/mobile/mobile_5b.asm @@ -1,4 +1,4 @@ -Unreferenced_Function16c000: ; 16c000 +Unreferenced_Function16c000: ; Only for CGB ld a, [hCGB] and a @@ -26,9 +26,8 @@ Unreferenced_Function16c000: ; 16c000 pop af ld [wcfbe], a ret -; 16c031 -.RunJumptable: ; 16c031 +.RunJumptable: xor a ld [wJumptableIndex], a ld [wcf64], a @@ -46,9 +45,8 @@ Unreferenced_Function16c000: ; 16c000 cp $ff jr nz, .loop ret -; 16c05c -.Jumptable: ; 16c05c +.Jumptable: dw .init dw Function16c0ba dw Function16c089 @@ -61,9 +59,8 @@ Unreferenced_Function16c000: ; 16c000 dw Function16c0dc dw Function16c0ec dw .quit -; 16c074 -.init ; 16c074 +.init ld a, [wcf64] and a ret z @@ -71,17 +68,15 @@ Unreferenced_Function16c000: ; 16c000 xor a ld [wd003], a ret -; 16c081 -.quit ; 16c081 +.quit push af ld a, $ff ld [wd002], a pop af ret -; 16c089 -Function16c089: ; 16c089 +Function16c089: ld a, $1 ld [wBuffer2], a ld [wd1f1], a @@ -91,17 +86,15 @@ Function16c089: ; 16c089 ld a, [wd002] ld [wcf64], a ret -; 16c09e -Function16c09e: ; 16c09e +Function16c09e: ld a, [wcf64] cp $4 ret nz call Function16c0fa ret -; 16c0a8 -Function16c0a8: ; 16c0a8 +Function16c0a8: xor a ld [wBuffer2], a ld [wd1f1], a @@ -110,9 +103,8 @@ Function16c0a8: ; 16c0a8 ld [hWY], a call Function16c0fa ret -; 16c0ba -Function16c0ba: ; 16c0ba +Function16c0ba: call Function16c943 push af ld a, [wd003] @@ -121,9 +113,8 @@ Function16c0ba: ; 16c0ba pop af call c, Function16c0fa ret -; 16c0ca -Function16c0ca: ; 16c0ca +Function16c0ca: ld a, [wd003] cp $28 push af @@ -133,9 +124,8 @@ Function16c0ca: ; 16c0ca pop af call z, Function16c0fa ret -; 16c0dc -Function16c0dc: ; 16c0dc +Function16c0dc: call Function16ca11 push af ld a, [wd003] @@ -144,9 +134,8 @@ Function16c0dc: ; 16c0dc pop af call c, Function16c0fa ret -; 16c0ec -Function16c0ec: ; 16c0ec +Function16c0ec: call ClearBGPalettes call ClearScreen push af @@ -154,9 +143,8 @@ Function16c0ec: ; 16c0ec ld [wd002], a pop af ret -; 16c0fa -Function16c0fa: ; 16c0fa +Function16c0fa: push af ld a, [wd002] inc a @@ -165,9 +153,8 @@ Function16c0fa: ; 16c0fa ld [wd003], a pop af ret -; 16c108 -MobileSystemSplashScreen_InitGFX: ; 16c108 +MobileSystemSplashScreen_InitGFX: call DisableLCD ld hl, vTiles2 ld de, .Tiles @@ -183,9 +170,8 @@ MobileSystemSplashScreen_InitGFX: ; 16c108 ld [hBGMapMode], a call EnableLCD ret -; 16c130 -.LoadPals: ; 16c130 +.LoadPals: ld de, wBGPals1 ld hl, UnknownMobilePalettes_16c903 ld bc, 8 @@ -193,9 +179,8 @@ MobileSystemSplashScreen_InitGFX: ; 16c108 call FarCopyWRAM farcall ApplyPals ret -; 16c145 -.LoadTileMap: ; 16c145 +.LoadTileMap: hlcoord 0, 0 ld bc, 20 xor a @@ -205,9 +190,8 @@ MobileSystemSplashScreen_InitGFX: ; 16c108 ld bc, $0154 call CopyBytes ret -; 16c15c -.LoadAttrMap: ; 16c15c +.LoadAttrMap: hlcoord 0, 0, wAttrMap ld bc, SCREEN_WIDTH xor a @@ -217,7 +201,6 @@ MobileSystemSplashScreen_InitGFX: ; 16c108 ld bc, 17 * SCREEN_WIDTH call CopyBytes ret -; 16c173 .Tiles: INCBIN "gfx/mobile/mobile_splash.2bpp" @@ -228,12 +211,11 @@ INCBIN "gfx/mobile/mobile_splash.tilemap" .AttrMap: INCBIN "gfx/mobile/mobile_splash.attrmap" -UnknownMobilePalettes_16c903: ; 16c903 +UnknownMobilePalettes_16c903: INCLUDE "gfx/unknown/16c903.pal" -; 16c943 -Function16c943: ; 16c943 +Function16c943: ld a, [wd003] and a jr nz, .asm_16c95e @@ -354,9 +336,8 @@ Function16c943: ; 16c943 ld [rSVBK], a scf ret -; 16ca11 -Function16ca11: ; 16ca11 +Function16ca11: ld a, [wd003] and a jr nz, .asm_16ca1d @@ -455,25 +436,22 @@ Function16ca11: ; 16ca11 ld [rSVBK], a scf ret -; 16cab6 -Function16cab6: ; 16cab6 +Function16cab6: ld b, $0 ld c, e add hl, bc ret -; 16cabb -Function16cabb: ; 16cabb +Function16cabb: inc hl ld a, [hl] srl a srl a and $1f ret -; 16cac4 -Function16cac4: ; 16cac4 +Function16cac4: inc hl ld a, [hld] and $3 @@ -487,15 +465,13 @@ Function16cac4: ; 16cac4 rl b ld a, b ret -; 16cad8 -Function16cad8: ; 16cad8 +Function16cad8: ld a, [hl] and $1f ret -; 16cadc -Function16cadc: ; 16cadc +Function16cadc: sla a sla a ld b, a @@ -505,9 +481,8 @@ Function16cadc: ; 16cadc or b ld [hl], a ret -; 16cae8 -Function16cae8: ; 16cae8 +Function16cae8: ld c, a srl a srl a @@ -530,18 +505,16 @@ Function16cae8: ; 16cae8 or b ld [hl], a ret -; 16cb08 -Function16cb08: ; 16cb08 +Function16cb08: ld b, a ld a, [hl] and $e0 or b ld [hl], a ret -; 16cb0f -Function16cb0f: ; 16cb0f +Function16cb0f: xor a ld [wBuffer1], a ld [wBuffer2], a @@ -556,9 +529,8 @@ Function16cb0f: ; 16cb0f xor a ld [wd1f0], a ret -; 16cb2e -Function16cb2e: ; 16cb2e +Function16cb2e: ld a, [wBuffer2] and a ret z @@ -567,9 +539,8 @@ Function16cb2e: ; 16cb2e ld de, wVirtualOAM call Function16cb5d ret -; 16cb40 -Function16cb40: ; 16cb40 +Function16cb40: ld hl, wd1ec inc [hl] ld a, [hl] @@ -588,9 +559,8 @@ Function16cb40: ; 16cb40 ld a, $a0 ld [wd1ef], a ret -; 16cb5d -Function16cb5d: ; 16cb5d +Function16cb5d: ld a, [hli] and a ret z @@ -622,7 +592,6 @@ Function16cb5d: ; 16cb5d dec a jr nz, .asm_16cb60 ret -; 16cb86 Unknown_16cb86: db 7 @@ -633,26 +602,23 @@ Unknown_16cb86: db 16, 0, 4, 1 db 16, 8, 5, 0 db 16, 16, 6, 0 -; 16cba3 -Function16cba3: ; 16cba3 +Function16cba3: xor a ld [wd1f1], a ld [wd1f2], a ld [wd1f3], a ret -; 16cbae -Function16cbae: ; 16cbae +Function16cbae: ld a, [wd1f1] and a ret z call Function16cbba call Function16cbd1 ret -; 16cbba -Function16cbba: ; 16cbba +Function16cbba: ld hl, wd1f2 inc [hl] ld a, [hl] @@ -669,9 +635,8 @@ Function16cbba: ; 16cbba .asm_16cbcd ld [wd1f3], a ret -; 16cbd1 -Function16cbd1: ; 16cbd1 +Function16cbd1: ld a, [wd1f3] ld c, a ld b, 0 @@ -689,13 +654,11 @@ Function16cbd1: ; 16cbd1 ld a, $1 ld [hCGBPalUpdate], a ret -; 16cbfb Unknown_16cbfb: db 0, 1, 2, 1, 0, 1, 2 -; 16cc02 -Function16cc02: ; 16cc02 +Function16cc02: call Function16cc18 call Function16cc49 call Function16cc62 @@ -704,17 +667,15 @@ Function16cc02: ; 16cc02 call Function16cb0f call Function16cba3 ret -; 16cc18 -Function16cc18: ; 16cc18 +Function16cc18: ld hl, vTiles1 ld de, GFX_16cca3 lb bc, BANK(GFX_16cca3), 46 call Get2bpp ret -; 16cc25 -Function16cc25: ; 16cc25 +Function16cc25: ld hl, Unknown_16cfa9 ld de, wBGPals1 + 1 palettes call .CopyPal @@ -725,15 +686,13 @@ Function16cc25: ; 16cc25 ld de, wOBPals1 + 1 palettes call .CopyPal ret -; 16cc41 -.CopyPal: ; 16cc41 +.CopyPal: ld bc, 1 palettes ld a, $5 jp FarCopyWRAM -; 16cc49 -Function16cc49: ; 16cc49 +Function16cc49: hlcoord 4, 15 ld a, $80 call Function16cc5a @@ -741,9 +700,8 @@ Function16cc49: ; 16cc49 ld a, $90 call Function16cc5a ret -; 16cc5a -Function16cc5a: ; 16cc5a +Function16cc5a: ld c, $10 .asm_16cc5c ld [hli], a @@ -751,17 +709,15 @@ Function16cc5a: ; 16cc5a dec c jr nz, .asm_16cc5c ret -; 16cc62 -Function16cc62: ; 16cc62 +Function16cc62: hlcoord 0, 15, wAttrMap ld bc, $0028 ld a, $1 call ByteFill ret -; 16cc6e -Function16cc6e: ; 16cc6e +Function16cc6e: hlbgcoord 0, 0, vBGMap1 jr Function16cc73 @@ -781,9 +737,8 @@ Function16cc73: pop af ld [rVBK], a ret -; 16cc90 -Function16cc90: ; 16cc90 +Function16cc90: ld bc, $1214 .asm_16cc93 push bc @@ -799,7 +754,6 @@ Function16cc90: ; 16cc90 dec b jr nz, .asm_16cc93 ret -; 16cca3 GFX_16cca3: INCBIN "gfx/unknown/16cca3.2bpp" @@ -829,4 +783,3 @@ Unknown_16cfb9: RGB 27, 11, 12 RGB 07, 07, 07 -; 16cfc1 diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm index e74321fc994..cbe858f6dfc 100644 --- a/mobile/mobile_5c.asm +++ b/mobile/mobile_5c.asm @@ -1,4 +1,4 @@ -Function170000: ; 170000 +Function170000: ld a, [$c62b] ld [wPlayerTrademonSpecies], a ld hl, $c62e @@ -35,9 +35,8 @@ Function170000: ; 170000 call CopyBytes ret -; 17005a -Function17005a: ; 17005a +Function17005a: ld a, $5 call GetSRAMBank ld a, [$a824] @@ -73,11 +72,10 @@ Function17005a: ; 17005a call CloseSRAM ret -; 1700b0 INCLUDE "engine/events/battle_tower/battle_tower.asm" -Function170be4: ; 170be4 +Function170be4: ld a, $5 call GetSRAMBank xor a @@ -87,9 +85,8 @@ Function170be4: ; 170be4 call CloseSRAM ret -; 170bf7 -Clears5_a89a: ; 170bf7 +Clears5_a89a: ld a, $5 call GetSRAMBank ld hl, $a89a @@ -99,9 +96,8 @@ Clears5_a89a: ; 170bf7 call CloseSRAM ret -; 170c06 -Function170c06: ; 170c06 +Function170c06: ld a, $5 call GetSRAMBank ld hl, $a894 @@ -203,9 +199,8 @@ Function170c06: ; 170c06 call CloseSRAM ret -; 170c8b -Function170c8b: ; 170c8b +Function170c8b: ld hl, wLastEnemyCounterMove ld b, $5 .asm_170c90 @@ -216,9 +211,8 @@ Function170c8b: ; 170c8b jr nz, .asm_170c90 ret -; 170c98 -CheckBTMonMovesForErrors: ; 170c98 +CheckBTMonMovesForErrors: ld c, BATTLETOWER_PARTY_LENGTH ld hl, wBT_OTTempMon1Moves .loop @@ -260,9 +254,8 @@ CheckBTMonMovesForErrors: ; 170c98 jr nz, .loop ret -; 170cc6 -Function170cc6: ; 170cc6 +Function170cc6: ld a, [rSVBK] push af ld a, BANK(wDecompressScratch) @@ -289,9 +282,8 @@ Function170cc6: ; 170cc6 ld [rSVBK], a ret -; 170d02 -Function170d02: ; 170d02 +Function170d02: ld a, $1 ld [rVBK], a ld de, GFX_171848 @@ -302,7 +294,6 @@ Function170d02: ; 170d02 ld [rVBK], a ret -; 170d16 PichuAnimatedMobileGFX: INCBIN "gfx/mobile/pichu_animated.2bpp.lz" @@ -313,7 +304,7 @@ INCBIN "gfx/mobile/electro_ball.2bpp.lz" GFX_171848: INCBIN "gfx/unknown/171848.2bpp" -Function1719c8: ; 1719c8 (5c:59c8) +Function1719c8: ld a, [hInMenu] push af ld a, $1 @@ -323,7 +314,7 @@ Function1719c8: ; 1719c8 (5c:59c8) ld [hInMenu], a ret -Function1719d6: ; 1719d6 (5c:59d6) +Function1719d6: farcall BattleTowerRoomMenu_InitRAM call Function1719ed ld a, [rSVBK] @@ -335,7 +326,7 @@ Function1719d6: ; 1719d6 (5c:59d6) ld [rSVBK], a ret -Function1719ed: ; 1719ed (5c:59ed) +Function1719ed: xor a ld [wcd49], a ld [wcd4a], a @@ -348,7 +339,7 @@ Function1719ed: ; 1719ed (5c:59ed) farcall ClearSpriteAnims ret -Function171a11: ; 171a11 (5c:5a11) +Function171a11: .loop call JoyTextDelay ld a, [wcd49] @@ -363,7 +354,7 @@ Function171a11: ; 171a11 (5c:5a11) call ClearSprites ret -Function171a36: ; 171a36 (5c:5a36) +Function171a36: ld a, [wcd49] ld e, a ld d, 0 @@ -375,7 +366,7 @@ Function171a36: ; 171a36 (5c:5a36) ld l, a jp hl -Jumptable_171a45: ; 171a45 (5c:5a45) +Jumptable_171a45: dw Function171a95 dw Function171ac9 dw Function171a5d @@ -390,7 +381,7 @@ Jumptable_171a45: ; 171a45 (5c:5a45) dw Function171c41 -Function171a5d: ; 171a5d (5c:5a5d) +Function171a5d: ld a, [wc821] bit 1, a jr nz, .asm_171a6a @@ -419,30 +410,28 @@ Function171a5d: ; 171a5d (5c:5a5d) ld [wcd49], a ret -Function171a95: ; 171a95 (5c:5a95) +Function171a95: farcall Function171ccd hlcoord 2, 8 ld de, String_171aa7 call PlaceString jp Function171c66 -; 171aa7 (5c:5aa7) -String_171aa7: ; 171aa7 +String_171aa7: db "モバイルアダプタに" next "せつぞく しています" next "しばらく おまちください" db "@" -; 171ac9 -Function171ac9: ; 171ac9 (5c:5ac9) +Function171ac9: ld de, wcd81 ld hl, $5c ld a, $2 call Function3e32 jp Function171c66 -Function171ad7: ; 171ad7 (5c:5ad7) +Function171ad7: xor a ld hl, $c608 ld bc, $66 @@ -452,7 +441,7 @@ Function171ad7: ; 171ad7 (5c:5ad7) call Function3e32 jp Function171c66 -Function171aec: ; 171aec (5c:5aec) +Function171aec: ld a, [rSVBK] push af ld a, $1 @@ -503,7 +492,7 @@ Function171aec: ; 171aec (5c:5aec) jr nz, .asm_171b1b jp Function171c66 -Function171b42: ; 171b42 (5c:5b42) +Function171b42: ld a, [de] inc de and a @@ -512,7 +501,7 @@ Function171b42: ; 171b42 (5c:5b42) ld [hli], a jr Function171b42 -Function171b4b: ; 171b4b (5c:5b4b) +Function171b4b: depixel 8, 2 ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR call _InitSpriteAnimStruct @@ -543,7 +532,7 @@ Function171b4b: ; 171b4b (5c:5b4b) ld [wcd24], a jp Function171c66 -Function171b85: ; 171b85 (5c:5b85) +Function171b85: ld hl, hJoyPressed ; $ffa7 ld a, [hl] and $2 @@ -559,12 +548,12 @@ Function171b85: ; 171b85 (5c:5b85) jr nz, asm_171baf ret -Function171b9f: ; 171b9f (5c:5b9f) +Function171b9f: ld a, $80 ld [wcd49], a ret -asm_171ba5: ; 171ba5 (5c:5ba5) +asm_171ba5: ld a, [wcd4a] and a ret z @@ -572,7 +561,7 @@ asm_171ba5: ; 171ba5 (5c:5ba5) ld [wcd4a], a ret -asm_171baf: ; 171baf (5c:5baf) +asm_171baf: ld a, [wcd4b] ld c, a ld a, [wcd4a] @@ -582,7 +571,7 @@ asm_171baf: ; 171baf (5c:5baf) ld [wcd4a], a ret -Function171bbd: ; 171bbd (5c:5bbd) +Function171bbd: call PlayClickSFX ld a, $8 ld [wcd23], a @@ -590,7 +579,7 @@ Function171bbd: ; 171bbd (5c:5bbd) ld [wcd24], a jp Function171c66 -Function171bcc: ; 171bcc (5c:5bcc) +Function171bcc: ld hl, hJoyPressed ; $ffa7 ld a, [hl] and $2 @@ -600,7 +589,7 @@ Function171bcc: ; 171bcc (5c:5bcc) jp nz, Function171beb ret -Function171bdc: ; 171bdc (5c:5bdc) +Function171bdc: ld a, $4 ld [wcd23], a ld a, $8 @@ -609,7 +598,7 @@ Function171bdc: ; 171bdc (5c:5bdc) dec [hl] ret -Function171beb: ; 171beb (5c:5beb) +Function171beb: ld a, $5 call GetSRAMBank ld a, [wcd4a] @@ -636,7 +625,7 @@ Function171beb: ; 171beb (5c:5beb) ld [wcd4c], a call Function171c66 -Function171c2c: ; 171c2c (5c:5c2c) +Function171c2c: ld hl, wcd4c dec [hl] ret nz @@ -644,12 +633,12 @@ Function171c2c: ; 171c2c (5c:5c2c) call ClearBGPalettes jr asm_171c60 -Function171c39: ; 171c39 (5c:5c39) +Function171c39: ld a, $28 ld [wcd4c], a call Function171c66 -Function171c41: ; 171c41 (5c:5c41) +Function171c41: ld hl, wcd4c dec [hl] ret nz @@ -659,31 +648,28 @@ Function171c41: ; 171c41 (5c:5c41) ld a, $2 ld [wc303], a farcall DisplayMobileError -asm_171c60: ; 171c60 (5c:5c60) +asm_171c60: ld a, $80 ld [wcd49], a ret -Function171c66: ; 171c66 (5c:5c66) +Function171c66: ld hl, wcd49 inc [hl] ret -; 171c6b (5c:5c6b) -MenuHeader_171c6b: ; 171c6b +MenuHeader_171c6b: db MENU_BACKUP_TILES ; flags menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 dw NULL db 0 ; default option -; 171c73 -String_171c73: ; 171c73 +String_171c73: db "モバイルセンターを けってい" next "しました@" -; 171c87 -Function171c87: ; 171c87 (5c:5c87) +Function171c87: call DisableLCD ld hl, GFX_171db1 ld de, vTiles2 tile $00 @@ -709,7 +695,7 @@ Function171c87: ; 171c87 (5c:5c87) call PlaceString ret -Function171ccd: ; 171ccd (5c:5ccd) +Function171ccd: ld a, [rSVBK] push af ld a, $5 @@ -728,7 +714,7 @@ Function171ccd: ; 171ccd (5c:5ccd) ld [rSVBK], a ret -Function171cf0: ; 171cf0 (5c:5cf0) +Function171cf0: xor a hlcoord 4, 15 ld [hli], a @@ -755,7 +741,7 @@ Function171cf0: ; 171cf0 (5c:5cf0) ld de, String_172e4e jp PlaceString -Function171d2b: ; 171d2b (5c:5d2b) +Function171d2b: call DisableLCD ld hl, GFX_171db1 ld de, vTiles2 tile $00 @@ -781,7 +767,6 @@ Function171d2b: ; 171d2b (5c:5d2b) call PlaceString ret -; 171d71 (5c:5d71) Palette_171d71: RGB 0, 0, 0 @@ -836,21 +821,20 @@ INCBIN "gfx/unknown/172955.attrmap" LZ_172abd: INCBIN "gfx/pokedex/slowpoke.2bpp.lz" -String_172e31: ; 172e31 +String_172e31: db "パスワードいれてください@" -String_172e3f: ; 172e3f +String_172e3f: db "きりかえ やめる  けってい@" -String_172e4e: ; 172e4e +String_172e4e: db "きりかえ やめる  " String_172e58: db "けってい@" -String_172e5d: ; 172e5d +String_172e5d: db "せつぞくする モバイルセンターを" next "えらんで ください@" -; 172e78 -Function172e78: ; 172e78 (5c:6e78) +Function172e78: ld a, $7f hlcoord 0, 0 ld bc, $168 @@ -875,7 +859,6 @@ Function172e78: ; 172e78 (5c:6e78) call CopyBytes ret -; 172eb9 (5c:6eb9) Function172eb9: ld a, [rSVBK] @@ -895,7 +878,6 @@ Function172eb9: ld [rSVBK], a ret -; 172edf (5c:6edf) Palette_172edf: RGB 5, 12, 17 diff --git a/mobile/mobile_5e.asm b/mobile/mobile_5e.asm index 85009670573..969baf34bc5 100644 --- a/mobile/mobile_5e.asm +++ b/mobile/mobile_5e.asm @@ -1,7 +1,7 @@ MobileAdapterGFX:: INCBIN "gfx/mobile/mobile_adapter.2bpp" -Function17a68f:: ; 17a68f (5e:668f) +Function17a68f:: call Function17a6a8 call Function17a751 ld hl, $d088 @@ -18,7 +18,7 @@ Function17a68f:: ; 17a68f (5e:668f) scf ret -Function17a6a8: ; 17a6a8 (5e:66a8) +Function17a6a8: push de push bc ld hl, wStringBuffer2 ; $d086 @@ -49,7 +49,7 @@ Function17a6a8: ; 17a6a8 (5e:66a8) call DelayFrame ret -Function17a6f5: ; 17a6f5 (5e:66f5) +Function17a6f5: ld hl, wBuffer1 ld c, $0 ld b, $8 @@ -69,7 +69,7 @@ Function17a6f5: ; 17a6f5 (5e:66f5) ld [$d08c], a ret -Function17a713: ; 17a713 (5e:6713) +Function17a713: and $f cp $a jr nc, .asm_17a71d @@ -83,7 +83,7 @@ Function17a713: ; 17a713 (5e:6713) scf ret -Function17a721: ; 17a721 (5e:6721) +Function17a721: push de ld h, d ld l, e @@ -121,7 +121,7 @@ Function17a721: ; 17a721 (5e:6721) ld [de], a ret -Function17a751: ; 17a751 (5e:6751) +Function17a751: xor a ld [$d087], a .asm_17a755 @@ -137,7 +137,7 @@ Function17a751: ; 17a751 (5e:6751) jr z, .asm_17a755 ret -Function17a770: ; 17a770 (5e:6770) +Function17a770: ld a, [hOAMUpdate] push af ld a, $1 @@ -148,7 +148,7 @@ Function17a770: ; 17a770 (5e:6770) ld [hOAMUpdate], a ret -Function17a781: ; 17a781 (5e:6781) +Function17a781: ld a, [hInMenu] push af ld a, $1 @@ -158,7 +158,7 @@ Function17a781: ; 17a781 (5e:6781) ld [hInMenu], a ret -Function17a78f: ; 17a78f (5e:678f) +Function17a78f: ld hl, $d088 bit 7, [hl] res 7, [hl] @@ -169,21 +169,20 @@ Function17a78f: ; 17a78f (5e:678f) .asm_17a79f farcall ReloadMapPart ret -; 17a7a6 (5e:67a6) -Function17a7a6: ; 17a7a6 +Function17a7a6: ld a, [$d087] inc a ld [$d087], a ret -Function17a7ae: ; 17a7ae (5e:67ae) +Function17a7ae: ld a, [$d087] ld hl, Jumptable_17a7b6 rst JumpTable ret -Jumptable_17a7b6: ; 17a7b6 (5e:67b6) +Jumptable_17a7b6: dw Function17a7c2 dw Function17a7cd dw Function17a7d8 @@ -192,21 +191,21 @@ Jumptable_17a7b6: ; 17a7b6 (5e:67b6) dw Function17a7f4 -Function17a7c2: ; 17a7c2 (5e:67c2) +Function17a7c2: ld a, $4 call Function17aad3 ld a, $1 ld [$d087], a ret -Function17a7cd: ; 17a7cd (5e:67cd) +Function17a7cd: call Function17a83c call Function17a8ae ret c call Function17a848 ret -Function17a7d8: ; 17a7d8 (5e:67d8) +Function17a7d8: call Function17a83c call Function17a848 ld hl, $d08b @@ -220,7 +219,7 @@ Function17a7d8: ; 17a7d8 (5e:67d8) ld [$d087], a ret -Function17a7f4: ; 17a7f4 (5e:67f4) +Function17a7f4: ld hl, $d08b dec [hl] ret nz @@ -228,7 +227,7 @@ Function17a7f4: ; 17a7f4 (5e:67f4) set 7, [hl] ret -Function17a7ff: ; 17a7ff (5e:67ff) +Function17a7ff: ld hl, $d08b dec [hl] ret nz @@ -242,7 +241,7 @@ Function17a7ff: ; 17a7ff (5e:67ff) set 7, [hl] ret -Function17a81a: ; 17a81a (5e:681a) +Function17a81a: call IsSFXPlaying ret nc ld a, [hJoyPressed] @@ -259,7 +258,7 @@ Function17a81a: ; 17a81a (5e:681a) ld [$d087], a ret -Function17a83c: ; 17a83c (5e:683c) +Function17a83c: ld a, [hJoyLast] and $f0 ld c, a @@ -269,7 +268,7 @@ Function17a83c: ; 17a83c (5e:683c) ld c, a ret -Function17a848: ; 17a848 (5e:6848) +Function17a848: ld a, c and $60 cp $60 @@ -345,7 +344,7 @@ Function17a848: ; 17a848 (5e:6848) scf ret -Function17a8ae: ; 17a8ae (5e:68ae) +Function17a8ae: bit 1, c jr nz, .asm_17a8bc bit 0, c @@ -377,7 +376,7 @@ Function17a8ae: ; 17a8ae (5e:68ae) scf ret -Function17a8de: ; 17a8de (5e:68de) +Function17a8de: ld a, $2 call Function17aae0 ld a, [hl] @@ -414,7 +413,7 @@ Function17a8de: ; 17a8de (5e:68de) call Function17aa88 ret -Function17a91e: ; 17a91e (5e:691e) +Function17a91e: ld a, [$d08c] cp $7 jr c, .asm_17a92c @@ -435,7 +434,7 @@ Function17a91e: ; 17a91e (5e:691e) scf ret -Function17a943: ; 17a943 (5e:6943) +Function17a943: ld a, [$d08c] and a jr z, .asm_17a95d @@ -457,7 +456,7 @@ Function17a943: ; 17a943 (5e:6943) xor a ret -Function17a964: ; 17a964 (5e:6964) +Function17a964: ld a, [$d08c] cp $10 jr nc, .asm_17a979 @@ -475,7 +474,7 @@ Function17a964: ; 17a964 (5e:6964) scf ret -Function17a97b: ; 17a97b (5e:697b) +Function17a97b: hlcoord 1, 1 lb bc, 2, 18 call ClearBox @@ -499,7 +498,7 @@ Function17a97b: ; 17a97b (5e:697b) .asm_17a99d ret -Function17a99e: ; 17a99e (5e:699e) +Function17a99e: hlcoord 0, 12 ld b, $4 ld c, $12 @@ -508,15 +507,13 @@ Function17a99e: ; 17a99e (5e:699e) ld de, String_17a9b2 call PlaceString ret -; 17a9b2 (5e:69b2) -String_17a9b2: ; 17a9b2 +String_17a9b2: db "でんわばんごうが ただしく" next "はいって いません!" db "@" -; 17a9cb -Function17a9cb: ; 17a9cb (5e:69cb) +Function17a9cb: ld de, wVirtualOAM ; $c400 ld hl, $d088 bit 6, [hl] @@ -530,7 +527,7 @@ Function17a9cb: ; 17a9cb (5e:69cb) call Function17a9e3 ret -Function17a9e3: ; 17a9e3 (5e:69e3) +Function17a9e3: ld a, $3 ld [$d08e], a ld hl, Unknown_17aa77 @@ -540,7 +537,7 @@ Function17a9e3: ; 17a9e3 (5e:69e3) call Function17aa4a ret -Function17a9f5: ; 17a9f5 (5e:69f5) +Function17a9f5: ld a, [$d08c] cp $10 ret nc @@ -564,7 +561,7 @@ Function17a9f5: ; 17a9f5 (5e:69f5) call Function17aa4a ret -Function17aa22: ; 17aa22 (5e:6a22) +Function17aa22: ld a, $0 ld [$d08e], a push de @@ -590,7 +587,7 @@ Function17aa22: ; 17aa22 (5e:6a22) call Function17aa4a ret -Function17aa4a: ; 17aa4a (5e:6a4a) +Function17aa4a: ld [$d08d], a ld a, b add $8 @@ -623,33 +620,30 @@ Function17aa4a: ; 17aa4a (5e:6a4a) dec a jr nz, .loop ret -; 17aa72 (5e:6a72) -Unknown_17aa72: ; 17aa72 +Unknown_17aa72: db 1 db 0, 0, 0, 0 -; 17aa77 -Unknown_17aa77: ; 17aa77 +Unknown_17aa77: db 4 db 0, 0, 0, 0 db 0, 8, 1, 0 db 8, 0, 2, 0 db 8, 8, 3, 0 -; 17aa88 -Function17aa88: ; 17aa88 (5e:6a88) +Function17aa88: jr c, asm_17aa91 ld de, SFX_SWITCH_POKEMON call PlaySFX ret -asm_17aa91: ; 17aa91 (5e:6a91) +asm_17aa91: ld de, SFX_WRONG call PlaySFX ret -Function17aa98: ; 17aa98 (5e:6a98) +Function17aa98: ld a, $5 ld [$d08b], a call Function17aaa9 @@ -658,7 +652,7 @@ Function17aa98: ; 17aa98 (5e:6a98) set 7, [hl] ret -Function17aaa9: ; 17aaa9 (5e:6aa9) +Function17aaa9: ld a, $3 call Function17aae3 ld c, a @@ -673,7 +667,7 @@ Function17aaa9: ; 17aaa9 (5e:6aa9) call AddNTimes ret -Function17aac3: ; 17aac3 (5e:6ac3) +Function17aac3: ld a, $b push hl ld [hli], a @@ -685,24 +679,24 @@ Function17aac3: ; 17aac3 (5e:6ac3) ld [hli], a ret -Function17aad0: ; 17aad0 (5e:6ad0) +Function17aad0: call Function17aae0 -Function17aad3: ; 17aad3 (5e:6ad3) +Function17aad3: ld [$d089], a ret -Function17aad7: ; 17aad7 (5e:6ad7) +Function17aad7: push af ld a, [$d089] ld [$d08a], a pop af ret -Function17aae0: ; 17aae0 (5e:6ae0) +Function17aae0: call Function17aad7 -Function17aae3: ; 17aae3 (5e:6ae3) +Function17aae3: push af ld a, [$d08a] ld bc, $d @@ -714,9 +708,8 @@ Function17aae3: ; 17aae3 (5e:6ae3) add hl, bc ld a, [hl] ret -; 17aaf7 (5e:6af7) -Unknown_17aaf7: ; 17aaf7 +Unknown_17aaf7: db $0, $0, $1, $6, $5, $9, $3, $2, $1, $2, $1, $2, $4 db $0, $0, $2, $9, $5, $a, $4, $0, $2, $a, $a, $3, $5 db $0, $0, $3, $c, $5, $b, $5, $1, $0, $1, $0, $4, $0 @@ -730,9 +723,8 @@ Unknown_17aaf7: ; 17aaf7 db $0, $0, $0, $9, $e, $7, $1, $9, $b, $6, $8, $1, $1 db $0, $0,$f1, $c, $e, $8, $2, $a, $c, $7, $c, $2, $c db $0, $0,$f0,$10, $e, $c, $c, $b, $9, $b, $9, $b, $9 -; 17aba0 -Function17aba0: ; 17aba0 (5e:6ba0) +Function17aba0: ld a, [rVBK] push af ld a, $1 @@ -757,7 +749,7 @@ Function17aba0: ; 17aba0 (5e:6ba0) call Get2bpp ret -Function17abcf: ; 17abcf (5e:6bcf) +Function17abcf: ld a, [rSVBK] push af ld a, BANK(wBGPals1) @@ -788,7 +780,7 @@ Function17abcf: ; 17abcf (5e:6bcf) ld [rSVBK], a ret -Function17ac0c: ; 17ac0c (5e:6c0c) +Function17ac0c: call Function17ac1d call Function17ac2a hlcoord 0, 0 @@ -797,14 +789,14 @@ Function17ac0c: ; 17ac0c (5e:6c0c) call Function17ac46 ret -Function17ac1d: ; 17ac1d (5e:6c1d) +Function17ac1d: ld hl, Tilemap_17acd5 decoord 0, 4 ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH call CopyBytes ret -Function17ac2a: ; 17ac2a (5e:6c2a) +Function17ac2a: ld hl, Tilemap_17ae3d decoord 0, 4, wAttrMap ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH @@ -821,7 +813,7 @@ Function17ac2a: ; 17ac2a (5e:6c2a) jr nz, .loop ret -Function17ac46: ; 17ac46 (5e:6c46) +Function17ac46: ld a, [$d088] bit 4, a jr nz, .bit_4_set @@ -831,9 +823,8 @@ Function17ac46: ; 17ac46 (5e:6c46) .bit_4_set call Function3eea ret -; 17ac55 (5e:6c55) -Palette_17ac55: ; 17ac55 +Palette_17ac55: RGB 0, 0, 0 RGB 9, 10, 25 RGB 16, 19, 31 @@ -874,7 +865,7 @@ Palette_17ac55: ; 17ac55 RGB 0, 0, 0 RGB 0, 0, 0 -Palette_17ac95: ; 17ac95 +Palette_17ac95: RGB 31, 31, 31 RGB 4, 3, 3 RGB 31, 13, 0 @@ -915,11 +906,11 @@ Palette_17ac95: ; 17ac95 RGB 27, 31, 0 RGB 31, 31, 0 -Tilemap_17acd5: ; 17acd5 +Tilemap_17acd5: INCBIN "gfx/unknown/17acd5.tilemap" -Tilemap_17ae3d: ; 17ae3d +Tilemap_17ae3d: INCBIN "gfx/unknown/17ae3d.tilemap" -GFX_17afa5:: ; 17afa5 +GFX_17afa5:: INCBIN "gfx/unknown/17afa5.2bpp" diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm index 05a1fc34c27..13cb091da08 100644 --- a/mobile/mobile_5f.asm +++ b/mobile/mobile_5f.asm @@ -1,4 +1,4 @@ -Function17c000: ; 17c000 +Function17c000: call DisableLCD ld hl, vTiles2 @@ -79,19 +79,18 @@ Function17c000: ; 17c000 call EnableLCD farcall ReloadMapPart ret -; 17c083 -HaveWantGFX: ; 17c083 +HaveWantGFX: INCBIN "gfx/mobile/havewant.2bpp" -MobileSelectGFX: ; 17c983 +MobileSelectGFX: INCBIN "gfx/mobile/select.2bpp" -HaveWantMap: ; 17cb83 +HaveWantMap: ; Interleaved tile/palette map. INCBIN "gfx/mobile/havewant_map.bin" -HaveWantPals: ; 17cff3 +HaveWantPals: ; BG and OBJ palettes. RGB 0, 0, 0 RGB 21, 21, 21 @@ -174,7 +173,7 @@ HaveWantPals: ; 17cff3 RGB 0, 0, 0 -CheckStringForErrors: ; 17d073 +CheckStringForErrors: ; Valid character ranges: ; $0, $5 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff .loop @@ -220,9 +219,8 @@ CheckStringForErrors: ; 17d073 .Done: and a ret -; 17d0b3 -CheckStringForErrors_IgnoreTerminator: ; 17d0b3 +CheckStringForErrors_IgnoreTerminator: ; Find control chars .loop ld a, [de] @@ -266,9 +264,8 @@ CheckStringForErrors_IgnoreTerminator: ; 17d0b3 jr nz, .loop and a ret -; 17d0f3 -Function17d0f3: ; 17d0f3 +Function17d0f3: ld a, [$c608 + 5] ld [wOTTrademonSpecies], a ld [wCurPartySpecies], a @@ -325,32 +322,28 @@ Function17d0f3: ; 17d0f3 call CloseSubmenu call RestartMapMusic ret -; 17d187 -Mobile_CopyDefaultOTName: ; 17d187 +Mobile_CopyDefaultOTName: ld hl, Mobile5F_PlayersName ld de, $c63d ld bc, 5 call CopyBytes ret -; 17d194 Mobile5F_PlayersName: db "クりス@@" -; 17d198 -Mobile_CopyDefaultNickname: ; 17d199 +Mobile_CopyDefaultNickname: ld hl, .DefaultNickname ld de, $c642 ld bc, 5 call CopyBytes ret -; 17d1a6 .DefaultNickname: db "?????" -Mobile_CopyDefaultMail: ; 17d1ab +Mobile_CopyDefaultMail: ld a, "@" ld hl, $c647 ld bc, MAIL_MSG_LENGTH + 1 @@ -360,13 +353,11 @@ Mobile_CopyDefaultMail: ; 17d1ab ld bc, 6 call CopyBytes ret -; 17d1c3 .DefaultMessage: db "こんにちは@" -; 17d1c9 -Mobile_CopyDefaultMailAuthor: ; 17d1c9 +Mobile_CopyDefaultMailAuthor: ld a, "@" ld de, $c668 ld bc, 5 @@ -376,9 +367,8 @@ Mobile_CopyDefaultMailAuthor: ; 17d1c9 ld bc, 5 call CopyBytes ret -; 17d1e1 -CheckStringContainsLessThanBNextCharacters: ; 17d1e1 +CheckStringContainsLessThanBNextCharacters: .loop ld a, [de] inc de @@ -396,9 +386,8 @@ CheckStringContainsLessThanBNextCharacters: ; 17d1e1 .done scf ret -; 17d1f1 -Function17d1f1: ; 17d1f1 +Function17d1f1: ld a, [wCurPartySpecies] dec a call SetSeenAndCaughtMon @@ -423,7 +412,6 @@ Function17d1f1: ; 17d1f1 .asm_17d223 ret -; 17d224 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -435,7 +423,7 @@ Function17d1f1: ; 17d1f1 ; if [wScriptVar] == TRUE ; Show BattleTower-Menu with 3 options in english language ; - Challenge - Explanation - Cancel -Menu_ChallengeExplanationCancel: ; 17d224 +Menu_ChallengeExplanationCancel: ld a, [wScriptVar] and a jr nz, .English @@ -454,9 +442,8 @@ Menu_ChallengeExplanationCancel: ; 17d224 call Function17d246 call CloseWindow ret -; 17d246 -Function17d246: ; 17d246 +Function17d246: call VerticalMenu jr c, .Exit ld a, [wScriptVar] @@ -480,53 +467,48 @@ Function17d246: ; 17d246 ld a, $4 ld [wScriptVar], a ret -; 17d26a -MenuHeader_17d26a: ; 17d26a +MenuHeader_17d26a: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 14, 9 dw MenuData_17d272 db 1 ; default option -MenuData_17d272: ; 17d272 +MenuData_17d272: db STATICMENU_CURSOR | STATICMENU_WRAP ; flags db 4 db "ニュース¯よみこむ@" db "ニュース¯みる@" db "せつめい@" db "やめる@" -; 17d28f -MenuHeader_ChallengeExplanationCancel: ; 17d28f +MenuHeader_ChallengeExplanationCancel: db MENU_BACKUP_TILES ; flags menu_coords 0, 0, 14, 7 dw MenuData_ChallengeExplanationCancel db 1 ; default option -MenuData_ChallengeExplanationCancel: ; 17d297 +MenuData_ChallengeExplanationCancel: db STATICMENU_CURSOR | STATICMENU_WRAP ; flags db 3 db "Challenge@" db "Explanation@" db "Cancel@" -; 17d2b6 -Function17d2b6: ; 17d2b6 +Function17d2b6: call Function17d2c0 farcall Function1181da ret -; 17d2c0 -Function17d2c0: ; 17d2c0 +Function17d2c0: xor a ld [wJumptableIndex], a ld [wcf64], a ld [wcf65], a ld [wcf66], a ret -; 17d2ce -Function17d2ce: ; 17d2ce +Function17d2ce: ld a, $5 call GetSRAMBank ld a, [$aa72] @@ -560,9 +542,8 @@ Function17d2ce: ; 17d2ce call ReturnToMapFromSubmenu call CloseSubmenu ret -; 17d314 -Function17d314: ; 17d314 +Function17d314: ld a, $5 call GetSRAMBank ld a, [$b1b1] @@ -613,9 +594,8 @@ Function17d314: ; 17d314 ld [wScriptVar], a scf ret -; 17d370 -Function17d370: ; 17d370 +Function17d370: xor a ld [wcd77], a ld [wMobileCrashCheckPointer], a @@ -665,9 +645,8 @@ Function17d370: ; 17d370 call CopyBytes call CloseSRAM ret -; 17d3f6 -Function17d3f6: ; 17d3f6 +Function17d3f6: call ClearBGPalettes call ClearSprites call ClearScreen @@ -708,9 +687,8 @@ Function17d405: pop af ld [rSVBK], a ret -; 17d45a -Function17d45a: ; 17d45a +Function17d45a: .asm_17d45a call JoyTextDelay ld a, [wcd77] @@ -724,21 +702,18 @@ Function17d45a: ; 17d45a xor a ld [wScriptVar], a ret -; 17d474 -Function17d474: ; 17d474 +Function17d474: jumptable Jumptable_17d483, wcd77 -; 17d483 -Jumptable_17d483: ; 17d483 +Jumptable_17d483: dw Function17d48d dw Function17d5be dw Function17d5c4 dw Function17d6fd dw Function17e427 -; 17d48d -Function17d48d: ; 17d48d +Function17d48d: ld hl, Palette_17eff6 ld de, $c608 ld bc, $40 @@ -921,9 +896,8 @@ Function17d48d: ; 17d48d call Function17e5af farcall ReloadMapPart jp Function17e438 -; 17d5be -Function17d5be: ; 17d5be +Function17d5be: call SetPalettes call Function17e438 @@ -962,9 +936,8 @@ Function17d5c4: ld a, $3 ld [wcd77], a ret -; 17d5f6 -Function17d5f6: ; 17d5f6 +Function17d5f6: ld a, $5 ld [rSVBK], a ld hl, $c608 @@ -974,9 +947,8 @@ Function17d5f6: ; 17d5f6 ld a, $4 ld [rSVBK], a ret -; 17d60b -Function17d60b: ; 17d60b +Function17d60b: ld a, $5 call GetSRAMBank ld hl, $b1d3 @@ -1063,10 +1035,9 @@ Function17d60b: ; 17d60b call CopyBytes call CloseSRAM ret -; 17d6a1 -Function17d6a1: ; 17d6a1 +Function17d6a1: push hl ld a, [wcd6e] ld c, a @@ -1114,9 +1085,8 @@ Function17d6a1: ; 17d6a1 call CloseSRAM pop hl ret -; 17d6fd -Function17d6fd: ; 17d6fd +Function17d6fd: ld a, [wcd77] bit 7, a jr nz, asm_17d721 @@ -1147,9 +1117,8 @@ asm_17d721 ld a, $2 ld [wcd77], a ret -; 17d72a -Jumptable17d72a: ; 17d72a +Jumptable17d72a: dw Function17d78c dw Function17d78d dw Function17d7b4 @@ -1199,13 +1168,11 @@ Jumptable17d72a: ; 17d72a dw Function17e3e0 dw Function17e3f0 dw Function17e409 -; 17d78c -Function17d78c: ; 17d78c +Function17d78c: ret -; 17d78d -Function17d78d: ; 17d78d +Function17d78d: call IncCrashCheckPointer ld a, [hli] ld c, a @@ -1224,9 +1191,8 @@ Function17d78d: ; 17d78d ld [wcd77], a call ClearBGPalettes ret -; 17d7b4 -Function17d7b4: ; 17d7b4 +Function17d7b4: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -1234,9 +1200,8 @@ Function17d7b4: ; 17d7b4 call PlayMusic2 call HlToCrashCheckPointer ret -; 17d7c2 -Function17d7c2: ; 17d7c2 +Function17d7c2: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -1245,9 +1210,8 @@ Function17d7c2: ; 17d7c2 call WaitSFX call HlToCrashCheckPointer ret -; 17d7d3 -Function17d7d3: ; 17d7d3 +Function17d7d3: call IncCrashCheckPointer ld a, [hli] dec a @@ -1257,9 +1221,8 @@ Function17d7d3: ; 17d7d3 call WaitSFX call HlToCrashCheckPointer ret -; 17d7e5 -Function17d7e5: ; 17d7e5 +Function17d7e5: call IncCrashCheckPointer ld a, [hli] ld [wcd4f], a @@ -1283,9 +1246,8 @@ Function17d7e5: ; 17d7e5 call Function17e691 call HlToCrashCheckPointer ret -; 17d818 -Function17d818: ; 17d818 +Function17d818: call IncCrashCheckPointer ld a, [hli] ld c, a @@ -1303,9 +1265,8 @@ Function17d818: ; 17d818 add hl, bc call PlaceString ret -; 17d833 -Function17d833: ; 17d833 +Function17d833: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -1331,9 +1292,8 @@ Function17d833: ; 17d833 farcall Function11c08f call Function17e349 ret -; 17d85d -Function17d85d: ; 17d85d +Function17d85d: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -1432,9 +1392,8 @@ Function17d85d: ; 17d85d .asm_17d8fe call Function17e349 ret -; 17d902 -Function17d902: ; 17d902 +Function17d902: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -1467,9 +1426,8 @@ Function17d902: ; 17d902 .asm_17d936 call Function17e349 ret -; 17d93a -Function17d93a: ; 17d93a +Function17d93a: call IncCrashCheckPointer ld de, $c708 ld bc, $5 @@ -1503,9 +1461,8 @@ Function17d93a: ; 17d93a ld [rSVBK], a call Function17e349 ret -; 17d98b -Function17d98b: ; 17d98b +Function17d98b: call IncCrashCheckPointer ld de, $c708 ld bc, $4 @@ -1540,9 +1497,8 @@ Function17d98b: ; 17d98b ld [rSVBK], a call Function17e349 ret -; 17d9e3 -Function17d9e3: ; 17d9e3 +Function17d9e3: call IncCrashCheckPointer ld de, $c708 ld bc, $7 @@ -1586,9 +1542,8 @@ Function17d9e3: ; 17d9e3 .asm_17da30 ret -; 17da31 -Function17da31: ; 17da31 +Function17da31: call IncCrashCheckPointer ld de, $c708 ld bc, $4 @@ -1647,7 +1602,6 @@ Function17da31: ; 17da31 .asm_17da8b ret -; 17da8c Unknown_17da8c: x = 0 @@ -1662,9 +1616,8 @@ rept 8 db (1 << x) ^ $ff x = x + 1 endr -; 17da9c -Function17da9c: ; 17da9c +Function17da9c: ld a, [wcd31] dec a jr z, .asm_17dabd @@ -1695,9 +1648,8 @@ Function17da9c: ; 17da9c call Function17e55b call Function17e5af jr .asm_17daba -; 17dadc -Function17dadc: ; 17dadc +Function17dadc: ld a, [wcd2e] ld hl, wcd24 add [hl] @@ -1735,9 +1687,8 @@ Function17dadc: ; 17dadc call Function17e55b call Function17e5af jr .asm_17db0e -; 17db2d -Function17db2d: ; 17db2d +Function17db2d: ld a, [wcd30] ld hl, wcd24 cp [hl] @@ -1757,9 +1708,8 @@ Function17db2d: ; 17db2d .asm_17db53 jp IncCrashCheckPointer -; 17db56 -Function17db56: ; 17db56 +Function17db56: ld a, [wcd30] cp $1 jr z, .asm_17db74 @@ -1775,9 +1725,8 @@ Function17db56: ; 17db56 .asm_17db74 jp IncCrashCheckPointer -; 17db77 -Function17db77: ; 17db77 +Function17db77: ld hl, wcd2d ld a, [wcd2f] add [hl] @@ -1807,9 +1756,8 @@ Function17db77: ; 17db77 .asm_17dbae jp IncCrashCheckPointer -; 17dbb1 -Function17dbb1: ; 17dbb1 +Function17dbb1: ld hl, wcd2f ld a, [wcd42] sub [hl] @@ -1843,9 +1791,8 @@ Function17dbb1: ; 17dbb1 pop af dec a jr .asm_17dbd4 -; 17dbe9 -Function17dbe9: ; 17dbe9 +Function17dbe9: ld hl, wcd2d ld a, [wcd2f] sub [hl] @@ -1877,9 +1824,8 @@ Function17dbe9: ; 17dbe9 call Function17e55b call Function17e5af jp IncCrashCheckPointer -; 17dc1f -Function17dc1f: ; 17dc1f +Function17dc1f: call IncCrashCheckPointer ld de, $c688 ld bc, $6 @@ -1938,23 +1884,20 @@ Function17dc1f: ; 17dc1f pop hl call Function17e40f ret -; 17dc96 MenuData_17dc96: db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING | STATICMENU_WRAP ; flags db 2 db "はい@" db "いいえ@" -; 17dc9f -Function17dc9f: ; 17dc9f +Function17dc9f: call IncCrashCheckPointer call HlToCrashCheckPointer call RotateFourPalettesLeft ret -; 17dca9 -Function17dca9: ; 17dca9 +Function17dca9: call IncCrashCheckPointer call HlToCrashCheckPointer @@ -1978,9 +1921,8 @@ Function17dcaf: ld a, $4 ld [rSVBK], a ret -; 17dccf -Function17dccf: ; 17dccf +Function17dccf: call IncCrashCheckPointer push hl ld a, [wcd4b] @@ -2024,9 +1966,8 @@ Function17dccf: ; 17dccf .asm_17dd11 pop hl ret -; 17dd13 -Function17dd13: ; 17dd13 +Function17dd13: call IncCrashCheckPointer ld a, [hli] ld c, a @@ -2046,9 +1987,8 @@ Function17dd13: ; 17dd13 pop hl call PlaceHLTextAtBC ret -; 17dd30 -Function17dd30: ; 17dd30 +Function17dd30: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -2065,9 +2005,8 @@ Function17dd30: ; 17dd30 add hl, de call Function17e600 ret -; 17dd49 -Function17dd49: ; 17dd49 +Function17dd49: call IncCrashCheckPointer ld de, $c708 ld bc, $a @@ -2146,9 +2085,8 @@ Function17dd49: ; 17dd49 .done call Function17e40f ret -; 17ddcd -Function17ddcd: ; 17ddcd +Function17ddcd: call IncCrashCheckPointer ld de, $c708 ld bc, $8 @@ -2208,9 +2146,8 @@ Function17ddcd: ; 17ddcd .asm_17de2e call Function17e40f ret -; 17de32 -Function17de32: ; 17de32 +Function17de32: call IncCrashCheckPointer ld de, $c708 ld bc, $9 @@ -2267,9 +2204,8 @@ Function17de32: ; 17de32 call CloseSRAM call Function17e40f ret -; 17de91 -Function17de91: ; 17de91 +Function17de91: call IncCrashCheckPointer ld de, $c708 ld bc, $7 @@ -2310,9 +2246,8 @@ Function17de91: ; 17de91 call CloseSRAM call Function17e40f ret -; 17ded9 -Function17ded9: ; 17ded9 +Function17ded9: call IncCrashCheckPointer ld de, $c708 ld bc, $1f @@ -2517,9 +2452,8 @@ Function17ded9: ; 17ded9 ld de, $4 add hl, de jp asm_17e0ee -; 17e026 -Function17e026: ; 17e026 +Function17e026: ld a, BANK(sBoxCount) call GetSRAMBank ld a, [sBoxCount] @@ -2651,9 +2585,8 @@ asm_17e0ee pop hl call Function17e40f ret -; 17e0fd -Function17e0fd: ; 17e0fd +Function17e0fd: call IncCrashCheckPointer ld de, $c708 ld bc, $6 @@ -2685,9 +2618,8 @@ Function17e0fd: ; 17e0fd ld [rSVBK], a call Function17e40f ret -; 17e133 -Function17e133: ; 17e133 +Function17e133: call IncCrashCheckPointer ld de, $c708 ld bc, $5 @@ -2716,9 +2648,8 @@ Function17e133: ; 17e133 ld [rSVBK], a call Function17e40f ret -; 17e165 -Function17e165: ; 17e165 +Function17e165: call IncCrashCheckPointer ld de, $c708 ld bc, $5 @@ -2753,9 +2684,8 @@ Function17e165: ; 17e165 ld [rSVBK], a call Function17e40f ret -; 17e1a1 -Function17e1a1: ; 17e1a1 +Function17e1a1: call IncCrashCheckPointer ld de, $c708 ld bc, $d @@ -2862,9 +2792,8 @@ Function17e1a1: ; 17e1a1 .asm_17e250 call Function17e40f ret -; 17e254 -Function17e254: ; 17e254 +Function17e254: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -2874,9 +2803,8 @@ Function17e254: ; 17e254 ld [de], a call HlToCrashCheckPointer ret -; 17e261 -Function17e261: ; 17e261 +Function17e261: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -2888,9 +2816,8 @@ Function17e261: ; 17e261 inc hl call HlToCrashCheckPointer ret -; 17e270 -Function17e270: ; 17e270 +Function17e270: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -2902,9 +2829,8 @@ Function17e270: ; 17e270 inc hl call HlToCrashCheckPointer ret -; 17e27f -Function17e27f: ; 17e27f +Function17e27f: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -2921,9 +2847,8 @@ Function17e27f: ; 17e27f add [hl] ld [de], a ret -; 17e293 -Function17e293: ; 17e293 +Function17e293: call IncCrashCheckPointer ld a, [hli] ld e, a @@ -2940,9 +2865,8 @@ Function17e293: ; 17e293 sub [hl] ld [de], a ret -; 17e2a7 -Function17e2a7: ; 17e2a7 +Function17e2a7: call IncCrashCheckPointer call HlToCrashCheckPointer call Function17e32b @@ -2988,9 +2912,8 @@ Function17e2a7: ; 17e2a7 ld a, $2 ld [wcd7a], a ret -; 17e309 -Function17e309: ; 17e309 +Function17e309: ld a, $2 ld [wc303], a call Function17dcaf @@ -3003,9 +2926,8 @@ Function17e309: ; 17e309 xor a ld [wcd77], a ret -; 17e32b -Function17e32b: ; 17e32b +Function17e32b: ld a, $5 call GetSRAMBank ld hl, $c608 @@ -3017,9 +2939,8 @@ Function17e32b: ; 17e32b call CopyBytes call CloseSRAM ret -; 17e349 -Function17e349: ; 17e349 +Function17e349: ld a, $5 call GetSRAMBank ld hl, $b0b1 @@ -3031,7 +2952,6 @@ Function17e349: ; 17e349 call CopyBytes call CloseSRAM ret -; 17e367 inc_crash_check_pointer_farcall: MACRO call IncCrashCheckPointer @@ -3049,26 +2969,22 @@ endr ret ENDM -IncCrashCheckPointer_SaveGameData: ; 17e367 +IncCrashCheckPointer_SaveGameData: inc_crash_check_pointer_farcall SaveGameData_ -; 17e37e -IncCrashCheckPointer_SaveAfterLinkTrade: ; 17e37e +IncCrashCheckPointer_SaveAfterLinkTrade: inc_crash_check_pointer_farcall SaveAfterLinkTrade -IncCrashCheckPointer_SaveBox: ; 17e395 +IncCrashCheckPointer_SaveBox: inc_crash_check_pointer_farcall SaveBox -; 17e3ac -IncCrashCheckPointer_SaveChecksum: ; 17e3ac +IncCrashCheckPointer_SaveChecksum: inc_crash_check_pointer_farcall SaveChecksum -; 17e3c3 -IncCrashCheckPointer_SaveTrainerRankingsChecksum: ; 17e3c3 +IncCrashCheckPointer_SaveTrainerRankingsChecksum: inc_crash_check_pointer_farcall UpdateTrainerRankingsChecksum2, BackupMobileEventIndex -; 17e3e0 -Function17e3e0: ; 17e3e0 +Function17e3e0: call IncCrashCheckPointer ld a, [hli] ld c, a @@ -3077,9 +2993,8 @@ Function17e3e0: ; 17e3e0 ld [hBGMapMode], a call DelayFrames ret -; 17e3f0 -Function17e3f0: ; 17e3f0 +Function17e3f0: call IncCrashCheckPointer call HlToCrashCheckPointer .asm_17e3f6 @@ -3093,15 +3008,13 @@ Function17e3f0: ; 17e3f0 ret nz call WaitBGMap jr .asm_17e3f6 -; 17e409 -Function17e409: ; 17e409 +Function17e409: ld hl, wcd77 set 7, [hl] ret -; 17e40f -Function17e40f: ; 17e40f +Function17e40f: ld de, wBGPals1 add hl, de jr HlToCrashCheckPointer @@ -3119,9 +3032,8 @@ HlToCrashCheckPointer: ld a, h ld [wMobileCrashCheckPointer + 1], a ret -; 17e427 -Function17e427: ; 17e427 +Function17e427: ld hl, hJoyPressed ld a, [hl] and $1 @@ -3133,33 +3045,29 @@ Function17e427: ; 17e427 ld a, $3 ld [wcd77], a ret -; 17e438 -Function17e438: ; 17e438 +Function17e438: ld hl, wcd77 inc [hl] ret -; 17e43d -Function17e43d: ; 17e43d +Function17e43d: ld a, [wBGMapBuffer] ld l, a ld a, [wcd21] ld h, a add hl, bc ret -; 17e447 -Function17e447: ; 17e447 +Function17e447: ld a, [wBGMapBuffer] ld l, a ld a, [wcd21] ld h, a add hl, de ret -; 17e451 -Function17e451: ; 17e451 +Function17e451: ld a, [wcd42] and a ret z @@ -3249,9 +3157,8 @@ Function17e451: ; 17e451 pop af ld [wcd2e], a ret -; 17e4dd -Function17e4dd: ; 17e4dd +Function17e4dd: ld a, [wcd2c] and $1 ret z @@ -3285,9 +3192,8 @@ Function17e4dd: ; 17e4dd ld a, $ee ld [hl], a ret -; 17e51b -Function17e51b: ; 17e51b +Function17e51b: ld a, [wcd28] ld hl, wCreditsTimer sub [hl] @@ -3321,27 +3227,24 @@ Function17e51b: ; 17e51b dec a jr nz, .asm_17e544 ret -; 17e55b -Function17e55b: ; 17e55b +Function17e55b: ld a, [wcd42] and a ret z ld a, $ed call Function17e571 ret -; 17e566 -Function17e566: ; 17e566 +Function17e566: ld a, [wcd42] and a ret z ld a, $7f call Function17e571 ret -; 17e571 -Function17e571: ; 17e571 +Function17e571: push af hlcoord 0, 0 ld bc, $14 @@ -3375,9 +3278,8 @@ Function17e571: ; 17e571 pop af ld [hl], a ret -; 17e5af -Function17e5af: ; 17e5af +Function17e5af: ld a, [wcd2c] and $2 ret z @@ -3422,9 +3324,8 @@ Function17e5af: ; 17e5af add hl, bc call PlaceString ret -; 17e600 -Function17e600: ; 17e600 +Function17e600: .asm_17e600 push af push hl @@ -3439,9 +3340,8 @@ Function17e600: ; 17e600 dec a jr nz, .asm_17e600 ret -; 17e613 -Function17e613: ; 17e613 +Function17e613: push hl hlcoord 0, 0 ld bc, $14 @@ -3541,9 +3441,8 @@ Function17e613: ; 17e613 ld [hl], a pop hl ret -; 17e691 -Function17e691: ; 17e691 +Function17e691: push hl ld hl, NULL ld bc, $14 @@ -3606,9 +3505,8 @@ Function17e691: ; 17e691 jr nz, .asm_17e6ac pop hl ret -; 17e6de -Function17e6de: ; 17e6de +Function17e6de: push af ld a, [$c708] ld l, a @@ -3631,10 +3529,9 @@ Function17e6de: ; 17e6de dec b jr nz, .asm_17e6ee ret -; 17e6fe -PokemonNewsGFX: ; 17e6fe +PokemonNewsGFX: INCBIN "gfx/mobile/pokemon_news.2bpp" GFX_17eb7e: @@ -3678,7 +3575,7 @@ Palette_17eff6: RGB 0, 0, 0 -Function17f036:: ; 17f036 +Function17f036:: ld a, $6 call GetSRAMBank inc de @@ -3690,9 +3587,8 @@ Function17f036:: ; 17f036 .asm_17f043 call CloseSRAM ret -; 17f047 -Function17f047: ; 17f047 +Function17f047: ld a, [de] inc de cp $50 @@ -3714,9 +3610,8 @@ Function17f047: ; 17f047 .finished scf ret -; 17f061 -.Jumptable: ; 17f061 +.Jumptable: dw Function17f081 ; 0 dw Function17f0f8 ; 1 dw Function17f154 ; 2 @@ -3733,9 +3628,8 @@ Function17f047: ; 17f047 dw Function17f41d ; d dw Function17f44f ; e dw Function17f44f ; f -; 17f081 -Function17f081: ; 17f081 +Function17f081: pop hl call Function17f524 jr c, .asm_17f09f @@ -3821,9 +3715,8 @@ Function17f081: ; 17f081 pop de and a ret -; 17f0f8 -Function17f0f8: ; 17f0f8 +Function17f0f8: pop hl call Function17f524 jr c, .asm_17f114 @@ -3880,9 +3773,8 @@ Function17f0f8: ; 17f0f8 pop de and a ret -; 17f154 -Function17f154: ; 17f154 +Function17f154: pop hl call Function17f524 jr c, .asm_17f167 @@ -3920,9 +3812,8 @@ Function17f154: ; 17f154 pop de and a ret -; 17f181 -Function17f181: ; 17f181 +Function17f181: pop hl call Function17f524 jr c, .asm_17f19d @@ -3975,9 +3866,8 @@ Function17f181: ; 17f181 pop de and a ret -; 17f1d0 -Function17f1d0: ; 17f1d0 +Function17f1d0: pop hl call Function17f524 jr c, .asm_17f1ec @@ -4032,9 +3922,8 @@ Function17f1d0: ; 17f1d0 pop de and a ret -; 17f220 -Function17f220: ; 17f220 +Function17f220: pop hl call Function17f524 jr c, .asm_17f23c @@ -4092,13 +3981,12 @@ Function17f220: ; 17f220 pop de and a ret -; 17f26e .Genders: dw .Boy, .Girl .Boy: db "Boy@" .Girl: db "Girl@" -Function17f27b: ; 17f27b +Function17f27b: pop hl call Function17f524 jr c, .asm_17f297 @@ -4153,9 +4041,8 @@ Function17f27b: ; 17f27b pop de and a ret -; 17f2cb -Function17f2cb: ; 17f2cb +Function17f2cb: pop hl push bc ld a, [hli] @@ -4185,9 +4072,8 @@ Function17f2cb: ; 17f2cb pop de and a ret -; 17f2ff -Function17f2ff: ; 17f2ff +Function17f2ff: pop hl push bc ld a, [hli] @@ -4215,9 +4101,8 @@ Function17f2ff: ; 17f2ff pop de and a ret -; 17f334 -Function17f334: ; 17f334 +Function17f334: pop hl push bc ld a, [hli] @@ -4259,9 +4144,8 @@ Function17f334: ; 17f334 pop de and a ret -; 17f382 -Function17f382: ; 17f382 +Function17f382: pop hl push bc ld a, [hli] @@ -4303,9 +4187,8 @@ Function17f382: ; 17f382 pop de and a ret -; 17f3c9 -Function17f3c9: ; 17f3c9 +Function17f3c9: push bc ld hl, wcd36 ld de, $c708 @@ -4323,9 +4206,8 @@ Function17f3c9: ; 17f3c9 pop de and a ret -; 17f3f0 -Function17f3f0: ; 17f3f0 +Function17f3f0: pop hl push hl ld a, [hli] @@ -4365,9 +4247,8 @@ Function17f3f0: ; 17f3f0 ld h, b scf ret -; 17f41d -Function17f41d: ; 17f41d +Function17f41d: pop hl ld a, [hli] push hl @@ -4410,9 +4291,8 @@ Function17f41d: ; 17f41d pop de and a ret -; 17f44f -Function17f44f: ; 17f44f +Function17f44f: pop hl call Function17f524 jr c, .asm_17f46d @@ -4523,9 +4403,8 @@ Function17f44f: ; 17f44f pop de and a ret -; 17f4f6 -Function17f4f6: ; 17f4f6 +Function17f4f6: ld a, [wcd6a] ld l, a ld a, [wcd6b] @@ -4541,9 +4420,8 @@ Function17f4f6: ; 17f4f6 dec a add hl, bc jr .asm_17f509 -; 17f50f -Function17f50f: ; 17f50f +Function17f50f: and a jr z, .asm_17f519 ld c, a @@ -4561,9 +4439,8 @@ Function17f50f: ; 17f50f ld b, a ld h, a ret -; 17f524 -Function17f524: ; 17f524 +Function17f524: push hl push bc push de @@ -4584,9 +4461,8 @@ Function17f524: ; 17f524 .asm_17f53a scf jr .asm_17f536 -; 17f53d -BattleTowerMobileError: ; 17f53d +BattleTowerMobileError: call FadeToMenu xor a ld [wc303], a @@ -4601,9 +4477,8 @@ BattleTowerMobileError: ; 17f53d ld [rSVBK], a call ExitAllMenus ret -; 17f555 -DisplayMobileError: ; 17f555 +DisplayMobileError: .loop call JoyTextDelay call .RunJumptable @@ -4657,36 +4532,31 @@ DisplayMobileError: ; 17f555 ld [sMobileLoginPassword], a call CloseSRAM ret -; 17f5ae -.RunJumptable: ; 17f5ae +.RunJumptable: jumptable .Jumptable, wc303 -; 17f5bd -.Jumptable: ; 17f5bd +.Jumptable: dw Function17f5c3 dw Function17ff23 dw Function17f5d2 -; 17f5c3 -Function17f5c3: ; 17f5c3 +Function17f5c3: call Function17f5e4 farcall FinishExitMenu ld a, $1 ld [wc303], a ret -; 17f5d2 -Function17f5d2: ; 17f5d2 +Function17f5d2: call Function17f5e4 farcall HDMATransferAttrMapAndTileMapToWRAMBank3 call SetPalettes ld a, $1 ld [wc303], a ret -; 17f5e4 -Function17f5e4: ; 17f5e4 +Function17f5e4: ld a, $8 ld [wMusicFade], a ld de, MUSIC_NONE @@ -4797,9 +4667,8 @@ Function17f5e4: ; 17f5e4 hlcoord 2, 6 call PlaceString ret -; 17f699 -Table_17f699: ; 17f699 +Table_17f699: dw String_17fedf dw String_17fdd9 dw String_17fdd9 @@ -4811,16 +4680,14 @@ Table_17f699: ; 17f699 dw String_17fe03 dw String_17fe03 dw String_17fe03 -; 17f6af -Palette_17f6af: ; 17f6af +Palette_17f6af: RGB 5, 5, 16 RGB 8, 19, 28 RGB 0, 0, 0 RGB 31, 31, 31 -; 17f6b7 -Function17f6b7: ; 17f6b7 +Function17f6b7: ld a, [wc300] call .bcd_two_digits inc hl @@ -4830,9 +4697,8 @@ Function17f6b7: ; 17f6b7 ld a, [wc301] call .bcd_two_digits ret -; 17f6cd -.bcd_two_digits ; 17f6cd +.bcd_two_digits ld c, a and $f0 swap a @@ -4840,22 +4706,19 @@ Function17f6b7: ; 17f6b7 ld a, c and $f -.bcd_digit ; 17f6d8 +.bcd_digit add "0" ld [hli], a ret -; 17f6dc -String_17f6dc: ; 17f6dc +String_17f6dc: db "つうしんエラー   ー@" -; 17f6e8 -String_17f6e8: ; 17f6e8 +String_17f6e8: db "みていぎエラーです" next "プログラム" next "かくにん してください" db "@" -; 17f706 Table_17f706: dw Unknown_17f74e @@ -5009,7 +4872,7 @@ Unknown_17f844: db 19 dbbw $4, $4, String_17fa49 dbbw $ff, $ff, String_17fa49 -String_17f891: ; 17f891 +String_17f891: db "モバイルアダプタが ただしく" next "さしこまれていません" next "とりあつかいせつめいしょを" @@ -5017,7 +4880,7 @@ String_17f891: ; 17f891 next "さしこんで ください" db "@" -String_17f8d1: ; 17f8d1 +String_17f8d1: db "でんわが うまく かけられないか" next "でんわかいせんが こんでいるので" next "つうしん できません" @@ -5025,14 +4888,14 @@ String_17f8d1: ; 17f8d1 next "かけなおして ください" db "@" -String_17f913: ; 17f913 +String_17f913: db "でんわかいせんが こんでいるため" next "でんわが かけられません" next "しばらく まって" next "かけなおして ください" db "@" -String_17f946: ; 17f946 +String_17f946: db "モバイルアダプタの エラーです" next "しばらく まって" next "かけなおして ください" @@ -5041,7 +4904,7 @@ String_17f946: ; 17f946 next "おといあわせください" db "@" -String_17f98e: ; 17f98e +String_17f98e: db "つうしんエラーです" next "しばらく まって" next "かけなおして ください" @@ -5050,7 +4913,7 @@ String_17f98e: ; 17f98e next "おといあわせください" db "@" -String_17f9d0: ; 17f9d0 +String_17f9d0: db "ログインパスワードか" next "ログイン アイディーに" next "まちがいがあります" @@ -5059,7 +4922,7 @@ String_17f9d0: ; 17f9d0 next "かけなおして ください" db "@" -String_17fa14: ; 17fa14 +String_17fa14: db "でんわが きれました" next "とりあつかいせつめいしょを" next "ごらんのうえ" @@ -5067,14 +4930,14 @@ String_17fa14: ; 17fa14 next "かけなおして ください" db "@" -String_17fa49: ; 17fa49 +String_17fa49: db "モバイルセンターの" next "つうしんエラーです" next "しばらくまって" next "かけなおして ください" db "@" -String_17fa71: ; 17fa71 +String_17fa71: db "モバイルアダプタに" next "とうろくされた じょうほうが" next "ただしく ありません" @@ -5082,7 +4945,7 @@ String_17fa71: ; 17fa71 next "しょきとうろくを してください" db "@" -String_17fab0: ; 17fab0 +String_17fab0: db "モバイルセンターが" next "こんでいて つながりません" next "しばらくまって" @@ -5091,14 +4954,14 @@ String_17fab0: ; 17fab0 next "せつめいしょを ごらんください" db "@" -String_17faf9: ; 17faf9 +String_17faf9: db "あてさき メールアドレスに" next "まちがいがあります" next "ただしい メールアドレスを" next "いれなおしてください" db "@" -String_17fb2a: ; 17fb2a +String_17fb2a: db "メールアドレスに" next "まちがいが あります" next "とりあつかいせつめいしょを" @@ -5107,7 +4970,7 @@ String_17fb2a: ; 17fb2a next "しょきとうろくを してください" db "@" -String_17fb6e: ; 17fb6e +String_17fb6e: db "ログインパスワードに" next "まちがいが あるか" next "モバイルセンターの エラーです" @@ -5116,7 +4979,7 @@ String_17fb6e: ; 17fb6e next "かけなおして ください" db "@" -String_17fbb6: ; 17fbb6 +String_17fbb6: db "データの よみこみが できません" next "しばらくまって" next "かけなおして ください" @@ -5125,7 +4988,7 @@ String_17fbb6: ; 17fbb6 next "おといあわせください" db "@" -String_17fbfe: ; 17fbfe +String_17fbfe: db "じかんぎれです" next "でんわが きれました" next "でんわを かけなおしてください" @@ -5133,7 +4996,7 @@ String_17fbfe: ; 17fbfe next "せつめいしょを ごらんください" db "@" -String_17fc3e: ; 17fc3e +String_17fc3e: db "ごりよう りょうきんの " next "おしはらいが おくれたばあいには" next "ごりようが できなくなります" @@ -5141,14 +5004,14 @@ String_17fc3e: ; 17fc3e next "せつめいしょを ごらんください" db "@" -String_17fc88: ; 17fc88 +String_17fc88: db "おきゃくさまの ごつごうにより" next "ごりようできません" next "くわしくは とりあつかい" next "せつめいしょを ごらんください" db "@" -String_17fcbf: ; 17fcbf +String_17fcbf: db "でんわかいせんが こんでいるか" next "モバイルセンターの エラーで" next "つうしんが できません" @@ -5156,7 +5019,7 @@ String_17fcbf: ; 17fcbf next "かけなおして ください" db "@" -String_17fcff: ; 17fcff +String_17fcff: db "ごりよう りょうきんが" next "じょうげんを こえているため" next "こんげつは ごりようできません" @@ -5164,7 +5027,7 @@ String_17fcff: ; 17fcff next "せつめいしょを ごらんください" db "@" -String_17fd47: ; 17fd47 +String_17fd47: db "げんざい モバイルセンターの" next "てんけんを しているので" next "つうしんが できません" @@ -5172,27 +5035,27 @@ String_17fd47: ; 17fd47 next "かけなおして ください" db "@" -String_17fd84: ; 17fd84 +String_17fd84: db "データの よみこみが できません" next "くわしくは とりあつかい" next "せつめいしょを ごらんください" db "@" -String_17fdb2: ; 17fdb2 +String_17fdb2: db "3ぷん いじょう なにも" next "にゅうりょく しなかったので" next "でんわが きれました" db "@" -String_17fdd9: ; 17fdd9 +String_17fdd9: db "つうしんが うまく" next "できませんでした" next "もういちど はじめから" next "やりなおしてください" db "@" -String_17fe03: ; 17fe03 +String_17fe03: db "データの よみこみが できません" next "しばらくまって" next "かけなおして ください" @@ -5201,12 +5064,12 @@ String_17fe03: ; 17fe03 next "おといあわせください" db "@" -String_17fe4b: ; 17fe4b +String_17fe4b: db "まちじかんが ながいので" next "でんわが きれました" db "@" -String_17fe63: ; 17fe63 +String_17fe63: db "あいての モバイルアダプタと" next "タイプが ちがいます" next "くわしくは とりあつかい" @@ -5221,16 +5084,15 @@ String_17fe9a: ; 17fe9a ; unused next "よみこみを さきに してください" db "@" -String_17fedf: ; 17fedf +String_17fedf: db "つうしんの じょうきょうが" next "よくないか かけるあいてが" next "まちがっています" next "もういちど かくにんをして" next "でんわを かけなおして ください" db "@" -; 17ff23 -Function17ff23: ; 17ff23 +Function17ff23: ld a, [hJoyPressed] and a ret z @@ -5243,9 +5105,8 @@ Function17ff23: ; 17ff23 ld hl, wc303 set 7, [hl] ret -; 17ff3c -Function17ff3c: ; 17ff3c +Function17ff3c: nop ld a, [wc300] cp $d0 @@ -5266,8 +5127,6 @@ Function17ff3c: ; 17ff3c ld [wc300], a and a ret -; 17ff68 -String_17ff68: ; 17ff68 +String_17ff68: db "101@" -; 17ff6c diff --git a/mobile/mobile_menu.asm b/mobile/mobile_menu.asm index a60091d4c96..afd9cfba815 100644 --- a/mobile/mobile_menu.asm +++ b/mobile/mobile_menu.asm @@ -1,15 +1,15 @@ -MainMenu_Mobile: ; 49efc +MainMenu_Mobile: call ClearBGPalettes ld a, MUSIC_MOBILE_ADAPTER_MENU ld [wMapMusic], a ld de, MUSIC_MOBILE_ADAPTER_MENU call Function4a6c5 -Function49f0a: ; 49f0a +Function49f0a: call ClearBGPalettes call Function4a3a7 call Function4a492 call ClearBGPalettes -Function49f16: ; 49f16 +Function49f16: call MobileMenu_InitMenuBuffers ld c, 12 call DelayFrames @@ -98,47 +98,40 @@ Function49f16: ; 49f16 hlcoord 5, 1 call ClearBox jp .joy_loop -; 49fcc -MobileString1: ; 49fcc +MobileString1: db "めいしフォルダー" next "あいさつ" next "プロフィール" next "せい" next "もどる" db "@" -; 49fe9 MobileStrings2: -String_0x49fe9: ; 49fe9 +String_0x49fe9: db "めいし¯つくったり" next "ほぞんしておける フォルダーです@" -; 4a004 -String_0x4a004: ; 4a004 +String_0x4a004: db "モバイルたいせんや じぶんのめいしで" next "つかう あいさつ¯つくります@" -; 4a026 -String_0x4a026: ; 4a026 +String_0x4a026: db "あなたじゅうしょや ねんれいの" next "せい¯かえられます@" -; 4a042 -String_0x4a042: ; 4a042 +String_0x4a042: db "モバイルセンターせつぞくするとき" next "ひつような こと¯きめます@" -; 4a062 -String_0x4a062: ; 4a062 +String_0x4a062: db "まえがめん もどります" next "@" -; 4a071 -MobileMenu_InitMenuBuffers: ; 4a071 (12:6071) +MobileMenu_InitMenuBuffers: ld hl, w2DMenuCursorInitY ld a, 2 ld [hli], a @@ -166,7 +159,7 @@ MobileMenu_InitMenuBuffers: ; 4a071 (12:6071) ld [hli], a ; wMenuCursorY, wMenuCursorX ret -Function4a098: ; 4a098 (12:6098) +Function4a098: ld a, 2 call MenuClickSound call PlaceHollowCursor @@ -179,13 +172,13 @@ Function4a098: ; 4a098 (12:6098) pop bc jp Function49f16 -Function4a0b9: ; 4a0b9 (12:60b9) +Function4a0b9: ld a, 2 call MenuClickSound pop bc jp Function4a4c4 -Function4a0c2: ; 4a0c2 (12:60c2) +Function4a0c2: ld a, 2 call MenuClickSound ld a, BANK(sPlayerData) @@ -211,7 +204,7 @@ Function4a0c2: ; 4a0c2 (12:60c2) call DelayFrames jr asm_4a111 -Function4a100: ; 4a100 (12:6100) +Function4a100: ld a, 2 call MenuClickSound call ClearBGPalettes @@ -219,12 +212,12 @@ Function4a100: ; 4a100 (12:6100) call ClearBGPalettes call ClearTileMap -asm_4a111: ; 4a111 (12:6111) +asm_4a111: pop bc call LoadFontsExtra jp Function49f0a -Function4a118: ; 4a118 (12:6118) +Function4a118: ld hl, w2DMenuCursorInitY ld a, $1 ld [hli], a @@ -249,14 +242,14 @@ Function4a118: ; 4a118 (12:6118) ld [hli], a ret -Function4a13b: ; 4a13b (12:613b) +Function4a13b: call Function4a3a7 call Function4a492 call Function4a373 ld c, 10 call DelayFrames -Function4a149: ; 4a149 (12:6149) +Function4a149: hlcoord 1, 2 ld b, $6 ld c, $10 @@ -288,13 +281,13 @@ Function4a149: ; 4a149 (12:6149) push bc jr asm_4a19d -Function4a195: ; 4a195 (12:6195) +Function4a195: call ScrollingMenuJoypad ld hl, wMenuCursorY ld b, [hl] push bc -asm_4a19d: ; 4a19d (12:619d) +asm_4a19d: bit 0, a jr nz, .asm_4a1a7 bit 1, a @@ -336,15 +329,13 @@ asm_4a19d: ; 4a19d (12:619d) hlcoord 2, 3 call ClearBox jp Function4a195 -; 4a1ef (12:61ef) -String_4a1ef: ; 4a1ef +String_4a1ef: db "モバイルセンター¯えらぶ" next "ログインパスワード¯いれる" next "もどる@" -; 4a20e -Function4a20e: ; 4a20e (12:620e) +Function4a20e: ld a, $1 call MenuClickSound farcall Function1719c8 @@ -352,7 +343,7 @@ Function4a20e: ; 4a20e (12:620e) call DelayFrame jr Function4a239 -Function4a221: ; 4a221 (12:6221) +Function4a221: ld a, $1 call MenuClickSound call Function4a28a @@ -365,12 +356,11 @@ Function4a221: ; 4a221 (12:6221) pop bc jp Function4a149 -Function4a239: ; 4a239 (12:6239) +Function4a239: pop bc jp Function4a13b -; 4a23d (12:623d) -Strings_4a23d: ; 4a23d +Strings_4a23d: db "いつも せつぞく¯する" next "モバイルセンター¯えらびます@" @@ -380,9 +370,8 @@ Strings_4a23d: ; 4a23d db "まえがめん もどります@" db "@" -; 4a28a -Function4a28a: ; 4a28a (12:628a) +Function4a28a: hlcoord 2, 3 lb bc, 6, 1 ld a, " " @@ -458,17 +447,15 @@ Function4a28a: ; 4a28a (12:628a) farcall Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap xor a ret -; 4a346 (12:6346) MenuHeader_0x4a346: ; 0x4a346 db MENU_BACKUP_TILES ; flags menu_coords 12, 0, SCREEN_WIDTH - 1, 6 -String_4a34b: ; 4a34b +String_4a34b: db "いれなおす" next "けす" next "もどる@" -; 4a358 UnknownText_0x4a358: ; 0x4a358 ; Delete the saved LOG-IN PASSWORD? @@ -496,7 +483,7 @@ MenuData_0x4a36a: ; 0x4a36a db "いいえ@" ; 0x4a373 -Function4a373: ; 4a373 (12:6373) +Function4a373: ld hl, w2DMenuCursorInitY ld a, $4 ld [hli], a @@ -522,19 +509,17 @@ Function4a373: ; 4a373 (12:6373) ld [hli], a ld [hli], a ret -; 4a39a (12:639a) -Function4a39a: ; 4a39a +Function4a39a: call Function4a485 call Function4a492 call Function4a3aa call SetPalettes ret -; 4a3a7 -Function4a3a7: ; 4a3a7 (12:63a7) +Function4a3a7: call Function4a485 -Function4a3aa: ; 4a3aa +Function4a3aa: hlcoord 0, 0 lb bc, 3, 1 xor a @@ -596,9 +581,8 @@ Function4a3aa: ; 4a3aa ld a, " " call Function4a6d8 ret -; 4a449 (12:6449) -Function4a449: ; 4a449 +Function4a449: ld bc, 3 * SCREEN_WIDTH ld a, $0 hlcoord 0, 0 @@ -622,21 +606,20 @@ Function4a449: ; 4a449 ld a, " " call ByteFill ret -; 4a485 -Function4a485: ; 4a485 (12:6485) +Function4a485: ld de, GFX_49c0c ld hl, vTiles2 tile $00 lb bc, BANK(GFX_49c0c), 13 call Get2bpp ret -Function4a492: ; 4a492 (12:6492) +Function4a492: call MG_Mobile_Layout00 ret -MainMenu_MobileStudium: ; 4a496 +MainMenu_MobileStudium: ld a, [wStartDay] ld b, a ld a, [wStartHour] @@ -660,10 +643,9 @@ MainMenu_MobileStudium: ; 4a496 ld a, e ld [wStartSecond], a ret -; 4a4c4 -Function4a4c4: ; 4a4c4 (12:64c4) +Function4a4c4: call ClearBGPalettes call Function4a3a7 call Function4a492 @@ -715,13 +697,13 @@ Function4a4c4: ; 4a4c4 (12:64c4) push bc jr asm_4a54d -Function4a545: ; 4a545 (12:6545) +Function4a545: call ScrollingMenuJoypad ld hl, wMenuCursorY ld b, [hl] push bc -asm_4a54d: ; 4a54d (12:654d) +asm_4a54d: bit 0, a jr nz, .asm_4a557 bit 1, a @@ -771,7 +753,7 @@ asm_4a54d: ; 4a54d (12:654d) call PlaceString jp Function4a5b0 -Function4a5b0: ; 4a5b0 (12:65b0) +Function4a5b0: call Function4a680 pop bc ld hl, wMenuCursorY @@ -781,21 +763,19 @@ Function4a5b0: ; 4a5b0 (12:65b0) hlcoord 3, 1 call ClearBox jp Function4a545 -; 4a5c5 (12:65c5) -String_4a5c5: ; 4a5c5 +String_4a5c5: db "じこしょうかい@" -String_4a5cd: ; 4a5cd +String_4a5cd: db "たいせん はじまるとき@" -String_4a5da: ; 4a5da +String_4a5da: db "たいせん かったとき@" -String_4a5e6: ; 4a5e6 +String_4a5e6: db "たいせん まけたとき@" -String_4a5f2: ; 4a5f2 +String_4a5f2: db "もどる@" -; 4a5f6 -Strings_4a5f6: ; 4a5f6 +Strings_4a5f6: db "めいし や ニュース のせる@" db "あなたあいさつです@" db "モバイル たいせんはじまるとき@" @@ -806,9 +786,8 @@ Strings_4a5f6: ; 4a5f6 db "あいてみえる あいさつです@" db "まえがめん もどります@" db "@" -; 4a680 -Function4a680: ; 4a680 (12:6680) +Function4a680: ld hl, w2DMenuCursorInitY ld a, $2 ld [hli], a @@ -839,7 +818,7 @@ Function4a680: ; 4a680 (12:6680) ld [hli], a ret -Function4a6ab: ; 4a6ab (12:66ab) +Function4a6ab: ld a, $2 call MenuClickSound call ClearBGPalettes @@ -850,7 +829,7 @@ Function4a6ab: ; 4a6ab (12:66ab) call LoadFontsExtra jp Function4a4c4 -Function4a6c5: ; 4a6c5 (12:66c5) +Function4a6c5: ld a, $5 ld [wMusicFade], a ld a, e @@ -861,7 +840,7 @@ Function4a6c5: ; 4a6c5 (12:66c5) call DelayFrames ret -Function4a6d8: ; 4a6d8 (12:66d8) +Function4a6d8: push bc push hl .asm_4a6da diff --git a/mobile/news/news.asm b/mobile/news/news.asm index d9dcc3ce8b9..868556bdd16 100644 --- a/mobile/news/news.asm +++ b/mobile/news/news.asm @@ -2,7 +2,7 @@ db $cc, $6b, $1e ; unused -Unreferenced_Function1f4003: ; 1f4003 +Unreferenced_Function1f4003: ld a, $6 call GetSRAMBank ld hl, .news_data @@ -15,7 +15,7 @@ Unreferenced_Function1f4003: ; 1f4003 .news_data INCBIN "mobile/news/news_1.bin" -Unreferenced_Function1f4dbe: ; 1f4dbe +Unreferenced_Function1f4dbe: ld a, $6 call GetSRAMBank ld hl, .news_data @@ -28,7 +28,7 @@ Unreferenced_Function1f4dbe: ; 1f4dbe .news_data INCBIN "mobile/news/news_2.bin" -Function1f5d9f: ; 1f5d9f +Function1f5d9f: ld a, $6 call GetSRAMBank ld hl, .news_data diff --git a/mobile/print_opp_message.asm b/mobile/print_opp_message.asm index 987ad4b9a25..9c94297a88c 100644 --- a/mobile/print_opp_message.asm +++ b/mobile/print_opp_message.asm @@ -1,4 +1,4 @@ -Mobile_PrintOpponentBattleMessage: ; 4ea0a +Mobile_PrintOpponentBattleMessage: ld a, c push af call SpeechTextBox